Subversion Repositories eduke32

Rev

Rev 8788 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8788 Rev 8789
Line 2398... Line 2398...
2398
2398
2399
            case RPG_WEAPON:
2399
            case RPG_WEAPON:
2400
                weaponX -= sintable[(768 + ((*weaponFrame) << 7)) & 2047] >> 11;
2400
                weaponX -= sintable[(768 + ((*weaponFrame) << 7)) & 2047] >> 11;
2401
                weaponYOffset += sintable[(768 + ((*weaponFrame) << 7)) & 2047] >> 11;
2401
                weaponYOffset += sintable[(768 + ((*weaponFrame) << 7)) & 2047] >> 11;
2402
2402
2403
                if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING))
2403
                if (!WORLDTOUR && !(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING))
2404
                    weaponBits |= 512;
2404
                    weaponBits |= 512;
2405
2405
2406
                if (*weaponFrame > 0)
2406
                if (*weaponFrame > 0)
2407
                {
2407
                {
2408
                    int totalTime;
2408
                    int totalTime;
Line 2418... Line 2418...
2418
                                          ? 10 * ((*weaponFrame) - totalTime)   // down
2418
                                          ? 10 * ((*weaponFrame) - totalTime)   // down
2419
                                          : 10 * (reloadTime - (*weaponFrame)); // up
2419
                                          : 10 * (reloadTime - (*weaponFrame)); // up
2420
                    }
2420
                    }
2421
                }
2421
                }
2422
2422
2423
                G_DrawWeaponTileWithID(currentWeapon, weaponX + 164, (weaponY << 1) + 176 - weaponYOffset, RPGGUN, weaponShade,
2423
                G_DrawWeaponTileWithID(currentWeapon, weaponX + 164, (weaponY << 1) + 176 - weaponYOffset, WT_WIDE(RPGGUN), weaponShade,
2424
                                       weaponBits, weaponPal);
2424
                                       weaponBits, weaponPal);
2425
                break;
2425
                break;
2426
2426
2427
            case SHOTGUN_WEAPON:
2427
            case SHOTGUN_WEAPON:
2428
                weaponX -= 8;
2428
                weaponX -= 8;
Line 2657... Line 2657...
2657
                G_DrawWeaponTileWithID(currentWeapon << 1, weaponX + 168 - (pPlayer->look_ang >> 1), weaponY + 260 - weaponYOffset,
2657
                G_DrawWeaponTileWithID(currentWeapon << 1, weaponX + 168 - (pPlayer->look_ang >> 1), weaponY + 260 - weaponYOffset,
2658
                                       CHAINGUN, weaponShade, weaponBits, weaponPal);
2658
                                       CHAINGUN, weaponShade, weaponBits, weaponPal);
2659
                break;
2659
                break;
2660
2660
2661
            case PISTOL_WEAPON:
2661
            case PISTOL_WEAPON:
-
 
2662
            {
2662
                if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, TotalTime)+1)
2663
                if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, TotalTime)+1)
2663
                {
2664
                {
2664
                    static uint8_t pistolFrames[] = { 0, 1, 2 };
2665
                    static uint8_t pistolFrames[] = { 0, 1, 2 };
2665
                    int pistolOffset = 195-12+weaponX;
2666
                    int pistolOffset = 195-12+weaponX;
2666
2667
Line 2672... Line 2673...
2672
                                           weaponPal);
2673
                                           weaponPal);
2673
2674
2674
                    break;
2675
                    break;
2675
                }
2676
                }
2676
2677
2677
                if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING) && DUKE)
2678
                if (!WORLDTOUR && !(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING) && DUKE)
2678
                    weaponBits |= 512;
2679
                    weaponBits |= 512;
2679
2680
-
 
2681
                int32_t const FIRSTGUN_5 = WORLDTOUR ? FIRSTGUNRELOADWIDE : FIRSTGUN + 5;
-
 
2682
2680
                if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 40 : 17))
2683
                if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 40 : 17))
2681
                    G_DrawWeaponTileWithID(currentWeapon, 194 - (pPlayer->look_ang >> 1), weaponY + 230 - weaponYOffset, FIRSTGUN + 4,
2684
                    G_DrawWeaponTileWithID(currentWeapon, 194 - (pPlayer->look_ang >> 1), weaponY + 230 - weaponYOffset, FIRSTGUN + 4,
2682
                                           weaponShade, weaponBits, weaponPal);
2685
                                           weaponShade, weaponBits, weaponPal);
2683
                else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 35 : 12))
2686
                else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 35 : 12))
2684
                {
2687
                {
2685
                    G_DrawWeaponTileWithID(currentWeapon << 1, 244 - ((*weaponFrame) << 3) - (pPlayer->look_ang >> 1),
2688
                    G_DrawWeaponTileWithID(currentWeapon << 1, 244 - ((*weaponFrame) << 3) - (pPlayer->look_ang >> 1),
2686
                                           weaponY + 130 - weaponYOffset + ((*weaponFrame) << 4), FIRSTGUN + 6, weaponShade,
2689
                                           weaponY + 130 - weaponYOffset + ((*weaponFrame) << 4), FIRSTGUN + 6, weaponShade,
2687
                                           weaponBits, weaponPal);
2690
                                           weaponBits, weaponPal);
2688
                    G_DrawWeaponTileWithID(currentWeapon, 224 - (pPlayer->look_ang >> 1), weaponY + 220 - weaponYOffset, FIRSTGUN + 5,
2691
                    G_DrawWeaponTileWithID(currentWeapon, 224 - (pPlayer->look_ang >> 1), weaponY + 220 - weaponYOffset, FIRSTGUN_5,
2689
                                           weaponShade, weaponBits, weaponPal);
2692
                                           weaponShade, weaponBits, weaponPal);
2690
                }
2693
                }
2691
                else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 30 : 7))
2694
                else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 30 : 7))
2692
                {
2695
                {
2693
                    G_DrawWeaponTileWithID(currentWeapon << 1, 124 + ((*weaponFrame) << 1) - (pPlayer->look_ang >> 1),
2696
                    G_DrawWeaponTileWithID(currentWeapon << 1, 124 + ((*weaponFrame) << 1) - (pPlayer->look_ang >> 1),
2694
                                           weaponY + 430 - weaponYOffset - ((*weaponFrame) << 3), FIRSTGUN + 6, weaponShade,
2697
                                           weaponY + 430 - weaponYOffset - ((*weaponFrame) << 3), FIRSTGUN + 6, weaponShade,
2695
                                           weaponBits, weaponPal);
2698
                                           weaponBits, weaponPal);
2696
                    G_DrawWeaponTileWithID(currentWeapon, 224 - (pPlayer->look_ang >> 1), weaponY + 220 - weaponYOffset, FIRSTGUN + 5,
2699
                    G_DrawWeaponTileWithID(currentWeapon, 224 - (pPlayer->look_ang >> 1), weaponY + 220 - weaponYOffset, FIRSTGUN_5,
2697
                                           weaponShade, weaponBits, weaponPal);
2700
                                           weaponShade, weaponBits, weaponPal);
2698
                }
2701
                }
2699
2702
2700
                else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 12 : 4))
2703
                else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 12 : 4))
2701
                {
2704
                {
2702
                    G_DrawWeaponTileWithID(currentWeapon << 2, 184 - (pPlayer->look_ang >> 1), weaponY + 235 - weaponYOffset,
2705
                    G_DrawWeaponTileWithID(currentWeapon << 2, 184 - (pPlayer->look_ang >> 1), weaponY + 235 - weaponYOffset,
2703
                                           FIRSTGUN + 8, weaponShade, weaponBits, weaponPal);
2706
                                           FIRSTGUN + 8, weaponShade, weaponBits, weaponPal);
2704
                    G_DrawWeaponTileWithID(currentWeapon, 224 - (pPlayer->look_ang >> 1), weaponY + 210 - weaponYOffset, FIRSTGUN + 5,
2707
                    G_DrawWeaponTileWithID(currentWeapon, 224 - (pPlayer->look_ang >> 1), weaponY + 210 - weaponYOffset, FIRSTGUN_5,
2705
                                           weaponShade, weaponBits, weaponPal);
2708
                                           weaponShade, weaponBits, weaponPal);
2706
                }
2709
                }
2707
                else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 6 : 2))
2710
                else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 6 : 2))
2708
                {
2711
                {
2709
                    G_DrawWeaponTileWithID(currentWeapon << 2, 164 - (pPlayer->look_ang >> 1), weaponY + 245 - weaponYOffset,
2712
                    G_DrawWeaponTileWithID(currentWeapon << 2, 164 - (pPlayer->look_ang >> 1), weaponY + 245 - weaponYOffset,
2710
                                           FIRSTGUN + 8, weaponShade, weaponBits, weaponPal);
2713
                                           FIRSTGUN + 8, weaponShade, weaponBits, weaponPal);
2711
                    G_DrawWeaponTileWithID(currentWeapon, 224 - (pPlayer->look_ang >> 1), weaponY + 220 - weaponYOffset, FIRSTGUN + 5,
2714
                    G_DrawWeaponTileWithID(currentWeapon, 224 - (pPlayer->look_ang >> 1), weaponY + 220 - weaponYOffset, FIRSTGUN_5,
2712
                                           weaponShade, weaponBits, weaponPal);
2715
                                           weaponShade, weaponBits, weaponPal);
2713
                }
2716
                }
2714
                else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload))
2717
                else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload))
2715
                    G_DrawWeaponTileWithID(currentWeapon, 194 - (pPlayer->look_ang >> 1), weaponY + 235 - weaponYOffset, FIRSTGUN + 5,
2718
                    G_DrawWeaponTileWithID(currentWeapon, 194 - (pPlayer->look_ang >> 1), weaponY + 235 - weaponYOffset, FIRSTGUN_5,
2716
                                           weaponShade, weaponBits, weaponPal);
2719
                                           weaponShade, weaponBits, weaponPal);
2717
2720
2718
                break;
2721
                break;
-
 
2722
            }
2719
2723
2720
            case HANDBOMB_WEAPON:
2724
            case HANDBOMB_WEAPON:
2721
                {
2725
                {
2722
                    static uint8_t pipebombFrames [] = { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
2726
                    static uint8_t pipebombFrames [] = { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
2723
2727
Line 2864... Line 2868...
2864
                                           weaponShade, weaponBits | 4, weaponPal);
2868
                                           weaponShade, weaponBits | 4, weaponPal);
2865
                }
2869
                }
2866
                break;
2870
                break;
2867
2871
2868
            case FREEZE_WEAPON:
2872
            case FREEZE_WEAPON:
2869
                if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING) && DUKE)
2873
                if (!WORLDTOUR && !(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING) && DUKE)
2870
                    weaponBits |= 512;
2874
                    weaponBits |= 512;
2871
2875
2872
                if ((*weaponFrame) < (PWEAPON(screenpeek, pPlayer->curr_weapon, TotalTime) + 1) && (*weaponFrame) > 0)
2876
                if ((*weaponFrame) < (PWEAPON(screenpeek, pPlayer->curr_weapon, TotalTime) + 1) && (*weaponFrame) > 0)
2873
                {
2877
                {
2874
                    static uint8_t freezerFrames[] = { 0, 0, 1, 1, 2, 2 };
2878
                    static uint8_t freezerFrames[] = { 0, 0, 1, 1, 2, 2 };
Line 2878... Line 2882...
2878
                        weaponX += rand() & 3;
2882
                        weaponX += rand() & 3;
2879
                        weaponY += rand() & 3;
2883
                        weaponY += rand() & 3;
2880
                    }
2884
                    }
2881
                    weaponYOffset -= 16;
2885
                    weaponYOffset -= 16;
2882
                    G_DrawWeaponTileWithID(currentWeapon << 1, weaponX + 210 - (pPlayer->look_ang >> 1), weaponY + 261 - weaponYOffset,
2886
                    G_DrawWeaponTileWithID(currentWeapon << 1, weaponX + 210 - (pPlayer->look_ang >> 1), weaponY + 261 - weaponYOffset,
2883
                                           FREEZE + 2, -32, weaponBits, weaponPal);
2887
                                           WORLDTOUR ? FREEZEFIREWIDE : FREEZE + 2, -32, weaponBits, weaponPal);
2884
                    G_DrawWeaponTileWithID(currentWeapon, weaponX + 210 - (pPlayer->look_ang >> 1), weaponY + 235 - weaponYOffset,
2888
                    G_DrawWeaponTileWithID(currentWeapon, weaponX + 210 - (pPlayer->look_ang >> 1), weaponY + 235 - weaponYOffset,
2885
                                           FREEZE + 3 + freezerFrames[*weaponFrame % 6], -32, weaponBits, weaponPal);
2889
                                           FREEZE + 3 + freezerFrames[*weaponFrame % 6], -32, weaponBits, weaponPal);
2886
                }
2890
                }
2887
                else
2891
                else
2888
                    G_DrawWeaponTileWithID(currentWeapon, weaponX + 210 - (pPlayer->look_ang >> 1), weaponY + 261 - weaponYOffset,
2892
                    G_DrawWeaponTileWithID(currentWeapon, weaponX + 210 - (pPlayer->look_ang >> 1), weaponY + 261 - weaponYOffset,
2889
                                           FREEZE, weaponShade, weaponBits, weaponPal);
2893
                                           WT_WIDE(FREEZE), weaponShade, weaponBits, weaponPal);
2890
                break;
2894
                break;
2891
2895
2892
            case FLAMETHROWER_WEAPON:
2896
            case FLAMETHROWER_WEAPON:
2893
                if ((*weaponFrame) < (PWEAPON(screenpeek, pPlayer->curr_weapon, TotalTime) + 1) && (*weaponFrame) >= 1 && sector[pPlayer->cursectnum].lotag != ST_2_UNDERWATER)
2897
                if ((*weaponFrame) < (PWEAPON(screenpeek, pPlayer->curr_weapon, TotalTime) + 1) && (*weaponFrame) >= 1 && sector[pPlayer->cursectnum].lotag != ST_2_UNDERWATER)
2894
                {
2898
                {
Line 2987... Line 2991...
2987
                    }
2991
                    }
2988
2992
2989
                    G_DrawWeaponTileUnfadedWithID(currentWeapon << 1, weaponX + 184 - halfLookAng, weaponY + 240 - weaponYOffset,
2993
                    G_DrawWeaponTileUnfadedWithID(currentWeapon << 1, weaponX + 184 - halfLookAng, weaponY + 240 - weaponYOffset,
2990
                                                  SHRINKER + 3 + ((*weaponFrame) & 3), -32, weaponBits, currentWeapon == GROW_WEAPON ? 2 : 0);
2994
                                                  SHRINKER + 3 + ((*weaponFrame) & 3), -32, weaponBits, currentWeapon == GROW_WEAPON ? 2 : 0);
2991
                    G_DrawWeaponTileWithID(currentWeapon, weaponX + 188 - halfLookAng, weaponY + 240 - weaponYOffset,
2995
                    G_DrawWeaponTileWithID(currentWeapon, weaponX + 188 - halfLookAng, weaponY + 240 - weaponYOffset,
2992
                                           currentWeapon == GROW_WEAPON ? SHRINKER - 1 : SHRINKER + 1, weaponShade, weaponBits, weaponPal);
2996
                                           WT_WIDE(SHRINKER) + (currentWeapon == GROW_WEAPON ? -1 : 1), weaponShade, weaponBits, weaponPal);
2993
                }
2997
                }
2994
                else
2998
                else
2995
                {
2999
                {
2996
                    G_DrawWeaponTileUnfadedWithID(currentWeapon << 1, weaponX + 184 - halfLookAng, weaponY + 240 - weaponYOffset,
3000
                    G_DrawWeaponTileUnfadedWithID(currentWeapon << 1, weaponX + 184 - halfLookAng, weaponY + 240 - weaponYOffset,
2997
                                                  SHRINKER + 2, 16 - (sintable[pPlayer->random_club_frame & 2047] >> 10), weaponBits,
3001
                                                  SHRINKER + 2, 16 - (sintable[pPlayer->random_club_frame & 2047] >> 10), weaponBits,
2998
                                                  currentWeapon == GROW_WEAPON ? 2 : 0);
3002
                                                  currentWeapon == GROW_WEAPON ? 2 : 0);
2999
                    G_DrawWeaponTileWithID(currentWeapon, weaponX + 188 - halfLookAng, weaponY + 240 - weaponYOffset,
3003
                    G_DrawWeaponTileWithID(currentWeapon, weaponX + 188 - halfLookAng, weaponY + 240 - weaponYOffset,
3000
                                           currentWeapon == GROW_WEAPON ? SHRINKER - 2 : SHRINKER, weaponShade, weaponBits, weaponPal);
3004
                                           WT_WIDE(SHRINKER) + (currentWeapon == GROW_WEAPON ? -2 : 0), weaponShade, weaponBits, weaponPal);
3001
                }
3005
                }
3002
                break;
3006
                break;
3003
            }
3007
            }
3004
#endif
3008
#endif
3005
        }
3009
        }