From 8f61abdf75c7858c526f9c2396d06fbb501faf4c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 31 Dec 2022 21:28:38 +0100 Subject: [PATCH] - more HUD refactoring and fixed issues with badly named textures crashing the precacher. --- source/core/precache.cpp | 4 + source/games/duke/src/hudweapon_d.cpp | 6 +- source/games/duke/src/hudweapon_r.cpp | 311 +++++++++--------- source/games/duke/src/namelist_r.h | 42 ++- source/games/duke/src/premap_r.cpp | 2 +- .../static/filter/redneck/rmapinfo.breakables | 8 +- .../filter/redneck/rmapinfo.spawnclasses | 2 +- .../games/duke/actors/_placeholders.zs | 2 +- .../duke/actors/redneckenemies/mosquito.zs | 2 +- wadsrc/static/zscript/games/duke/ui/sbar_r.zs | 2 +- 10 files changed, 196 insertions(+), 185 deletions(-) diff --git a/source/core/precache.cpp b/source/core/precache.cpp index af32529d8..d871fd0b5 100644 --- a/source/core/precache.cpp +++ b/source/core/precache.cpp @@ -100,7 +100,9 @@ TMap cachemap; void markTextureForPrecache(FTextureID nTex, int palnum) { + if (!nTex.isValid()) return; int i, j; + assert(palnum >= 0 && palnum < 256); auto& picanm = GetExtInfo(nTex).picanm; if (picanm.type() == PICANM_ANIMTYPE_BACK) { @@ -116,12 +118,14 @@ void markTextureForPrecache(FTextureID nTex, int palnum) for (; i <= j; i = i + 1) { int64_t val = i + (int64_t(palnum) << 32); + assert(val >= 0); cachemap.Insert(val, true); } } void markTextureForPrecache(const char* texname, int palnum) { + assert(palnum >= 0 && palnum < 256); auto texid = TexMan.CheckForTexture(texname, ETextureType::Any); if (texid.isValid()) markTextureForPrecache(texid, palnum); } diff --git a/source/games/duke/src/hudweapon_d.cpp b/source/games/duke/src/hudweapon_d.cpp index f1e410575..05874cd87 100644 --- a/source/games/duke/src/hudweapon_d.cpp +++ b/source/games/duke/src/hudweapon_d.cpp @@ -53,7 +53,7 @@ inline static double getavel(int snum) inline static void hud_drawpal(double x, double y, int tilenum, int shade, int orientation, int p, DAngle angle) { - hud_drawsprite(x, y, 65536, angle.Degrees(), tilenum, shade, p, 2 | orientation); + hud_drawsprite(x, y, 65536, angle.Degrees(), tilenum, shade, p, orientation); } //--------------------------------------------------------------------------- @@ -75,7 +75,7 @@ static void displayloogie(player_struct* p, double const interpfrac) const double z = 4096. + ((loogi + i) * 512.); const double x = -getavel(p->GetPlayerNum()) + BobVal((loogi + i) * 64.) * 16; - hud_drawsprite((p->loogie[i].X + x), (200 + p->loogie[i].Y - y), z - (i << 8), a - 22.5, DTILE_LOOGIE, 0, 0, 2); + hud_drawsprite((p->loogie[i].X + x), (200 + p->loogie[i].Y - y), (z - (i << 8)) / 65536., a - 22.5, TexMan.CheckForTexture("LOOGIE", ETextureType::Any), 0, 0, 0); } } @@ -93,7 +93,7 @@ static bool animatefist(int gs, player_struct* p, double xoffset, double yoffset hud_drawsprite( (-fisti + 222 + xoffset), (yoffset + 194 + BobVal((6 + fisti) * 128.) * 32), - clamp(65536. - 65536. * BobVal(512 + fisti * 64.), 40920., 90612.), 0, DTILE_FIST, gs, fistpal, 2); + clamp(65536. - 65536. * BobVal(512 + fisti * 64.), 40920., 90612.) / 65536., 0, TexMan.CheckForTexture("FIST", ETextureType::Any), gs, fistpal, 0); return true; } diff --git a/source/games/duke/src/hudweapon_r.cpp b/source/games/duke/src/hudweapon_r.cpp index 6bcd49dac..8e9ebedd3 100644 --- a/source/games/duke/src/hudweapon_r.cpp +++ b/source/games/duke/src/hudweapon_r.cpp @@ -35,7 +35,7 @@ BEGIN_DUKE_NS //--------------------------------------------------------------------------- // -// +// Note: Scaling factors in here are very weird numbers that are better left in Q16.16. // //--------------------------------------------------------------------------- @@ -44,21 +44,6 @@ inline static void hud_drawpal(double x, double y, int tilenum, int shade, int o hud_drawsprite(x, y, scale, angle.Degrees(), tilenum, shade, p, 2 | orientation); } -inline static void rdmyospal(double x, double y, int tilenum, int shade, int orientation, int p, DAngle angle) -{ - hud_drawpal(x, y, tilenum, shade, orientation, p, angle, 36700); -} - -inline static void rd2myospal(double x, double y, int tilenum, int shade, int orientation, int p, DAngle angle) -{ - hud_drawpal(x, y, tilenum, shade, orientation, p, angle, 44040); -} - -inline static void rd3myospal(double x, double y, int tilenum, int shade, int orientation, int p, DAngle angle) -{ - hud_drawpal(x, y, tilenum, shade, orientation, p, angle, 47040); -} - //--------------------------------------------------------------------------- // // @@ -92,17 +77,131 @@ void displaymasks_r(int snum, int p, double interpfrac) // //--------------------------------------------------------------------------- -inline static void ShowMotorcycle(double x, double y, int tilenum, int shade, int orientation, int p, DAngle a) +void DrawMotorCycle(int const kb, DVector2 offsets, DAngle angle, int shade, int pal) { - hud_drawsprite(x, y, 34816, a.Degrees(), tilenum, shade, p, 2 | orientation); + const char* temp_kb; + if (numplayers == 1) + { + if (kb) + { + shade = 0; + if (kb == 1) + { + if ((krand() & 1) == 1) + temp_kb = "MOTOHIT1"; + else + temp_kb = "MOTOHIT2"; + } + else if (kb == 4) + { + if ((krand() & 1) == 1) + temp_kb = "MOTOHIT3"; + else + temp_kb = "MOTOHIT4"; + } + else + temp_kb = "MOTOHIT0"; + + } + else + temp_kb = "MOTOHIT0"; + } + else + { + if (kb) + { + shade = 0; + if (kb == 1) + temp_kb = "MOTOHIT1"; + else if (kb == 2) + temp_kb = "MOTOHIT2"; + else if (kb == 3) + temp_kb = "MOTOHIT3"; + else if (kb == 4) + temp_kb = "MOTOHIT4"; + else + temp_kb = "MOTOHIT0"; + + } + else + temp_kb = "MOTOHIT0"; + } + hud_drawsprite(160 + offsets.X, 174, 0.53125, -angle.Degrees(), TexMan.CheckForTexture(temp_kb, ETextureType::Any), shade, pal, 0); } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- -inline static void ShowBoat(double x, double y, int tilenum, int shade, int orientation, int p, DAngle a) +void DrawBoat(int const kb, DVector2 offsets, DAngle angle, int shade, int pal, bool notonwater) { - hud_drawsprite(x, y, 66048, a.Degrees(), tilenum, shade, p, 2 | orientation); -} + const char* temp_kb; + int temp2, temp3; + temp2 = 0; + if (angle > nullAngle) + { + if (kb == 0) + temp_kb = "BOATHIT1"; + else if (kb <= 3) + { + temp_kb = "BOATHIT5"; + temp2 = 1; + } + else if (kb <= 6) + { + temp_kb = "BOATHIT6"; + temp2 = 1; + } + else + temp_kb = "BOATHIT1"; + } + else if (angle < nullAngle) + { + if (kb == 0) + temp_kb = "BOATHIT2"; + else if (kb <= 3) + { + temp_kb = "BOATHIT7"; + temp2 = 1; + } + else if (kb <= 6) + { + temp_kb = "BOATHIT8"; + temp2 = 1; + } + else + temp_kb = "BOATHIT2"; + } + else + { + if (kb == 0) + temp_kb = "BOATHIT0"; + else if (kb <= 3) + { + temp_kb = "BOATHIT3"; + temp2 = 1; + } + else if (kb <= 6) + { + temp_kb = "BOATHIT4"; + temp2 = 1; + } + else + temp_kb = "BOATHIT0"; + } + if (notonwater) + temp3 = 170; + else + temp3 = 170 + (kb >> 2); + + if (temp2) + shade = -96; + + hud_drawsprite(160 + offsets.X, temp3, 1.0078125, -angle.Degrees(), TexMan.CheckForTexture(temp_kb, ETextureType::Any), shade, pal, 0); +} //--------------------------------------------------------------------------- // @@ -156,122 +255,12 @@ void displayweapon_r(int snum, double interpfrac) if (p->OnMotorcycle) { - int temp_kb; - if (numplayers == 1) - { - if (*kb) - { - shade = 0; - if (*kb == 1) - { - if ((krand()&1) == 1) - temp_kb = RTILE_MOTOHIT+1; - else - temp_kb = RTILE_MOTOHIT+2; - } - else if (*kb == 4) - { - if ((krand()&1) == 1) - temp_kb = RTILE_MOTOHIT+3; - else - temp_kb = RTILE_MOTOHIT+4; - } - else - temp_kb = RTILE_MOTOHIT; - - } - else - temp_kb = RTILE_MOTOHIT; - } - else - { - if (*kb) - { - shade = 0; - if (*kb == 1) - temp_kb = RTILE_MOTOHIT+1; - else if (*kb == 2) - temp_kb = RTILE_MOTOHIT+2; - else if (*kb == 3) - temp_kb = RTILE_MOTOHIT+3; - else if (*kb == 4) - temp_kb = RTILE_MOTOHIT+4; - else - temp_kb = RTILE_MOTOHIT; - - } - else - temp_kb = RTILE_MOTOHIT; - } - - ShowMotorcycle(160 + offsets.X, 174, temp_kb, shade, 0, pal, -TiltStatus); + DrawMotorCycle(*kb, offsets, TiltStatus, shade, pal); return; } if (p->OnBoat) { - int temp2, temp_kb, temp3; - temp2 = 0; - if (TiltStatus.Sgn() > 0) - { - if (*kb == 0) - temp_kb = RTILE_BOATHIT+1; - else if (*kb <= 3) - { - temp_kb = RTILE_BOATHIT+5; - temp2 = 1; - } - else if (*kb <= 6) - { - temp_kb = RTILE_BOATHIT+6; - temp2 = 1; - } - else - temp_kb = RTILE_BOATHIT+1; - } - else if (TiltStatus.Sgn() < 0) - { - if (*kb == 0) - temp_kb = RTILE_BOATHIT+2; - else if (*kb <= 3) - { - temp_kb = RTILE_BOATHIT+7; - temp2 = 1; - } - else if (*kb <= 6) - { - temp_kb = RTILE_BOATHIT+8; - temp2 = 1; - } - else - temp_kb = RTILE_BOATHIT+2; - } - else - { - if (*kb == 0) - temp_kb = RTILE_BOATHIT; - else if (*kb <= 3) - { - temp_kb = RTILE_BOATHIT+3; - temp2 = 1; - } - else if (*kb <= 6) - { - temp_kb = RTILE_BOATHIT+4; - temp2 = 1; - } - else - temp_kb = RTILE_BOATHIT; - } - - if (p->NotOnWater) - temp3 = 170; - else - temp3 = 170 + (*kb>>2); - - if (temp2) - shade = -96; - - ShowBoat(160 + offsets.X, temp3, temp_kb, shade, 0, pal, -TiltStatus); + DrawBoat(*kb, offsets, TiltStatus, shade, pal, p->NotOnWater); return; } @@ -338,7 +327,7 @@ void displayweapon_r(int snum, double interpfrac) } else { - rdmyospal(162 + offsets.X, 214 + offsets.Y, RTILE_HANDTHROW + 5, shade, o, pal, angle); + hud_drawpal(162 + offsets.X, 214 + offsets.Y, RTILE_HANDTHROW + 5, shade, o, pal, angle, 36700); } }; @@ -355,12 +344,12 @@ void displayweapon_r(int snum, double interpfrac) if (p->ammo_amount[POWDERKEG_WEAPON]) { - rdmyospal(180 + offsets.X, 214 + offsets.Y + (*kb << 3), RTILE_POWDERH, shade, o, pal, angle); - rdmyospal(90 + offsets.X, 214 + offsets.Y + (*kb << 3), RTILE_POWDERH, shade, o | 4, pal, angle); + hud_drawpal(180 + offsets.X, 214 + offsets.Y + (*kb << 3), RTILE_POWDERH, shade, o, pal, angle, 36700); + hud_drawpal(90 + offsets.X, 214 + offsets.Y + (*kb << 3), RTILE_POWDERH, shade, o | 4, pal, angle, 36700); } else { - rdmyospal(162 + offsets.X, 214 + offsets.Y, RTILE_HANDTHROW + 5, shade, o, pal, angle); + hud_drawpal(162 + offsets.X, 214 + offsets.Y, RTILE_HANDTHROW + 5, shade, o, pal, angle, 36700); } }; @@ -377,15 +366,15 @@ void displayweapon_r(int snum, double interpfrac) if (kb_frames[*kb] == 2 || kb_frames[*kb] == 3) { - rdmyospal(200 + offsets.X, 250 + offsets.Y, RTILE_RPGGUN + kb_frames[*kb], shade, o | pin, pal, angle); + hud_drawpal(200 + offsets.X, 250 + offsets.Y, RTILE_RPGGUN + kb_frames[*kb], shade, o | pin, pal, angle, 36700); } else if (kb_frames[*kb] == 1) { - rdmyospal(200 + offsets.X, 250 + offsets.Y, RTILE_RPGGUN + kb_frames[*kb], 0, o | pin, pal, angle); + hud_drawpal(200 + offsets.X, 250 + offsets.Y, RTILE_RPGGUN + kb_frames[*kb], 0, o | pin, pal, angle, 36700); } else { - rdmyospal(210 + offsets.X, 255 + offsets.Y, RTILE_RPGGUN + kb_frames[*kb], shade, o | pin, pal, angle); + hud_drawpal(210 + offsets.X, 255 + offsets.Y, RTILE_RPGGUN + kb_frames[*kb], shade, o | pin, pal, angle, 36700); } }; @@ -405,15 +394,15 @@ void displayweapon_r(int snum, double interpfrac) if (kb_frames[*kb] == 2 || kb_frames[*kb] == 3) { - rdmyospal(200 + offsets.X, 250 + offsets.Y, RTILE_RPGGUN2 + kb_frames[*kb], shade, o | pin, pal, angle); + hud_drawpal(200 + offsets.X, 250 + offsets.Y, RTILE_RPGGUN2 + kb_frames[*kb], shade, o | pin, pal, angle, 36700); } else if (kb_frames[*kb] == 1) { - rdmyospal(200 + offsets.X, 250 + offsets.Y, RTILE_RPGGUN2 + kb_frames[*kb], 0, o | pin, pal, angle); + hud_drawpal(200 + offsets.X, 250 + offsets.Y, RTILE_RPGGUN2 + kb_frames[*kb], 0, o | pin, pal, angle, 36700); } else { - rdmyospal(210 + offsets.X, 255 + offsets.Y, RTILE_RPGGUN2 + kb_frames[*kb], shade, o | pin, pal, angle); + hud_drawpal(210 + offsets.X, 255 + offsets.Y, RTILE_RPGGUN2 + kb_frames[*kb], shade, o | pin, pal, angle, 36700); } } else @@ -422,22 +411,22 @@ void displayweapon_r(int snum, double interpfrac) { if (chickenphase) { - rdmyospal(210 + offsets.X, 222 + offsets.Y, RTILE_RPGGUN2 + 7, shade, o | pin, pal, angle); + hud_drawpal(210 + offsets.X, 222 + offsets.Y, RTILE_RPGGUN2 + 7, shade, o | pin, pal, angle, 36700); } else if ((krand() & 15) == 5) { S_PlayActorSound(327, p->GetActor()); - rdmyospal(210 + offsets.X, 222 + offsets.Y, RTILE_RPGGUN2 + 7, shade, o | pin, pal, angle); + hud_drawpal(210 + offsets.X, 222 + offsets.Y, RTILE_RPGGUN2 + 7, shade, o | pin, pal, angle, 36700); chickenphase = 6; } else { - rdmyospal(210 + offsets.X, 225 + offsets.Y, RTILE_RPGGUN2, shade, o | pin, pal, angle); + hud_drawpal(210 + offsets.X, 225 + offsets.Y, RTILE_RPGGUN2, shade, o | pin, pal, angle, 36700); } } else { - rdmyospal(210 + offsets.X, 225 + offsets.Y, RTILE_RPGGUN2, shade, o | pin, pal, angle); + hud_drawpal(210 + offsets.X, 225 + offsets.Y, RTILE_RPGGUN2, shade, o | pin, pal, angle, 36700); } } }; @@ -598,7 +587,7 @@ void displayweapon_r(int snum, double interpfrac) if (kb_frames[*kb]) shade = 0; - rdmyospal(x, y, RTILE_FIRSTGUN + kb_frames[*kb], shade, 0, pal, angle); + hud_drawpal(x, y, RTILE_FIRSTGUN + kb_frames[*kb], shade, 0, pal, angle, 36700); } else { @@ -654,7 +643,7 @@ void displayweapon_r(int snum, double interpfrac) dx = 0; break; } - rdmyospal(x - dx, y + dy, RTILE_FIRSTGUNRELOAD + kb_frames[(*kb) - 22], shade, 0, pal, angle); + hud_drawpal(x - dx, y + dy, RTILE_FIRSTGUNRELOAD + kb_frames[(*kb) - 22], shade, 0, pal, angle, 36700); } }; @@ -668,7 +657,7 @@ void displayweapon_r(int snum, double interpfrac) { offsets.Y += 9 * (*kb); - rdmyospal(190 + offsets.X, 260 + offsets.Y, RTILE_HANDTHROW, shade, o, pal, angle); + hud_drawpal(190 + offsets.X, 260 + offsets.Y, RTILE_HANDTHROW, shade, o, pal, angle, 36700); }; //--------------------------------------------------------------------------- @@ -691,17 +680,17 @@ void displayweapon_r(int snum, double interpfrac) { if ((*kb) < 5) { - rdmyospal(290 + offsets.X - dx, 258 + offsets.Y - 64 + p->detonate_count - dy, RTILE_RRTILE1752, 0, o | pin, pal, angle); + hud_drawpal(290 + offsets.X - dx, 258 + offsets.Y - 64 + p->detonate_count - dy, RTILE_RRTILE1752, 0, o | pin, pal, angle, 36700); } - rdmyospal(290 + offsets.X, 258 + offsets.Y - dy, RTILE_HANDTHROW + remote_frames[*kb], shade, o | pin, pal, angle); + hud_drawpal(290 + offsets.X, 258 + offsets.Y - dy, RTILE_HANDTHROW + remote_frames[*kb], shade, o | pin, pal, angle, 36700); } else { if ((*kb) < 5) { - rdmyospal(290 + offsets.X - dx, 258 + offsets.Y - 64 + p->detonate_count - dy, RTILE_RRTILE1752, 0, o | pin, pal, angle); + hud_drawpal(290 + offsets.X - dx, 258 + offsets.Y - 64 + p->detonate_count - dy, RTILE_RRTILE1752, 0, o | pin, pal, angle, 36700); } - rdmyospal(290 + offsets.X, 258 + offsets.Y - dy, RTILE_HANDTHROW + 1, shade, o | pin, pal, angle); + hud_drawpal(290 + offsets.X, 258 + offsets.Y - dy, RTILE_HANDTHROW + 1, shade, o | pin, pal, angle, 36700); } } }; @@ -719,10 +708,10 @@ void displayweapon_r(int snum, double interpfrac) if (*kb) { shade = 0; - rd3myospal(150 + offsets.X, 266 + offsets.Y, RTILE_DEVISTATOR, shade, o, pal, angle); + hud_drawpal(150 + offsets.X, 266 + offsets.Y, RTILE_DEVISTATOR, shade, o, pal, angle, 47040); } else - rd3myospal(150 + offsets.X, 266 + offsets.Y, RTILE_DEVISTATOR + 1, shade, o, pal, angle); + hud_drawpal(150 + offsets.X, 266 + offsets.Y, RTILE_DEVISTATOR + 1, shade, o, pal, angle, 47040); }; //--------------------------------------------------------------------------- @@ -738,9 +727,9 @@ void displayweapon_r(int snum, double interpfrac) if ((*kb)) { static const uint8_t cat_frames[] = { 0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; - rdmyospal(260 + offsets.X, 215 + offsets.Y, RTILE_FREEZE + cat_frames[*kb], -32, o | pin, pal, angle); + hud_drawpal(260 + offsets.X, 215 + offsets.Y, RTILE_FREEZE + cat_frames[*kb], -32, o | pin, pal, angle, 36700); } - else rdmyospal(260 + offsets.X, 215 + offsets.Y, RTILE_FREEZE, shade, o | pin, pal, angle); + else hud_drawpal(260 + offsets.X, 215 + offsets.Y, RTILE_FREEZE, shade, o | pin, pal, angle, 36700); }; //--------------------------------------------------------------------------- @@ -756,7 +745,7 @@ void displayweapon_r(int snum, double interpfrac) if ((*kb) == 0) { - rd2myospal(188 + offsets.X, 240 + offsets.Y, RTILE_SHRINKER, shade, o, pal, angle); + hud_drawpal(188 + offsets.X, 240 + offsets.Y, RTILE_SHRINKER, shade, o, pal, angle, 44040); } else { @@ -768,12 +757,12 @@ void displayweapon_r(int snum, double interpfrac) if (cw == BUZZSAW_WEAPON) { - rd2myospal(184 + offsets.X, 240 + offsets.Y, RTILE_GROWSPARK + ((*kb) & 2), shade, o, 0, angle); + hud_drawpal(184 + offsets.X, 240 + offsets.Y, RTILE_GROWSPARK + ((*kb) & 2), shade, o, 0, angle, 44040); } else { static const int8_t kb_frames[] = { 1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0 }; - rd2myospal(184 + offsets.X, 240 + offsets.Y, RTILE_SHRINKER + kb_frames[*kb], shade, o, 0, angle); + hud_drawpal(184 + offsets.X, 240 + offsets.Y, RTILE_SHRINKER + kb_frames[*kb], shade, o, 0, angle, 44040); } } }; diff --git a/source/games/duke/src/namelist_r.h b/source/games/duke/src/namelist_r.h index 033ce36c9..a36082983 100644 --- a/source/games/duke/src/namelist_r.h +++ b/source/games/duke/src/namelist_r.h @@ -575,15 +575,15 @@ x(GETICON, 1640) x(MENUSCREEN, 1641) x(MENUBAR, 1642) x(KILLSICON, 1643) -x(FIRSTAID_ICON, 1645) +x(WHISKEY_ICON, 1645) x(HEAT_ICON, 1646) x(BOTTOMSTATUSBAR, 1647) x(BOOT_ICON, 1648) x(WEAPONBAR, 1649) x(FRAGBAR, 1650) -x(JETPACK_ICON, 1652) -x(AIRTANK_ICON, 1653) -x(STEROIDS_ICON, 1654) +x(COWPIE_ICON, 1652) +x(SNORKEL_ICON, 1653) +x(MOONSHINE_ICON, 1654) x(HOLODUKE_ICON, 1655) x(ACCESS_ICON, 1656) x(DIGITALNUM, 1657) @@ -677,12 +677,14 @@ y(LETSBOWL1, 2035) y(RRTILE2050, 2050) y(RRTILE2052, 2052) y(RRTILE2053, 2053) -y(RRTILE2056, 2056) +y(TESLACON, 2056) y(RRTILE2060, 2060) +x(TOILETPAPER, 2864) y(RRTILE2072, 2072) y(RRTILE2074, 2074) y(RRTILE2075, 2075) y(RRTILE2083, 2083) +x(TESLABALL, 2094) x(VIXENSHOT, 2095) y(TESLA, 2097) y(TOILETSEAT, 2121) @@ -874,12 +876,12 @@ y(RRTILE2832, 2832) y(RRTILE2842, 2842) y(RRTILE2859, 2859) y(RRTILE2876, 2876) -y(RRTILE2878, 2878) -y(RRTILE2879, 2879) +x(BUSTAWIN5A, 2878) +x(BUSTAWIN5B, 2879) y(RRTILE2893, 2893) y(RRTILE2894, 2894) -y(RRTILE2898, 2898) -y(RRTILE2899, 2899) +x(BUSTAWIN4A, 2898) +x(BUSTAWIN4B, 2899) y(RRTILE2915, 2915) y(RRTILE2940, 2940) y(PULSELAMP, 2944) @@ -1105,7 +1107,7 @@ x(DUKEGUN, 4041) x(DUKETORSO, 4046) x(DUKELEG, 4055) x(FECES, 4802) -x(DRONE, 4916) +x(MOSQUITO, 4916) x(RECON, 4989) y(RRTILE5014, 5014) y(RRTILE5015, 5015) @@ -1195,8 +1197,20 @@ x(ATOMICHEALTH, 5595) y(RRTILE6144, 6144) x(MOTOGUN, 7168) y(RRTILE7169, 7169) -x(MOTOHIT, 7170) -x(BOATHIT, 7175) +x(MOTOHIT0, 7170) +x(MOTOHIT1, 7171) +x(MOTOHIT2, 7172) +x(MOTOHIT3, 7173) +x(MOTOHIT4, 7174) +x(BOATHIT0, 7175) +x(BOATHIT1, 7175) +x(BOATHIT2, 7176) +x(BOATHIT3, 7177) +x(BOATHIT4, 7178) +x(BOATHIT5, 7179) +x(BOATHIT6, 7180) +x(BOATHIT7, 7181) +x(BOATHIT8, 7182) y(PLAYERONBOAT, 7184) y(PLAYERONBOATBACK, 7190) y(RRTILE7191, 7191) @@ -1523,6 +1537,7 @@ x(VIXENTEAT, 5851) x(BIKEJIBA, 5872) x(BIKEJIBB, 5877) x(BIKEJIBC, 5882) +x(DEADBIKE, 5887) x(BIKERB, 5890) x(BIKERBV2, 5891) x(GATOR, 5980) // route 66 @@ -1573,4 +1588,7 @@ x(MAMACLOUD, 8663) x(MAMA, 8705) x(MAMAJIBA, 8890) x(MAMAJIBB, 8895) +x(LNYDLADDER, 3975) + x(VIEWSCR, 7) // hijacks CYCLER + diff --git a/source/games/duke/src/premap_r.cpp b/source/games/duke/src/premap_r.cpp index 06394137e..743fb3474 100644 --- a/source/games/duke/src/premap_r.cpp +++ b/source/games/duke/src/premap_r.cpp @@ -257,7 +257,7 @@ static void cachespritenum(DDukeActor* actor) case RTILE_ATOMICHEALTH: maxc = 14; break; - case RTILE_DRONE: + case RTILE_MOSQUITO: maxc = 6; break; case RTILE_VIXEN: diff --git a/wadsrc/static/filter/redneck/rmapinfo.breakables b/wadsrc/static/filter/redneck/rmapinfo.breakables index 33b2eda99..a5cead8f4 100644 --- a/wadsrc/static/filter/redneck/rmapinfo.breakables +++ b/wadsrc/static/filter/redneck/rmapinfo.breakables @@ -19,8 +19,8 @@ breakwalls RRTILE1986 = RRTILE1987, "", "DukeBreakWalls.LightBreak" RRTILE1939 = RRTILE2004, "", "DukeBreakWalls.LightBreak" RRTILE1988 = RRTILE2005, "", "DukeBreakWalls.LightBreak" - RRTILE2898 = RRTILE2899, "", "DukeBreakWalls.LightBreak" - RRTILE2878 = RRTILE2879, "", "DukeBreakWalls.LightBreak" + BUSTAWIN4A = BUSTAWIN4B, "", "DukeBreakWalls.LightBreak" + BUSTAWIN5A = BUSTAWIN5B, "", "DukeBreakWalls.LightBreak" RRTILE2123 = RRTILE2124, "", "DukeBreakWalls.LightBreak" RRTILE2125 = RRTILE2126, "", "DukeBreakWalls.LightBreak" RRTILE3200 = RRTILE3201, "", "DukeBreakWalls.LightBreak" @@ -46,8 +46,8 @@ breakceiling RRTILE1986 = RRTILE1987, "GLASS_BREAKING", lightsout, ceilingglass RRTILE1939 = RRTILE2004, "GLASS_BREAKING", lightsout, ceilingglass RRTILE1988 = RRTILE2005, "GLASS_BREAKING", lightsout, ceilingglass - RRTILE2898 = RRTILE2899, "GLASS_BREAKING", lightsout, ceilingglass - RRTILE2878 = RRTILE2879, "GLASS_BREAKING", lightsout, ceilingglass + BUSTAWIN4A = BUSTAWIN4B, "GLASS_BREAKING", lightsout, ceilingglass + BUSTAWIN5A = BUSTAWIN5B, "GLASS_BREAKING", lightsout, ceilingglass RRTILE2123 = RRTILE2124, "GLASS_BREAKING", lightsout, ceilingglass RRTILE2125 = RRTILE2126, "GLASS_BREAKING", lightsout, ceilingglass } diff --git a/wadsrc/static/filter/redneck/rmapinfo.spawnclasses b/wadsrc/static/filter/redneck/rmapinfo.spawnclasses index 0e9f18325..8e71c1d10 100644 --- a/wadsrc/static/filter/redneck/rmapinfo.spawnclasses +++ b/wadsrc/static/filter/redneck/rmapinfo.spawnclasses @@ -281,7 +281,7 @@ spawnclasses 1952 = DukeActor, "*RRTILE1952" 1953 = DukeActor, "*RRTILE1953" 2050 = DukeActor, "*RRTILE2050" - 2056 = DukeActor, "*RRTILE2056" + 2056 = DukeActor, "*TESLACON" 2072 = DukeActor, "*RRTILE2072" 2075 = DukeActor, "*RRTILE2075" 2083 = DukeActor, "*RRTILE2083" diff --git a/wadsrc/static/zscript/games/duke/actors/_placeholders.zs b/wadsrc/static/zscript/games/duke/actors/_placeholders.zs index c63fa5ffb..be47f71b1 100644 --- a/wadsrc/static/zscript/games/duke/actors/_placeholders.zs +++ b/wadsrc/static/zscript/games/duke/actors/_placeholders.zs @@ -18,7 +18,7 @@ class RedneckMotoHit : DukeActor { default { - pic "MOTOHIT"; + pic "MOTOHIT0"; } } diff --git a/wadsrc/static/zscript/games/duke/actors/redneckenemies/mosquito.zs b/wadsrc/static/zscript/games/duke/actors/redneckenemies/mosquito.zs index 30d8c9060..4a151fd9f 100644 --- a/wadsrc/static/zscript/games/duke/actors/redneckenemies/mosquito.zs +++ b/wadsrc/static/zscript/games/duke/actors/redneckenemies/mosquito.zs @@ -4,7 +4,7 @@ class RedneckMosquito : DukeActor const MOSQDAMAGE = -4; default { - pic "DRONE"; + pic "MOSQUITO"; +INTERNAL_BADGUY; +KILLCOUNT; +NOWATERDIP; diff --git a/wadsrc/static/zscript/games/duke/ui/sbar_r.zs b/wadsrc/static/zscript/games/duke/ui/sbar_r.zs index d02e7d75a..e51f8b656 100644 --- a/wadsrc/static/zscript/games/duke/ui/sbar_r.zs +++ b/wadsrc/static/zscript/games/duke/ui/sbar_r.zs @@ -48,7 +48,7 @@ class RedneckStatusBar : DukeCommonStatusBar ammo_sprites.PushV("", "AMMO", "SHOTGUNAMMO", "BATTERYAMMO", "HBOMBAMMO", "HBOMBAMMO", "SAWAMMO", "DEVISTATORAMMO", "POWDERKEG", "GROWSPRITEICON", "HBOMBAMMO", "", "BOWLINGBALLSPRITE", "MOTOAMMO", "BOATAMMO", "", "RPG2SPRITE"); - item_icons.PushV("", "FIRSTAID_ICON", "STEROIDS_ICON", "HOLODUKE_ICON", "JETPACK_ICON", "HEAT_ICON", "AIRTANK_ICON", "BOOT_ICON" ); + item_icons.PushV("", "WHISKEY_ICON", "MOONSHINE_ICON", "HOLODUKE_ICON", "COWPIE_ICON", "HEAT_ICON", "SNORKEL_ICON", "BOOT_ICON" ); }