2020-05-19 22:35:52 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 1996, 2003 - 3D Realms Entertainment
|
|
|
|
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
|
2020-06-28 07:03:31 +00:00
|
|
|
Copyright (C) 2020 - Christoph Oelckers
|
2020-05-19 22:35:52 +00:00
|
|
|
|
|
|
|
This file is part of Enhanced Duke Nukem 3D version 1.5 - Atomic Edition
|
|
|
|
|
|
|
|
Duke Nukem 3D is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
aint with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
Original Source: 1996 - Todd Replogle
|
|
|
|
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
|
|
|
|
|
|
|
EDuke enhancements integrated: 04/13/2003 - Matt Saettler
|
|
|
|
|
|
|
|
Note: EDuke source was in transition. Changes are in-progress in the
|
|
|
|
source as it is released.
|
|
|
|
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#include "ns.h"
|
|
|
|
#include "global.h"
|
2020-07-03 21:56:14 +00:00
|
|
|
#include "names_d.h"
|
2020-10-23 18:42:20 +00:00
|
|
|
#include "dukeactor.h"
|
2020-05-19 22:35:52 +00:00
|
|
|
|
|
|
|
BEGIN_DUKE_NS
|
2021-12-30 09:30:21 +00:00
|
|
|
|
2021-04-15 03:35:42 +00:00
|
|
|
inline static double getavel(int snum)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2021-04-15 06:34:24 +00:00
|
|
|
return PlayerInputAngVel(snum) * (2048. / 360.);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2022-10-17 00:01:17 +00:00
|
|
|
inline static void hud_drawpal(double x, double y, int tilenum, int shade, int orientation, int p, DAngle angle)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 05:06:05 +00:00
|
|
|
hud_drawsprite(x, y, 65536, angle.Buildfang(), tilenum, shade, p, 2 | orientation);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2022-09-07 05:34:55 +00:00
|
|
|
static void displayloogie(player_struct* p, double const interpfrac)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2021-04-15 06:34:24 +00:00
|
|
|
if (p->loogcnt == 0) return;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-09-07 05:34:55 +00:00
|
|
|
const double loogi = interpolatedvalue<double>(p->oloogcnt, p->loogcnt, interpfrac);
|
2022-06-06 01:24:38 +00:00
|
|
|
const double y = loogi * 4.;
|
|
|
|
|
2021-05-12 15:33:33 +00:00
|
|
|
for (int i = 0; i < p->numloogs; i++)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-09-15 17:17:27 +00:00
|
|
|
const double a = fabs(BobVal((loogi + i) * 32.) * 512);
|
2022-06-06 01:24:38 +00:00
|
|
|
const double z = 4096. + ((loogi + i) * 512.);
|
2022-09-15 17:17:27 +00:00
|
|
|
const double x = -getavel(p->GetPlayerNum()) + BobVal((loogi + i) * 64.) * 16;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2021-12-30 11:47:19 +00:00
|
|
|
hud_drawsprite((p->loogie[i].X + x), (200 + p->loogie[i].Y - y), z - (i << 8), 256 - a, LOOGIE, 0, 0, 2);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2022-10-13 13:00:36 +00:00
|
|
|
static bool animatefist(int gs, player_struct* p, double xoffset, double yoffset, int fistpal, double const interpfrac)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-09-07 05:34:55 +00:00
|
|
|
const double fisti = min(interpolatedvalue<double>(p->ofist_incs, p->fist_incs, interpfrac), 32.);
|
2022-06-05 23:57:44 +00:00
|
|
|
if (fisti <= 0) return false;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2020-07-06 13:52:09 +00:00
|
|
|
hud_drawsprite(
|
2022-10-13 13:00:36 +00:00
|
|
|
(-fisti + 222 + xoffset),
|
|
|
|
(yoffset + 194 + BobVal((6 + fisti) * 128.) * 32),
|
2022-09-15 17:23:47 +00:00
|
|
|
clamp(65536. - 65536. * BobVal(512 + fisti * 64.), 40920., 90612.), 0, FIST, gs, fistpal, 2);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-06-05 23:57:44 +00:00
|
|
|
return true;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2022-10-14 06:43:15 +00:00
|
|
|
static bool animateknee(int gs, player_struct* p, double xoffset, double yoffset, int pal, double const interpfrac, DAngle angle)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-06-05 23:57:44 +00:00
|
|
|
if (p->knee_incs > 11 || p->knee_incs == 0 || p->GetActor()->spr.extra <= 0) return false;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2021-11-07 12:30:32 +00:00
|
|
|
static const int8_t knee_y[] = { 0,-8,-16,-32,-64,-84,-108,-108,-108,-72,-32,-8 };
|
2022-09-07 05:34:55 +00:00
|
|
|
const double kneei = interpolatedvalue<double>(knee_y[p->oknee_incs], knee_y[p->knee_incs], interpfrac);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-14 06:43:15 +00:00
|
|
|
hud_drawpal(105 + (kneei * 0.25) + xoffset, 280 + kneei + yoffset, KNEE, gs, 4, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-06-05 23:57:44 +00:00
|
|
|
return true;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2022-10-14 06:39:20 +00:00
|
|
|
static bool animateknuckles(int gs, player_struct* p, double xoffset, double yoffset, int pal, DAngle angle)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-06-05 23:57:44 +00:00
|
|
|
if (isWW2GI() || p->over_shoulder_on != 0 || p->knuckle_incs == 0 || p->GetActor()->spr.extra <= 0) return false;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2021-11-07 12:30:32 +00:00
|
|
|
static const uint8_t knuckle_frames[] = { 0,1,2,2,3,3,3,2,2,1,0 };
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-14 06:39:20 +00:00
|
|
|
hud_drawpal(160 + xoffset, 180 + yoffset, CRACKKNUCKLES + knuckle_frames[p->knuckle_incs >> 1], gs, 4, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-06-05 23:57:44 +00:00
|
|
|
return true;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2022-09-07 05:34:55 +00:00
|
|
|
void displaymasks_d(int snum, int p, double interpfrac)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
if (ps[snum].scuba_on)
|
|
|
|
{
|
2020-11-23 07:39:49 +00:00
|
|
|
int y = 200 - tileHeight(SCUBAMASK);
|
|
|
|
hud_drawsprite(44, y, 65536, 0, SCUBAMASK, 0, p, 2 + 16);
|
|
|
|
hud_drawsprite((320 - 43), y, 65536, 0, SCUBAMASK, 0, p, 2 + 4 + 16);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2022-10-14 06:41:26 +00:00
|
|
|
static bool animatetip(int gs, player_struct* p, double xoffset, double yoffset, int pal, double const interpfrac, DAngle angle)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-06-05 23:57:44 +00:00
|
|
|
if (p->tipincs == 0) return false;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2021-11-07 12:30:32 +00:00
|
|
|
static const int8_t tip_y[] = { 0,-8,-16,-32,-64,-84,-108,-108,-108,-108,-108,-108,-108,-108,-108,-108,-96,-72,-64,-32,-16 };
|
2022-09-07 05:34:55 +00:00
|
|
|
const double tipi = interpolatedvalue<double>(tip_y[p->otipincs], tip_y[p->tipincs], interpfrac) * 0.5;
|
2022-06-05 23:40:47 +00:00
|
|
|
|
2022-10-14 06:41:26 +00:00
|
|
|
hud_drawpal(170 + xoffset, 240 + tipi + yoffset, TIP + ((26 - p->tipincs) >> 4), gs, 0, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-06-05 23:57:44 +00:00
|
|
|
return true;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2022-10-14 06:42:30 +00:00
|
|
|
static bool animateaccess(int gs, player_struct* p, double xoffset, double yoffset, double const interpfrac, DAngle angle)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-06-05 23:57:44 +00:00
|
|
|
if (p->access_incs == 0 || p->GetActor()->spr.extra <= 0) return false;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2021-11-07 12:30:32 +00:00
|
|
|
static const int8_t access_y[] = {0,-8,-16,-32,-64,-84,-108,-108,-108,-108,-108,-108,-108,-108,-108,-108,-96,-72,-64,-32,-16};
|
2022-09-07 05:34:55 +00:00
|
|
|
const double accessi = interpolatedvalue<double>(access_y[p->oaccess_incs], access_y[p->access_incs], interpfrac);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-06-05 23:47:30 +00:00
|
|
|
const int pal = p->access_spritenum != nullptr ? p->access_spritenum->spr.pal : 0;
|
2021-04-23 17:36:55 +00:00
|
|
|
|
2022-06-05 23:57:44 +00:00
|
|
|
if ((p->access_incs-3) > 0 && (p->access_incs-3)>>3)
|
2022-10-14 06:42:30 +00:00
|
|
|
hud_drawpal(170 + (accessi * 0.25) + xoffset, 266 + accessi + yoffset, HANDHOLDINGLASER + (p->access_incs >> 3), gs, 0, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
else
|
2022-10-14 06:42:30 +00:00
|
|
|
hud_drawpal(170 + (accessi * 0.25) + xoffset, 266 + accessi + yoffset, HANDHOLDINGACCESS, gs, 4, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-06-05 23:57:44 +00:00
|
|
|
return true;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2022-09-07 05:34:55 +00:00
|
|
|
void displayweapon_d(int snum, double interpfrac)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-17 00:01:17 +00:00
|
|
|
int pal, pal2;
|
|
|
|
player_struct* p = &ps[snum];
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-17 00:01:17 +00:00
|
|
|
if (p->newOwner != nullptr || ud.cameraactor != nullptr || p->over_shoulder_on > 0 || (p->GetActor()->spr.pal != 1 && p->GetActor()->spr.extra <= 0))
|
|
|
|
return;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-17 00:01:17 +00:00
|
|
|
double weapon_sway, gun_pos, kickback_pic, random_club_frame, hard_landing;
|
|
|
|
auto kb = &p->kickback_pic;
|
|
|
|
int o = 0;
|
2022-10-13 05:06:05 +00:00
|
|
|
|
2021-04-15 03:35:42 +00:00
|
|
|
if (cl_hudinterpolation)
|
|
|
|
{
|
2022-09-07 05:34:55 +00:00
|
|
|
weapon_sway = interpolatedvalue<double>(p->oweapon_sway, p->weapon_sway, interpfrac);
|
|
|
|
kickback_pic = interpolatedvalue<double>(p->okickback_pic, p->kickback_pic, interpfrac);
|
|
|
|
random_club_frame = interpolatedvalue<double>(p->orandom_club_frame, p->random_club_frame, interpfrac);
|
|
|
|
hard_landing = interpolatedvalue<double>(p->ohard_landing, p->hard_landing, interpfrac);
|
|
|
|
gun_pos = 80 - interpolatedvalue<double>(p->oweapon_pos * p->oweapon_pos, p->weapon_pos * p->weapon_pos, interpfrac);
|
2021-04-15 03:35:42 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
weapon_sway = p->weapon_sway;
|
|
|
|
kickback_pic = p->kickback_pic;
|
|
|
|
random_club_frame = p->random_club_frame;
|
|
|
|
hard_landing = p->hard_landing;
|
|
|
|
gun_pos = 80 - (p->weapon_pos * p->weapon_pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
hard_landing *= 8.;
|
2022-10-17 00:01:17 +00:00
|
|
|
gun_pos -= fabs(p->GetActor()->spr.scale.X < 0.5 ? BobVal(weapon_sway * 4.) * 32 : BobVal(weapon_sway * 0.5) * 16) + hard_landing;
|
2021-04-15 03:35:42 +00:00
|
|
|
|
2022-10-17 00:01:17 +00:00
|
|
|
auto offsets = p->angle.weaponoffsets(interpfrac);
|
|
|
|
auto horiz = !SyncInput() ? p->horizon.sum() : p->horizon.interpolatedsum(interpfrac);
|
|
|
|
auto pitchoffset = interpolatedvalue(0., 16., horiz / DAngle90);
|
|
|
|
auto yawinput = getavel(snum) * (1. / 16.);
|
|
|
|
auto angle = p->angle.renderrotscrn(interpfrac);
|
|
|
|
auto weapon_xoffset = 160 - 90 - (BobVal(512 + weapon_sway * 0.5) * (16384. / 1536.)) - 58 - p->weapon_ang;
|
|
|
|
auto shade = min(p->GetActor()->spr.shade, (int8_t)24);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-24 18:14:31 +00:00
|
|
|
pal2 = pal = !p->insector() ? 0 : p->GetActor()->spr.pal == 1 ? 1 : p->cursector->floorpal;
|
2022-10-17 00:01:17 +00:00
|
|
|
if (pal2 == 0) pal2 = p->palookup;
|
2021-04-15 05:49:36 +00:00
|
|
|
|
2022-10-17 00:01:17 +00:00
|
|
|
auto animoffs = offsets + DVector2(yawinput, -hard_landing + pitchoffset);
|
2020-08-03 07:06:28 +00:00
|
|
|
|
2022-10-17 00:01:17 +00:00
|
|
|
if (animatefist(shade, p, yawinput, offsets.Y, pal, interpfrac))
|
|
|
|
return;
|
|
|
|
if (animateknuckles(shade, p, animoffs.X, animoffs.Y, pal, angle))
|
|
|
|
return;
|
|
|
|
if (animatetip(shade, p, animoffs.X, animoffs.Y, pal, interpfrac, angle))
|
|
|
|
return;
|
|
|
|
if (animateaccess(shade, p, animoffs.X, animoffs.Y, interpfrac, angle))
|
2020-05-19 22:35:52 +00:00
|
|
|
return;
|
|
|
|
|
2022-10-17 00:01:17 +00:00
|
|
|
animateknee(shade, p, animoffs.X, animoffs.Y, pal2, interpfrac, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-16 23:16:12 +00:00
|
|
|
offsets.X += weapon_xoffset;
|
|
|
|
offsets.Y -= gun_pos;
|
|
|
|
|
2022-10-17 00:01:17 +00:00
|
|
|
int cw = p->last_weapon >= 0 ? p->last_weapon : p->curr_weapon;
|
|
|
|
if (isWW2GI()) cw = aplWeaponWorksLike(cw, snum);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
|
|
|
// onevent should go here..
|
|
|
|
// rest of code should be moved to CON..
|
2022-10-17 00:01:17 +00:00
|
|
|
int quick_kick = 14 - p->quick_kick;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-17 00:01:17 +00:00
|
|
|
if (quick_kick != 14 || p->last_quick_kick)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-17 00:01:17 +00:00
|
|
|
if (quick_kick < 5 || quick_kick > 9)
|
2020-07-26 08:18:55 +00:00
|
|
|
{
|
2022-10-16 23:16:12 +00:00
|
|
|
hud_drawpal(80 + offsets.X, 250 + offsets.Y, KNEE, shade, o | 4, pal2, angle);
|
2020-07-26 08:18:55 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-16 23:16:12 +00:00
|
|
|
hud_drawpal(160 - 16 + offsets.X, 214 + offsets.Y, KNEE + 1, shade, o | 4, pal2, angle);
|
2020-07-26 08:18:55 +00:00
|
|
|
}
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
2022-10-07 21:33:37 +00:00
|
|
|
if (p->GetActor()->spr.scale.X < 0.625)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
//shrunken..
|
2022-10-16 23:16:12 +00:00
|
|
|
animateshrunken(p, 0, offsets.Y + gun_pos, -offsets.X, FIST, shade, o, interpfrac);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-14 01:19:36 +00:00
|
|
|
auto weapTotalTime = aplWeaponTotalTime(p->curr_weapon, snum);
|
|
|
|
auto weapFireDelay = aplWeaponFireDelay(p->curr_weapon, snum);
|
|
|
|
auto weapReload = aplWeaponReload(p->curr_weapon, snum);
|
|
|
|
|
2020-05-19 22:35:52 +00:00
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displayknee = [&]()
|
|
|
|
{
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb > 0)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb < 5 || *kb > 9)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 05:38:37 +00:00
|
|
|
hud_drawpal(220 + offsets.X, 250 + offsets.Y, KNEE, shade, o, pal2, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-13 05:38:37 +00:00
|
|
|
hud_drawpal(160 + offsets.X, 214 + offsets.Y, KNEE + 1, shade, o, pal2, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displaytripbomb = [&]()
|
|
|
|
{
|
2022-10-16 23:16:12 +00:00
|
|
|
offsets.X += 8;
|
|
|
|
offsets.Y -= 10;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb > 6)
|
2022-10-13 08:53:49 +00:00
|
|
|
offsets.Y += kickback_pic * 8.;
|
2020-08-03 04:21:30 +00:00
|
|
|
else if (*kb < 4)
|
2022-10-13 08:53:49 +00:00
|
|
|
hud_drawpal(142 + offsets.X, 234 + offsets.Y, HANDHOLDINGLASER + 3, shade, o, pal, angle);
|
|
|
|
|
|
|
|
hud_drawpal(130 + offsets.X, 249 + offsets.Y, HANDHOLDINGLASER + (*kb >> 2), shade, o, pal, angle);
|
|
|
|
hud_drawpal(152 + offsets.X, 249 + offsets.Y, HANDHOLDINGLASER + (*kb >> 2), shade, o | 4, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displayrpg = [&]()
|
|
|
|
{
|
2022-10-17 00:01:17 +00:00
|
|
|
const int pin = ((gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-16 23:16:12 +00:00
|
|
|
offsets -= BobVal(768 + (kickback_pic * 128.)) * 8;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
|
|
|
if (*kb > 0)
|
|
|
|
{
|
2022-10-14 01:18:03 +00:00
|
|
|
if (*kb < (isWW2GI() ? weapTotalTime : 8))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 05:39:19 +00:00
|
|
|
hud_drawpal(164 + offsets.X, 176 + offsets.Y, RPGGUN + (*kb >> 1), shade, o | pin, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else if (isWW2GI())
|
|
|
|
{
|
|
|
|
// else we are in 'reload time'
|
2022-10-14 01:19:36 +00:00
|
|
|
if (*kb < ((weapReload - weapTotalTime) / 2 + weapTotalTime))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// down
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 10 * (kickback_pic - weapTotalTime); //D
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// up and left
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 10 * (weapReload - kickback_pic); //U
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-13 05:39:19 +00:00
|
|
|
hud_drawpal(164 + offsets.X, 176 + offsets.Y, RPGGUN, shade, o | pin, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displayshotgun_ww = [&]()
|
|
|
|
{
|
2022-10-16 23:16:12 +00:00
|
|
|
offsets.X -= 8;
|
2022-10-13 22:19:59 +00:00
|
|
|
|
2020-05-19 22:35:52 +00:00
|
|
|
if (*kb > 0)
|
2022-10-13 22:19:59 +00:00
|
|
|
offsets.Y += BobVal(kickback_pic * 128.) * 4;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2021-12-21 17:19:45 +00:00
|
|
|
if (*kb > 0 && p->GetActor()->spr.pal != 1)
|
2022-10-13 22:19:59 +00:00
|
|
|
offsets.X += 1 - (rand() & 3);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-13 22:19:59 +00:00
|
|
|
int pic = SHOTGUN;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
|
|
|
if (*kb == 0)
|
|
|
|
{
|
2022-10-13 22:19:59 +00:00
|
|
|
// Just fall through here.
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-14 01:18:03 +00:00
|
|
|
else if (*kb <= weapTotalTime)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 22:19:59 +00:00
|
|
|
pic += 1;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
// else we are in 'reload time'
|
2022-10-14 01:19:36 +00:00
|
|
|
else if (*kb < ((weapReload - weapTotalTime) / 2 + weapTotalTime))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// down
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 10 * (kickback_pic - weapTotalTime); //D
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// up and left
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 10 * (weapReload - kickback_pic); //U
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-13 22:19:59 +00:00
|
|
|
|
|
|
|
hud_drawpal(146 + offsets.X, 202 + offsets.Y, pic, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displayshotgun = [&]()
|
|
|
|
{
|
2022-10-16 23:16:12 +00:00
|
|
|
offsets.X -= 8;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2020-08-03 04:21:30 +00:00
|
|
|
switch(*kb)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
case 2:
|
2022-10-13 06:29:20 +00:00
|
|
|
hud_drawpal(168 + offsets.X, 201 + offsets.Y, SHOTGUN + 2, -128, o, pal, angle);
|
2021-11-14 11:25:25 +00:00
|
|
|
[[fallthrough]];
|
2020-05-19 22:35:52 +00:00
|
|
|
case 0:
|
|
|
|
case 6:
|
|
|
|
case 7:
|
|
|
|
case 8:
|
2022-10-13 06:29:20 +00:00
|
|
|
hud_drawpal(146 + offsets.X, 202 + offsets.Y, SHOTGUN, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
case 4:
|
|
|
|
case 5:
|
|
|
|
case 9:
|
|
|
|
case 10:
|
|
|
|
case 11:
|
|
|
|
case 12:
|
|
|
|
if (*kb > 1 && *kb < 5)
|
|
|
|
{
|
2022-10-13 06:29:20 +00:00
|
|
|
offsets.Y += 40;
|
|
|
|
offsets.X += 20;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-13 06:29:20 +00:00
|
|
|
hud_drawpal(178 + offsets.X, 194 + offsets.Y, SHOTGUN + 1 + ((*(kb)-1) >> 1), -128, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-13 06:29:20 +00:00
|
|
|
hud_drawpal(158 + offsets.X, 220 + offsets.Y, SHOTGUN + 3, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
break;
|
|
|
|
case 13:
|
|
|
|
case 14:
|
|
|
|
case 15:
|
2022-10-13 06:29:20 +00:00
|
|
|
hud_drawpal(198 + offsets.X, 210 + offsets.Y, SHOTGUN + 4, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
break;
|
|
|
|
case 16:
|
|
|
|
case 17:
|
|
|
|
case 18:
|
|
|
|
case 19:
|
2022-10-13 06:29:20 +00:00
|
|
|
hud_drawpal(234 + offsets.X, 196 + offsets.Y, SHOTGUN + 5, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
break;
|
|
|
|
case 20:
|
|
|
|
case 21:
|
|
|
|
case 22:
|
|
|
|
case 23:
|
2022-10-13 06:29:20 +00:00
|
|
|
hud_drawpal(240 + offsets.X, 196 + offsets.Y, SHOTGUN + 6, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
break;
|
|
|
|
case 24:
|
|
|
|
case 25:
|
|
|
|
case 26:
|
|
|
|
case 27:
|
2022-10-13 06:29:20 +00:00
|
|
|
hud_drawpal(234 + offsets.X, 196 + offsets.Y, SHOTGUN + 5, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
break;
|
|
|
|
case 28:
|
|
|
|
case 29:
|
|
|
|
case 30:
|
2022-10-13 06:29:20 +00:00
|
|
|
hud_drawpal(188 + offsets.X, 206 + offsets.Y, SHOTGUN + 4, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displaychaingun_ww = [&]()
|
|
|
|
{
|
|
|
|
if (*kb > 0)
|
2022-10-13 22:17:21 +00:00
|
|
|
offsets.Y += BobVal(kickback_pic * 128.) * 4;
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-13 22:17:21 +00:00
|
|
|
if (*kb > 0 && p->GetActor()->spr.pal != 1)
|
|
|
|
offsets.X += 1 - (rand() & 3);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
|
|
|
if (*kb == 0)
|
|
|
|
{
|
2022-10-13 22:17:21 +00:00
|
|
|
hud_drawpal(178 + offsets.X, 233 + offsets.Y, CHAINGUN + 1, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-14 01:18:03 +00:00
|
|
|
else if (*kb <= weapTotalTime)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 22:17:21 +00:00
|
|
|
hud_drawpal(188 + offsets.X, 243 + offsets.Y, CHAINGUN + 2, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-13 22:17:21 +00:00
|
|
|
// else we are in 'reload time', divide reload time into fifths.
|
|
|
|
// 1) move weapon up/right, hand on clip (2519)
|
|
|
|
// 2) move weapon up/right, hand removing clip (2518)
|
|
|
|
// 3) hold weapon up/right, hand removed clip (2517)
|
|
|
|
// 4) hold weapon up/right, hand inserting clip (2518)
|
|
|
|
// 5) move weapon down/left, clip inserted (2519)
|
|
|
|
|
|
|
|
double adj;
|
|
|
|
int pic;
|
2022-10-14 01:19:36 +00:00
|
|
|
const int iFifths = max((weapReload - weapTotalTime) / 5, 1);
|
2022-10-13 22:17:21 +00:00
|
|
|
|
2022-10-14 01:19:36 +00:00
|
|
|
if (*kb < (iFifths + weapTotalTime))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// first segment
|
2022-10-13 22:17:21 +00:00
|
|
|
pic = 2519;
|
2022-10-14 01:19:36 +00:00
|
|
|
adj = 80 - (10 * (weapTotalTime + iFifths - kickback_pic));
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-14 01:19:36 +00:00
|
|
|
else if (*kb < (iFifths * 2 + weapTotalTime))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 22:17:21 +00:00
|
|
|
// second segment (down)
|
|
|
|
pic = 2518;
|
|
|
|
adj = 80;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-14 01:19:36 +00:00
|
|
|
else if (*kb < (iFifths * 3 + weapTotalTime))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 22:17:21 +00:00
|
|
|
// third segment (up)
|
|
|
|
pic = 2517;
|
|
|
|
adj = 80;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-14 01:19:36 +00:00
|
|
|
else if (*kb < (iFifths * 4 + weapTotalTime))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 22:17:21 +00:00
|
|
|
// fourth segment (down)
|
|
|
|
pic = 2518;
|
|
|
|
adj = 80;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// up and left
|
2022-10-13 22:17:21 +00:00
|
|
|
pic = 2519;
|
2022-10-14 01:19:36 +00:00
|
|
|
adj = 10 * (weapReload - kickback_pic);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-13 22:17:21 +00:00
|
|
|
|
|
|
|
hud_drawpal(168 + offsets.X + adj, 260 + offsets.Y - adj, pic, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displaychaingun = [&]
|
|
|
|
{
|
|
|
|
if (*kb > 0)
|
2022-10-13 23:15:25 +00:00
|
|
|
offsets.Y += BobVal(kickback_pic * 128.) * 4;
|
|
|
|
|
|
|
|
if (*kb > 0 && p->GetActor()->spr.pal != 1)
|
|
|
|
offsets.X += 1 - (rand() & 3);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2022-10-13 23:15:25 +00:00
|
|
|
hud_drawpal(168 + offsets.X, 260 + offsets.Y, CHAINGUN, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2020-08-03 04:21:30 +00:00
|
|
|
switch(*kb)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
case 0:
|
2022-10-13 23:15:25 +00:00
|
|
|
hud_drawpal(178 + offsets.X, 233 + offsets.Y, CHAINGUN + 1, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
if (*kb > 4 && *kb < 12)
|
|
|
|
{
|
2022-10-13 23:15:25 +00:00
|
|
|
auto rnd = p->GetActor()->spr.pal != 1 ? rand() & 7 : 0;
|
|
|
|
hud_drawpal(136 + offsets.X + rnd, 208 + offsets.Y + rnd - (kickback_pic * 0.5), CHAINGUN + 5 + ((*kb - 4) / 5), shade, o, pal, angle);
|
|
|
|
|
|
|
|
if (p->GetActor()->spr.pal != 1) rnd = rand() & 7;
|
|
|
|
hud_drawpal(180 + offsets.X + rnd, 208 + offsets.Y + rnd - (kickback_pic * 0.5), CHAINGUN + 5 + ((*kb - 4) / 5), shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-13 23:15:25 +00:00
|
|
|
|
2020-05-19 22:35:52 +00:00
|
|
|
if (*kb < 8)
|
|
|
|
{
|
2022-10-13 23:15:25 +00:00
|
|
|
auto rnd = rand() & 7;
|
|
|
|
hud_drawpal(158 + offsets.X + rnd, 208 + offsets.Y + rnd - (kickback_pic * 0.5), CHAINGUN + 5 + ((*kb - 2) / 5), shade, o, pal, angle);
|
|
|
|
hud_drawpal(178 + offsets.X, 233 + offsets.Y, CHAINGUN + 1 + (*kb >> 1), shade, o, pal, angle);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
hud_drawpal(178 + offsets.X, 233 + offsets.Y, CHAINGUN + 1, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displaypistol = [&]()
|
|
|
|
{
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb < 5)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 05:06:05 +00:00
|
|
|
static constexpr uint8_t kb_frames[] = { 0,1,2,0,0 };
|
2022-10-16 23:16:12 +00:00
|
|
|
hud_drawpal((195 - 12 - (*kb == 2) * 3) + offsets.X, 244 + offsets.Y, FIRSTGUN + kb_frames[*kb], shade, 2, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-17 00:01:17 +00:00
|
|
|
const int pin = (isWW2GI() || (gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
|
2022-10-13 05:06:05 +00:00
|
|
|
const int pic_5 = FIRSTGUN+5;
|
2020-05-19 22:35:52 +00:00
|
|
|
const int WEAPON2_RELOAD_TIME = 50;
|
2022-10-13 05:06:05 +00:00
|
|
|
const int reload_time = isWW2GI() ? aplWeaponReload(PISTOL_WEAPON, snum) : WEAPON2_RELOAD_TIME;
|
|
|
|
|
2022-10-16 23:16:12 +00:00
|
|
|
offsets.X -= weapon_xoffset;
|
|
|
|
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb < 10)
|
2022-10-13 05:06:05 +00:00
|
|
|
{
|
|
|
|
hud_drawpal(194 + offsets.X, 230 + offsets.Y, FIRSTGUN + 4, shade, o | pin, pal, angle);
|
|
|
|
}
|
2020-08-03 04:21:30 +00:00
|
|
|
else if (*kb < 15)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 05:06:05 +00:00
|
|
|
hud_drawpal(244 + offsets.X - (kickback_pic * 8.), 130 + offsets.Y + (kickback_pic * 16.), FIRSTGUN + 6, shade, o | pin, pal, angle);
|
|
|
|
hud_drawpal(224 + offsets.X, 220 + offsets.Y, pic_5, shade, o | pin, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2020-08-03 04:21:30 +00:00
|
|
|
else if (*kb < 20)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 05:06:05 +00:00
|
|
|
hud_drawpal(124 + offsets.X + (kickback_pic * 2.), 430 + offsets.Y - (kickback_pic * 8.), FIRSTGUN + 6, shade, o | pin, pal, angle);
|
|
|
|
hud_drawpal(224 + offsets.X, 220 + offsets.Y, pic_5, shade, o | pin, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2020-09-28 06:55:59 +00:00
|
|
|
else if (*kb < (isNamWW2GI()? (reload_time - 12) : 23))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 05:06:05 +00:00
|
|
|
hud_drawpal(184 + offsets.X, 235 + offsets.Y, FIRSTGUN + 8, shade, o | pin, pal, angle);
|
|
|
|
hud_drawpal(224 + offsets.X, 210 + offsets.Y, pic_5, shade, o | pin, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2020-09-28 06:55:59 +00:00
|
|
|
else if (*kb < (isNamWW2GI()? (reload_time - 6) : 25))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 05:06:05 +00:00
|
|
|
hud_drawpal(164 + offsets.X, 245 + offsets.Y, FIRSTGUN + 8, shade, o | pin, pal, angle);
|
|
|
|
hud_drawpal(224 + offsets.X, 220 + offsets.Y, pic_5, shade, o | pin, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2020-09-28 06:55:59 +00:00
|
|
|
else if (*kb < (isNamWW2GI()? reload_time : 27))
|
2022-10-13 05:06:05 +00:00
|
|
|
{
|
|
|
|
hud_drawpal(194 + offsets.X, 235 + offsets.Y, pic_5, shade, o, pal, angle);
|
|
|
|
}
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displayhandbomb = [&]()
|
|
|
|
{
|
2022-10-13 08:39:24 +00:00
|
|
|
int pic = HANDTHROW;
|
|
|
|
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 08:39:24 +00:00
|
|
|
static constexpr uint8_t throw_frames[] = { 0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2 };
|
2020-05-19 22:35:52 +00:00
|
|
|
|
|
|
|
if (isWW2GI())
|
|
|
|
{
|
2022-10-14 01:16:55 +00:00
|
|
|
if (*kb <= weapFireDelay)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// it holds here
|
2022-10-13 08:39:24 +00:00
|
|
|
offsets.Y += 5 * kickback_pic; //D
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-14 01:16:55 +00:00
|
|
|
else if (*kb < ((weapTotalTime - weapFireDelay) / 2 + weapFireDelay))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// up and left
|
2022-10-14 01:16:55 +00:00
|
|
|
offsets.Y -= 10 * (kickback_pic - weapFireDelay); //U
|
|
|
|
offsets.X += 80 * (kickback_pic - weapFireDelay);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-14 01:16:55 +00:00
|
|
|
else if (*kb < weapTotalTime)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// move left
|
2022-10-13 08:39:24 +00:00
|
|
|
offsets.Y -= 240; // start high
|
2022-10-14 01:16:55 +00:00
|
|
|
offsets.Y += 12 * (kickback_pic - weapFireDelay); //D
|
|
|
|
weapon_xoffset += 90 - (5 * (weapTotalTime - kickback_pic));
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb < 7)
|
2022-10-13 08:39:24 +00:00
|
|
|
offsets.Y += 10 * kickback_pic; //D
|
2020-08-03 04:21:30 +00:00
|
|
|
else if (*kb < 12)
|
2022-10-13 08:39:24 +00:00
|
|
|
offsets.Y -= 20 * (kickback_pic - 10); //U
|
2020-08-03 04:21:30 +00:00
|
|
|
else if (*kb < 20)
|
2022-10-13 08:39:24 +00:00
|
|
|
offsets.Y += 9 * (kickback_pic - 14); //D
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-13 08:39:24 +00:00
|
|
|
|
|
|
|
pic += throw_frames[*kb];
|
|
|
|
offsets.Y -= 10;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-13 08:39:24 +00:00
|
|
|
|
|
|
|
hud_drawpal(190 + offsets.X, 260 + offsets.Y, pic, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displayhandremote = [&]()
|
|
|
|
{
|
2022-10-13 13:44:46 +00:00
|
|
|
static constexpr uint8_t remote_frames[] = { 0,1,1,2,1,1,0,0,0,0,0 };
|
|
|
|
hud_drawpal(102 + offsets.X, 258 + offsets.Y, HANDREMOTE + (*kb ? remote_frames[*kb] : 0), shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displaydevastator_ww = [&]
|
|
|
|
{
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-14 01:19:36 +00:00
|
|
|
if (*kb < weapTotalTime)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-17 00:01:17 +00:00
|
|
|
const int i = Sgn(*kb >> 2);
|
|
|
|
|
2020-05-19 22:35:52 +00:00
|
|
|
if (p->ammo_amount[p->curr_weapon] & 1)
|
|
|
|
{
|
2022-10-13 09:07:54 +00:00
|
|
|
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle);
|
|
|
|
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR + i, -32, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-13 09:07:54 +00:00
|
|
|
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR + i, -32, o | 4, pal, angle);
|
|
|
|
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// else we are in 'reload time'
|
2022-10-14 01:19:36 +00:00
|
|
|
else if (*kb < ((weapReload - weapTotalTime) / 2 + weapTotalTime))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// down
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 10 * (kickback_pic - weapTotalTime); //D
|
2022-10-13 09:07:54 +00:00
|
|
|
// offsets.X += 80 * (*kb - aplWeaponTotalTime[cw][snum]);
|
|
|
|
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle);
|
|
|
|
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// up and left
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 10 * (weapReload - kickback_pic); //U
|
2022-10-13 09:07:54 +00:00
|
|
|
// offsets.X += 80 * (*kb - aplWeaponTotalTime[cw][snum]);
|
|
|
|
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle);
|
|
|
|
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-13 09:07:54 +00:00
|
|
|
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle);
|
|
|
|
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displaydevastator = [&]
|
|
|
|
{
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 09:56:24 +00:00
|
|
|
static constexpr uint8_t cycloidy[] = { 0,4,12,24,12,4,0 };
|
2022-10-17 00:01:17 +00:00
|
|
|
const int i = Sgn(*kb >> 2);
|
2020-05-19 22:35:52 +00:00
|
|
|
|
|
|
|
if (p->hbomb_hold_delay)
|
|
|
|
{
|
2022-10-13 09:56:24 +00:00
|
|
|
hud_drawpal(268 + offsets.X + (cycloidy[*kb] >> 1), 238 + offsets.Y + cycloidy[*kb], DEVISTATOR + i, -32, o, pal, angle);
|
|
|
|
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-13 09:56:24 +00:00
|
|
|
hud_drawpal(30 + offsets.X - (cycloidy[*kb] >> 1), 240 + offsets.Y + cycloidy[*kb], DEVISTATOR + i, -32, o | 4, pal, angle);
|
|
|
|
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-13 09:56:24 +00:00
|
|
|
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle);
|
|
|
|
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displayfreezer = [&]
|
|
|
|
{
|
2022-10-17 00:01:17 +00:00
|
|
|
const int pin = (isWW2GI() || (gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
|
2022-10-14 01:28:41 +00:00
|
|
|
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-14 01:28:41 +00:00
|
|
|
static constexpr uint8_t cat_frames[] = { 0,0,1,1,2,2 };
|
2020-05-19 22:35:52 +00:00
|
|
|
|
2021-12-21 17:19:45 +00:00
|
|
|
if (p->GetActor()->spr.pal != 1)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-14 01:28:41 +00:00
|
|
|
offsets.X += rand() & 3;
|
|
|
|
offsets.Y += rand() & 3;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
2022-10-14 01:28:41 +00:00
|
|
|
|
|
|
|
offsets.Y += 16;
|
|
|
|
|
|
|
|
hud_drawpal(210 + offsets.X, 261 + offsets.Y, FREEZE + 2, -32, o | pin, pal, angle);
|
|
|
|
hud_drawpal(210 + offsets.X, 235 + offsets.Y, FREEZE + 3 + cat_frames[*kb % 6], -32, o | pin, pal, angle);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
hud_drawpal(210 + offsets.X, 261 + offsets.Y, FREEZE, shade, o | pin, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displayshrinker_ww = [&]
|
|
|
|
{
|
2022-10-16 23:16:12 +00:00
|
|
|
offsets.X += 28;
|
|
|
|
offsets.Y += 18;
|
2021-04-15 05:49:36 +00:00
|
|
|
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb == 0)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// the 'at rest' display
|
2021-04-15 06:34:24 +00:00
|
|
|
if (p->ammo_amount[cw] <= 0) //p->last_weapon >= 0)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 12:44:38 +00:00
|
|
|
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 3 + (*kb & 3), -32, o, 0, angle);
|
|
|
|
hud_drawpal(188 + offsets.X, 240 + offsets.Y, SHRINKER + 1, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-13 12:44:38 +00:00
|
|
|
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 2, 16 - int(BobVal(random_club_frame) * 16), o, 0, angle);
|
|
|
|
hud_drawpal(188 + offsets.X, 240 + offsets.Y, SHRINKER, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// the 'active' display.
|
2021-12-21 17:19:45 +00:00
|
|
|
if (p->GetActor()->spr.pal != 1)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 12:44:38 +00:00
|
|
|
offsets.X += rand() & 3;
|
|
|
|
offsets.Y -= rand() & 3;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-10-14 01:19:36 +00:00
|
|
|
if (*kb < weapTotalTime)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-14 01:19:36 +00:00
|
|
|
if (!(*kb < weapFireDelay))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// lower weapon to reload cartridge (not clip)
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 10 * (weapTotalTime - kickback_pic);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// else we are in 'reload time'
|
2022-10-14 01:19:36 +00:00
|
|
|
else if (*kb < ((weapReload - weapTotalTime) / 2 + weapTotalTime))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// down
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 10 * (kickback_pic - weapTotalTime); //D
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// up
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 10 * (weapReload - kickback_pic); //U
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// draw weapon
|
2022-10-13 12:44:38 +00:00
|
|
|
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 3 + (*kb & 3), -32, o, 0, angle);
|
|
|
|
hud_drawpal(188 + offsets.X, 240 + offsets.Y, SHRINKER + 1, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displaygrower_ww = [&]
|
|
|
|
{
|
2022-10-16 23:16:12 +00:00
|
|
|
offsets.X += 28;
|
|
|
|
offsets.Y += 18;
|
2021-04-15 05:49:36 +00:00
|
|
|
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb == 0)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 13:33:43 +00:00
|
|
|
hud_drawpal(188 + offsets.X, 240 + offsets.Y, SHRINKER - 2, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-12-21 17:19:45 +00:00
|
|
|
if (p->GetActor()->spr.pal != 1)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 13:33:43 +00:00
|
|
|
offsets.X += rand() & 3;
|
|
|
|
offsets.Y -= rand() & 3;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
2022-10-14 01:19:36 +00:00
|
|
|
if (*kb < weapTotalTime)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-14 01:19:36 +00:00
|
|
|
if (!(*kb < weapFireDelay))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// lower weapon to reload cartridge (not clip)
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 15 * (weapTotalTime - kickback_pic);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// else we are in 'reload time'
|
2022-10-14 01:19:36 +00:00
|
|
|
else if (*kb < ((weapReload - weapTotalTime) / 2 + weapTotalTime))
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
// down
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 5 * (kickback_pic - weapTotalTime);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// up
|
2022-10-14 01:19:36 +00:00
|
|
|
offsets.Y += 10 * (weapReload - kickback_pic);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// display weapon
|
2022-10-13 13:33:43 +00:00
|
|
|
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 3 + (*kb & 3), -32, o, 2, angle);
|
|
|
|
hud_drawpal(188 + offsets.X, 240 + offsets.Y, SHRINKER - 1, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
auto displayshrinker = [&]
|
|
|
|
{
|
2020-09-10 21:12:52 +00:00
|
|
|
auto shrinker = /*isWorldTour() ? SHRINKERWIDE :*/ SHRINKER;
|
2022-10-16 23:16:12 +00:00
|
|
|
offsets.X += 28;
|
|
|
|
offsets.Y += 18;
|
2021-04-15 05:49:36 +00:00
|
|
|
|
2020-08-03 04:21:30 +00:00
|
|
|
if (*kb == 0)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
|
|
|
if (cw == GROW_WEAPON)
|
|
|
|
{
|
2022-10-13 13:34:14 +00:00
|
|
|
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 2, 16 - int(BobVal(random_club_frame) * 16), o, 2, angle);
|
|
|
|
hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker - 2, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-13 13:34:14 +00:00
|
|
|
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 2, 16 - int(BobVal(random_club_frame) * 16), o, 0, angle);
|
|
|
|
hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-12-21 17:19:45 +00:00
|
|
|
if (p->GetActor()->spr.pal != 1)
|
2020-05-19 22:35:52 +00:00
|
|
|
{
|
2022-10-13 13:34:14 +00:00
|
|
|
offsets.X += rand() & 3;
|
|
|
|
offsets.Y -= rand() & 3;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (cw == GROW_WEAPON)
|
|
|
|
{
|
2022-10-13 13:34:14 +00:00
|
|
|
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 3 + (*kb & 3), -32, o, 2, angle);
|
|
|
|
hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker - 1, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-13 13:34:14 +00:00
|
|
|
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 3 + (*kb & 3), -32, o, 0, angle);
|
|
|
|
hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker + 1, shade, o, pal, angle);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2020-05-20 22:23:55 +00:00
|
|
|
auto displayflamethrower = [&]()
|
|
|
|
{
|
2021-11-21 07:56:39 +00:00
|
|
|
if (*kb < 1 || p->cursector->lotag == 2)
|
2020-05-20 22:23:55 +00:00
|
|
|
{
|
2022-10-13 13:34:34 +00:00
|
|
|
hud_drawpal(210 + offsets.X, 261 + offsets.Y, FLAMETHROWER, shade, o, pal, angle);
|
|
|
|
hud_drawpal(210 + offsets.X, 261 + offsets.Y, FLAMETHROWERPILOT, shade, o, pal, angle);
|
2020-05-20 22:23:55 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-10-13 13:34:34 +00:00
|
|
|
static constexpr uint8_t cat_frames[] = { 0, 0, 1, 1, 2, 2 };
|
|
|
|
|
2021-12-21 17:19:45 +00:00
|
|
|
if (p->GetActor()->spr.pal != 1)
|
2020-05-20 22:23:55 +00:00
|
|
|
{
|
2022-10-13 13:34:34 +00:00
|
|
|
offsets.X += krand() & 1;
|
|
|
|
offsets.Y += krand() & 1;
|
2020-05-20 22:23:55 +00:00
|
|
|
}
|
2022-10-13 13:34:34 +00:00
|
|
|
|
|
|
|
offsets.Y += 16;
|
|
|
|
|
|
|
|
hud_drawpal(210 + offsets.X, 261 + offsets.Y, FLAMETHROWER + 1, -32, o, pal, angle);
|
|
|
|
hud_drawpal(210 + offsets.X, 235 + offsets.Y, FLAMETHROWER + 2 + cat_frames[*kb % 6], -32, o, pal, angle);
|
2020-05-20 22:23:55 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2020-05-19 22:35:52 +00:00
|
|
|
switch (cw)
|
|
|
|
{
|
|
|
|
case KNEE_WEAPON:
|
|
|
|
displayknee();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TRIPBOMB_WEAPON:
|
|
|
|
displaytripbomb();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RPG_WEAPON:
|
|
|
|
displayrpg();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SHOTGUN_WEAPON:
|
|
|
|
if (isWW2GI()) displayshotgun_ww();
|
|
|
|
else displayshotgun();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CHAINGUN_WEAPON:
|
|
|
|
if (isWW2GI()) displaychaingun_ww();
|
|
|
|
else displaychaingun();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PISTOL_WEAPON:
|
|
|
|
displaypistol();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HANDBOMB_WEAPON:
|
|
|
|
displayhandbomb();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HANDREMOTE_WEAPON:
|
|
|
|
displayhandremote();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DEVISTATOR_WEAPON:
|
|
|
|
if (isWW2GI()) displaydevastator_ww();
|
|
|
|
else displaydevastator();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FREEZE_WEAPON:
|
|
|
|
displayfreezer();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SHRINKER_WEAPON:
|
|
|
|
if (isWW2GI()) displayshrinker_ww();
|
|
|
|
else displayshrinker();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GROW_WEAPON:
|
|
|
|
if (isWW2GI()) displaygrower_ww();
|
|
|
|
else displayshrinker();
|
|
|
|
break;
|
2020-05-20 22:23:55 +00:00
|
|
|
|
|
|
|
case FLAMETHROWER_WEAPON:
|
|
|
|
displayflamethrower();
|
|
|
|
break;
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-07 05:34:55 +00:00
|
|
|
displayloogie(p, interpfrac);
|
2020-05-19 22:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
END_DUKE_NS
|