From 4bf0029c329e25ccfe98af173cfc25195d5526a9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 28 May 2023 10:25:27 +0200 Subject: [PATCH] - remove lots of unneeded SAVE_CODE and SAVE_DATA declarations. Everything ported to VMFunctions can now be saved natively and the DECISIONs never get stored in serialized pointers. --- source/games/sw/src/actor.cpp | 20 ---- source/games/sw/src/ai.cpp | 46 -------- source/games/sw/src/bunny.cpp | 30 +---- source/games/sw/src/coolg.cpp | 23 +--- source/games/sw/src/coolie.cpp | 21 +--- source/games/sw/src/eel.cpp | 19 +--- source/games/sw/src/game.h | 2 + source/games/sw/src/girlninj.cpp | 21 +--- source/games/sw/src/goro.cpp | 18 +-- source/games/sw/src/hornet.cpp | 22 +--- source/games/sw/src/lava.cpp | 17 +-- source/games/sw/src/miscactr.cpp | 44 +------- source/games/sw/src/ninja.cpp | 26 +---- source/games/sw/src/ripper.cpp | 30 +---- source/games/sw/src/ripper2.cpp | 29 +---- source/games/sw/src/rotator.cpp | 23 ---- source/games/sw/src/saveable.cpp | 10 -- source/games/sw/src/sector.cpp | 26 ----- source/games/sw/src/serp.cpp | 18 +-- source/games/sw/src/skel.cpp | 21 +--- source/games/sw/src/skull.cpp | 20 +--- source/games/sw/src/slidor.cpp | 22 ---- source/games/sw/src/spike.cpp | 24 ---- source/games/sw/src/sprite.cpp | 20 +--- source/games/sw/src/sumo.cpp | 24 +--- source/games/sw/src/vator.cpp | 17 --- source/games/sw/src/wallmove.cpp | 25 ----- source/games/sw/src/weapon.cpp | 130 +--------------------- source/games/sw/src/zilla.cpp | 19 +--- source/games/sw/src/zombie.cpp | 18 +-- wadsrc/static/zscript/games/sw/swactor.zs | 1 + 31 files changed, 25 insertions(+), 761 deletions(-) diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index 4917cd0cc63..4e931aed003 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -952,26 +952,6 @@ int DoFall(DSWActor* actor) // //--------------------------------------------------------------------------- -#include "saveable.h" - -static saveable_code saveable_actor_code[] = -{ - SAVE_CODE(DoActorDebris), - SAVE_CODE(DoFireFly), - SAVE_CODE(DoGenerateSewerDebris), - SAVE_CODE(DoActorDeathMove), -}; - -saveable_module saveable_actor = -{ - // code - saveable_actor_code, - SIZ(saveable_actor_code), - - // data - nullptr,0 -}; - // helpers void DSWActor::ChangeStateEnd() diff --git a/source/games/sw/src/ai.cpp b/source/games/sw/src/ai.cpp index dd95f19aac7..fb1f0bdaf13 100644 --- a/source/games/sw/src/ai.cpp +++ b/source/games/sw/src/ai.cpp @@ -1634,51 +1634,5 @@ int DoActorPause(DSWActor* actor) return 0; } -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - -#include "saveable.h" -static saveable_code saveable_ai_code[] = -{ - SAVE_CODE(InitActorDecide), - SAVE_CODE(DoActorDecide), - SAVE_CODE(InitActorMoveCloser), - SAVE_CODE(DoActorMoveCloser), - SAVE_CODE(FindTrackToPlayer), - SAVE_CODE(FindTrackAwayFromPlayer), - SAVE_CODE(FindWanderTrack), - SAVE_CODE(InitActorRunAway), - SAVE_CODE(InitActorRunToward), - SAVE_CODE(InitActorAttack), - SAVE_CODE(DoActorAttack), - SAVE_CODE(InitActorEvade), - SAVE_CODE(InitActorWanderAround), - SAVE_CODE(InitActorFindPlayer), - SAVE_CODE(InitActorDuck), - SAVE_CODE(DoActorDuck), - SAVE_CODE(DoActorMoveJump), - SAVE_CODE(InitActorReposition), - SAVE_CODE(DoActorReposition), - SAVE_CODE(DoActorPause) -}; - -static saveable_data saveable_ai_data[] = -{ - SAVE_DATA(GenericFlaming) -}; - -saveable_module saveable_ai = -{ - // code - saveable_ai_code, - SIZ(saveable_ai_code), - - // data - saveable_ai_data, - SIZ(saveable_ai_data) -}; END_SW_NS diff --git a/source/games/sw/src/bunny.cpp b/source/games/sw/src/bunny.cpp index fb80ae677c8..4483fe4d8e4 100644 --- a/source/games/sw/src/bunny.cpp +++ b/source/games/sw/src/bunny.cpp @@ -1469,34 +1469,8 @@ int DoBunnyGrowUp(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_bunny_code[] = -{ - SAVE_CODE(DoBunnyBeginJumpAttack), - SAVE_CODE(DoBunnyMoveJump), - SAVE_CODE(DoPickCloseBunny), - SAVE_CODE(DoBunnyQuickJump), - SAVE_CODE(NullBunny), - SAVE_CODE(DoBunnyPain), - SAVE_CODE(DoBunnyRipHeart), - SAVE_CODE(DoBunnyStandKill), - SAVE_CODE(DoBunnyMove), - SAVE_CODE(BunnySpew), - SAVE_CODE(DoBunnyEat), - SAVE_CODE(DoBunnyScrew), - SAVE_CODE(DoBunnyGrowUp), -}; - static saveable_data saveable_bunny_data[] = { - SAVE_DATA(BunnyBattle), - SAVE_DATA(BunnyOffense), - SAVE_DATA(BunnyBroadcast), - SAVE_DATA(BunnySurprised), - SAVE_DATA(BunnyEvasive), - SAVE_DATA(BunnyLostTarget), - SAVE_DATA(BunnyCloseRange), - SAVE_DATA(BunnyWander), - SAVE_DATA(WhiteBunnyPersonality), SAVE_DATA(BunnyPersonality), @@ -1537,8 +1511,8 @@ static saveable_data saveable_bunny_data[] = saveable_module saveable_bunny = { // code - saveable_bunny_code, - SIZ(saveable_bunny_code), + nullptr, + 0, // data saveable_bunny_data, diff --git a/source/games/sw/src/coolg.cpp b/source/games/sw/src/coolg.cpp index e6803b27cfd..1740cf78966 100644 --- a/source/games/sw/src/coolg.cpp +++ b/source/games/sw/src/coolg.cpp @@ -923,28 +923,8 @@ int DoCoolgPain(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_coolg_code[] = -{ - SAVE_CODE(DoCoolgBirth), - SAVE_CODE(NullCoolg), - SAVE_CODE(InitCoolgCircle), - SAVE_CODE(DoCoolgCircle), - SAVE_CODE(DoCoolgDeath), - SAVE_CODE(DoCoolgMove), - SAVE_CODE(DoCoolgPain), -}; - static saveable_data saveable_coolg_data[] = { - SAVE_DATA(CoolgBattle), - SAVE_DATA(CoolgOffense), - SAVE_DATA(CoolgBroadcast), - SAVE_DATA(CoolgSurprised), - SAVE_DATA(CoolgEvasive), - SAVE_DATA(CoolgLostTarget), - SAVE_DATA(CoolgCloseRange), - SAVE_DATA(CoolgTouchTarget), - SAVE_DATA(CoolgPersonality), SAVE_DATA(CoolgAttrib), @@ -972,8 +952,7 @@ static saveable_data saveable_coolg_data[] = saveable_module saveable_coolg = { // code - saveable_coolg_code, - SIZ(saveable_coolg_code), + nullptr, 0, // data saveable_coolg_data, diff --git a/source/games/sw/src/coolie.cpp b/source/games/sw/src/coolie.cpp index c6917a8e529..e933b5b65ad 100644 --- a/source/games/sw/src/coolie.cpp +++ b/source/games/sw/src/coolie.cpp @@ -633,26 +633,8 @@ int DoCoolieWaitBirth(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_coolie_code[] = -{ - SAVE_CODE(SpawnCoolg), - SAVE_CODE(CooliePain), - SAVE_CODE(NullCoolie), - SAVE_CODE(DoCoolieMove), - SAVE_CODE(InitCoolieCharge), - SAVE_CODE(DoCoolieWaitBirth), -}; - static saveable_data saveable_coolie_data[] = { - SAVE_DATA(CoolieBattle), - SAVE_DATA(CoolieOffense), - SAVE_DATA(CoolieBroadcast), - SAVE_DATA(CoolieSurprised), - SAVE_DATA(CoolieEvasive), - SAVE_DATA(CoolieLostTarget), - SAVE_DATA(CoolieCloseRange), - SAVE_DATA(CooliePersonality), SAVE_DATA(CoolieAttrib), @@ -676,8 +658,7 @@ static saveable_data saveable_coolie_data[] = saveable_module saveable_coolie = { // code - saveable_coolie_code, - SIZ(saveable_coolie_code), + nullptr, 0, // data saveable_coolie_data, diff --git a/source/games/sw/src/eel.cpp b/source/games/sw/src/eel.cpp index b0390e24281..927be2b46f2 100644 --- a/source/games/sw/src/eel.cpp +++ b/source/games/sw/src/eel.cpp @@ -600,24 +600,8 @@ int DoEelMove(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_eel_code[] = -{ - SAVE_CODE(DoEelMatchPlayerZ), - SAVE_CODE(DoEelDeath), - SAVE_CODE(DoEelMove) -}; - static saveable_data saveable_eel_data[] = { - SAVE_DATA(EelBattle), - SAVE_DATA(EelOffense), - SAVE_DATA(EelBroadcast), - SAVE_DATA(EelSurprised), - SAVE_DATA(EelEvasive), - SAVE_DATA(EelLostTarget), - SAVE_DATA(EelCloseRange), - SAVE_DATA(EelTouchTarget), - SAVE_DATA(EelPersonality), SAVE_DATA(EelAttrib), @@ -639,8 +623,7 @@ static saveable_data saveable_eel_data[] = saveable_module saveable_eel = { // code - saveable_eel_code, - SIZ(saveable_eel_code), + nullptr, 0, // data saveable_eel_data, diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index e458549b6e9..8dbaed08840 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -2467,6 +2467,8 @@ DEF_ANIMATOR(DoLaserStart) DEF_ANIMATOR(DoTracerStart) DEF_ANIMATOR(DoRailStart) +DEF_ANIMATOR(DoGenerateSewerDebris) + END_SW_NS #endif diff --git a/source/games/sw/src/girlninj.cpp b/source/games/sw/src/girlninj.cpp index aa627b3a6bf..75d4d10ef4a 100644 --- a/source/games/sw/src/girlninj.cpp +++ b/source/games/sw/src/girlninj.cpp @@ -854,25 +854,8 @@ int DoGirlNinjaSpecial(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_girlninj_code[] = -{ - SAVE_CODE(DoGirlNinjaMove), - SAVE_CODE(GirlNinjaJumpActionFunc), - SAVE_CODE(NullGirlNinja), - SAVE_CODE(DoGirlNinjaPain), - SAVE_CODE(DoGirlNinjaSpecial), -}; - static saveable_data saveable_girlninj_data[] = { - SAVE_DATA(GirlNinjaBattle), - SAVE_DATA(GirlNinjaOffense), - SAVE_DATA(GirlNinjaBroadcast), - SAVE_DATA(GirlNinjaSurprised), - SAVE_DATA(GirlNinjaEvasive), - SAVE_DATA(GirlNinjaLostTarget), - SAVE_DATA(GirlNinjaCloseRange), - SAVE_DATA(GirlNinjaPersonality), SAVE_DATA(GirlNinjaAttrib), @@ -912,9 +895,7 @@ static saveable_data saveable_girlninj_data[] = saveable_module saveable_girlninj = { // code - saveable_girlninj_code, - SIZ(saveable_girlninj_code), - + nullptr, 0, // data saveable_girlninj_data, SIZ(saveable_girlninj_data) diff --git a/source/games/sw/src/goro.cpp b/source/games/sw/src/goro.cpp index c81dba0b11c..a9f59bc1434 100644 --- a/source/games/sw/src/goro.cpp +++ b/source/games/sw/src/goro.cpp @@ -567,23 +567,8 @@ int DoGoroMove(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_goro_code[] = -{ - SAVE_CODE(NullGoro), - SAVE_CODE(DoGoroPain), - SAVE_CODE(DoGoroMove), -}; - static saveable_data saveable_goro_data[] = { - SAVE_DATA(GoroBattle), - SAVE_DATA(GoroOffense), - SAVE_DATA(GoroBroadcast), - SAVE_DATA(GoroSurprised), - SAVE_DATA(GoroEvasive), - SAVE_DATA(GoroLostTarget), - SAVE_DATA(GoroCloseRange), - SAVE_DATA(GoroPersonality), SAVE_DATA(GoroAttrib), @@ -609,8 +594,7 @@ static saveable_data saveable_goro_data[] = saveable_module saveable_goro = { // code - saveable_goro_code, - SIZ(saveable_goro_code), + nullptr, 0, // data saveable_goro_data, diff --git a/source/games/sw/src/hornet.cpp b/source/games/sw/src/hornet.cpp index c76988a5407..8abfb4dd72d 100644 --- a/source/games/sw/src/hornet.cpp +++ b/source/games/sw/src/hornet.cpp @@ -619,27 +619,8 @@ int DoHornetMove(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_hornet_code[] = -{ - SAVE_CODE(NullHornet), - SAVE_CODE(DoHornetMatchPlayerZ), - SAVE_CODE(InitHornetCircle), - SAVE_CODE(DoHornetCircle), - SAVE_CODE(DoHornetDeath), - SAVE_CODE(DoCheckSwarm), - SAVE_CODE(DoHornetMove), -}; - static saveable_data saveable_hornet_data[] = { - SAVE_DATA(HornetBattle), - SAVE_DATA(HornetOffense), - SAVE_DATA(HornetBroadcast), - SAVE_DATA(HornetSurprised), - SAVE_DATA(HornetEvasive), - SAVE_DATA(HornetLostTarget), - SAVE_DATA(HornetCloseRange), - SAVE_DATA(HornetTouchTarget), SAVE_DATA(HornetPersonality), @@ -660,8 +641,7 @@ static saveable_data saveable_hornet_data[] = saveable_module saveable_hornet = { // code - saveable_hornet_code, - SIZ(saveable_hornet_code), + nullptr, 0, // data saveable_hornet_data, diff --git a/source/games/sw/src/lava.cpp b/source/games/sw/src/lava.cpp index e52fb2b25bb..bb7b191aebf 100644 --- a/source/games/sw/src/lava.cpp +++ b/source/games/sw/src/lava.cpp @@ -524,22 +524,8 @@ int DoLavaMove(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_lava_code[] = -{ - SAVE_CODE(NullLava), - SAVE_CODE(DoLavaMove), -}; - static saveable_data saveable_lava_data[] = { - SAVE_DATA(LavaBattle), - SAVE_DATA(LavaOffense), - SAVE_DATA(LavaBroadcast), - SAVE_DATA(LavaSurprised), - SAVE_DATA(LavaEvasive), - SAVE_DATA(LavaLostTarget), - SAVE_DATA(LavaCloseRange), - SAVE_DATA(LavaPersonality), SAVE_DATA(LavaAttrib), @@ -564,8 +550,7 @@ static saveable_data saveable_lava_data[] = saveable_module saveable_lava = { // code - saveable_lava_code, - SIZ(saveable_lava_code), + nullptr, 0, // data saveable_lava_data, diff --git a/source/games/sw/src/miscactr.cpp b/source/games/sw/src/miscactr.cpp index 176bbad6445..e4d7a416e8c 100644 --- a/source/games/sw/src/miscactr.cpp +++ b/source/games/sw/src/miscactr.cpp @@ -2101,47 +2101,6 @@ int PruneGirlPain(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_miscactr_code[] = -{ - SAVE_CODE(DoToiletGirl), - SAVE_CODE(NullToiletGirl), - SAVE_CODE(ToiletGirlUzi), - SAVE_CODE(ToiletGirlPain), - - SAVE_CODE(DoWashGirl), - SAVE_CODE(NullWashGirl), - SAVE_CODE(WashGirlUzi), - SAVE_CODE(WashGirlPain), - - SAVE_CODE(DoTrashCan), - SAVE_CODE(TrashCanPain), - - SAVE_CODE(PachinkoLightOperate), - - SAVE_CODE(PachinkoCheckWin), - SAVE_CODE(Pachinko1Operate), - - SAVE_CODE(DoCarGirl), - SAVE_CODE(NullCarGirl), - SAVE_CODE(CarGirlUzi), - SAVE_CODE(CarGirlPain), - - SAVE_CODE(DoMechanicGirl), - SAVE_CODE(NullMechanicGirl), - SAVE_CODE(MechanicGirlDrill), - SAVE_CODE(MechanicGirlPain), - - SAVE_CODE(DoSailorGirl), - SAVE_CODE(NullSailorGirl), - SAVE_CODE(SailorGirlThrow), - SAVE_CODE(SailorGirlPain), - - SAVE_CODE(DoPruneGirl), - SAVE_CODE(NullPruneGirl), - SAVE_CODE(PruneGirlUzi), - SAVE_CODE(PruneGirlPain), -}; - static saveable_data saveable_miscactr_data[] = { SAVE_DATA(ToiletGirlAttrib), @@ -2192,8 +2151,7 @@ static saveable_data saveable_miscactr_data[] = saveable_module saveable_miscactr = { // code - saveable_miscactr_code, - SIZ(saveable_miscactr_code), + nullptr, 0, // data saveable_miscactr_data, diff --git a/source/games/sw/src/ninja.cpp b/source/games/sw/src/ninja.cpp index 0c063aa5e9e..90d3ee97a42 100644 --- a/source/games/sw/src/ninja.cpp +++ b/source/games/sw/src/ninja.cpp @@ -2439,31 +2439,8 @@ void SpawnPlayerUnderSprite(PLAYER* pp) #include "saveable.h" -static saveable_code saveable_ninja_code[] = -{ - SAVE_CODE(DoNinjaHariKari), - SAVE_CODE(DoNinjaGrabThroat), - SAVE_CODE(DoNinjaMove), - SAVE_CODE(NinjaJumpActionFunc), - SAVE_CODE(NullNinja), - SAVE_CODE(DoNinjaPain), - SAVE_CODE(DoNinjaSpecial), - SAVE_CODE(CheckFire), - SAVE_CODE(DoNinjaCeiling) -}; - static saveable_data saveable_ninja_data[] = { - SAVE_DATA(NinjaBattle), - SAVE_DATA(NinjaOffense), - SAVE_DATA(NinjaBroadcast), - SAVE_DATA(NinjaSurprised), - SAVE_DATA(NinjaEvasive), - SAVE_DATA(NinjaLostTarget), - SAVE_DATA(NinjaCloseRange), - SAVE_DATA(NinjaSniperRoam), - SAVE_DATA(NinjaSniperBattle), - SAVE_DATA(NinjaPersonality), SAVE_DATA(NinjaSniperPersonality), @@ -2543,8 +2520,7 @@ static saveable_data saveable_ninja_data[] = saveable_module saveable_ninja = { // code - saveable_ninja_code, - SIZ(saveable_ninja_code), + nullptr, 0, // data saveable_ninja_data, diff --git a/source/games/sw/src/ripper.cpp b/source/games/sw/src/ripper.cpp index 38b1c2686ab..d9a8a014940 100644 --- a/source/games/sw/src/ripper.cpp +++ b/source/games/sw/src/ripper.cpp @@ -1293,35 +1293,8 @@ int DoRipperMove(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_ripper_code[] = -{ - - SAVE_CODE(InitRipperHang), - SAVE_CODE(DoRipperHang), - SAVE_CODE(DoRipperMoveHang), - SAVE_CODE(DoRipperHangJF), - - SAVE_CODE(DoRipperBeginJumpAttack), - SAVE_CODE(DoRipperMoveJump), - - SAVE_CODE(DoRipperQuickJump), - SAVE_CODE(NullRipper), - SAVE_CODE(DoRipperPain), - SAVE_CODE(DoRipperRipHeart), - SAVE_CODE(DoRipperStandHeart), - SAVE_CODE(DoRipperMove), -}; - static saveable_data saveable_ripper_data[] = { - SAVE_DATA(RipperBattle), - SAVE_DATA(RipperOffense), - SAVE_DATA(RipperBroadcast), - SAVE_DATA(RipperSurprised), - SAVE_DATA(RipperEvasive), - SAVE_DATA(RipperLostTarget), - SAVE_DATA(RipperCloseRange), - SAVE_DATA(RipperPersonality), SAVE_DATA(RipperAttrib), @@ -1366,8 +1339,7 @@ static saveable_data saveable_ripper_data[] = saveable_module saveable_ripper = { // code - saveable_ripper_code, - SIZ(saveable_ripper_code), + nullptr, 0, // data saveable_ripper_data, diff --git a/source/games/sw/src/ripper2.cpp b/source/games/sw/src/ripper2.cpp index 3cf5fc8d077..4a70876b42a 100644 --- a/source/games/sw/src/ripper2.cpp +++ b/source/games/sw/src/ripper2.cpp @@ -1334,35 +1334,9 @@ int ChestRipper2(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_ripper2_code[] = -{ - SAVE_CODE(InitRipper2Hang), - SAVE_CODE(DoRipper2Hang), - SAVE_CODE(DoRipper2MoveHang), - SAVE_CODE(DoRipper2HangJF), - - SAVE_CODE(DoRipper2BeginJumpAttack), - SAVE_CODE(DoRipper2MoveJump), - SAVE_CODE(NullRipper2), - SAVE_CODE(DoRipper2Pain), - SAVE_CODE(DoRipper2RipHeart), - SAVE_CODE(DoRipper2StandHeart), - SAVE_CODE(Ripper2Hatch), - SAVE_CODE(DoRipper2Move), - SAVE_CODE(InitRipper2Charge), - SAVE_CODE(ChestRipper2), -}; static saveable_data saveable_ripper2_data[] = { - SAVE_DATA(Ripper2Battle), - SAVE_DATA(Ripper2Offense), - SAVE_DATA(Ripper2Broadcast), - SAVE_DATA(Ripper2Surprised), - SAVE_DATA(Ripper2Evasive), - SAVE_DATA(Ripper2LostTarget), - SAVE_DATA(Ripper2CloseRange), - SAVE_DATA(Ripper2Personality), SAVE_DATA(Ripper2Attrib), @@ -1409,8 +1383,7 @@ static saveable_data saveable_ripper2_data[] = saveable_module saveable_ripper2 = { // code - saveable_ripper2_code, - SIZ(saveable_ripper2_code), + nullptr, 0, // data saveable_ripper2_data, diff --git a/source/games/sw/src/rotator.cpp b/source/games/sw/src/rotator.cpp index eadcb8c86d6..924ac7c1107 100644 --- a/source/games/sw/src/rotator.cpp +++ b/source/games/sw/src/rotator.cpp @@ -412,27 +412,4 @@ int DoRotator(DSWActor* actor) return 0; } -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - -#include "saveable.h" - -static saveable_code saveable_rotator_code[] = -{ - SAVE_CODE(DoRotator) -}; - -saveable_module saveable_rotator = -{ - // code - saveable_rotator_code, - SIZ(saveable_rotator_code), - - // data - nullptr,0 -}; - END_SW_NS diff --git a/source/games/sw/src/saveable.cpp b/source/games/sw/src/saveable.cpp index 3d75c4e96ca..5816ee1bf8d 100644 --- a/source/games/sw/src/saveable.cpp +++ b/source/games/sw/src/saveable.cpp @@ -40,9 +40,6 @@ void Saveable_Init(void) saveablemodules.Push(&saveable_ ## x); \ } - MODULE(actor) - MODULE(ai) - MODULE(ai) // was 'build' but that is not used anywhere anymore. MODULE(bunny) MODULE(coolg) MODULE(coolie) @@ -59,22 +56,15 @@ void Saveable_Init(void) MODULE(player) MODULE(ripper) MODULE(ripper2) - MODULE(rotator) MODULE(serp) MODULE(skel) MODULE(skull) - MODULE(slidor) - MODULE(spike) MODULE(sprite) MODULE(sumo) MODULE(track) - MODULE(vator) - MODULE(wallmove) MODULE(weapon) MODULE(zilla) MODULE(zombie) - - MODULE(sector) } //--------------------------------------------------------------------------- diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 434b72df478..d680ba5ff70 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -2983,30 +2983,4 @@ void DoSector(void) DoSpringBoardDown(); } -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - - -#include "saveable.h" - -static saveable_code saveable_sector_code[] = -{ - SAVE_CODE(DoSpawnSpot), -}; - -saveable_module saveable_sector = -{ - // code - saveable_sector_code, - SIZ(saveable_sector_code), - - // data - nullptr, - 0 -}; - - END_SW_NS diff --git a/source/games/sw/src/serp.cpp b/source/games/sw/src/serp.cpp index 45af0aea856..5dee6dc18bb 100644 --- a/source/games/sw/src/serp.cpp +++ b/source/games/sw/src/serp.cpp @@ -793,23 +793,8 @@ int DoDeathSpecial(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_serp_code[] = -{ - SAVE_CODE(NullSerp), - SAVE_CODE(DoSerpMove), - SAVE_CODE(DoDeathSpecial), -}; - static saveable_data saveable_serp_data[] = { - SAVE_DATA(SerpBattle), - SAVE_DATA(SerpOffense), - SAVE_DATA(SerpBroadcast), - SAVE_DATA(SerpSurprised), - SAVE_DATA(SerpEvasive), - SAVE_DATA(SerpLostTarget), - SAVE_DATA(SerpCloseRange), - SAVE_DATA(SerpPersonality), SAVE_DATA(SerpAttrib), @@ -840,8 +825,7 @@ static saveable_data saveable_serp_data[] = saveable_module saveable_serp = { // code - saveable_serp_code, - SIZ(saveable_serp_code), + nullptr, 0, // data saveable_serp_data, diff --git a/source/games/sw/src/skel.cpp b/source/games/sw/src/skel.cpp index 94a55d9f694..d67fa689863 100644 --- a/source/games/sw/src/skel.cpp +++ b/source/games/sw/src/skel.cpp @@ -645,26 +645,8 @@ int DoSkelMove(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_skel_code[] = -{ - SAVE_CODE(DoSkelInitTeleport), - SAVE_CODE(DoSkelTeleport), - SAVE_CODE(DoSkelTermTeleport), - SAVE_CODE(NullSkel), - SAVE_CODE(DoSkelPain), - SAVE_CODE(DoSkelMove), -}; - static saveable_data saveable_skel_data[] = { - SAVE_DATA(SkelBattle), - SAVE_DATA(SkelOffense), - SAVE_DATA(SkelBroadcast), - SAVE_DATA(SkelSurprised), - SAVE_DATA(SkelEvasive), - SAVE_DATA(SkelLostTarget), - SAVE_DATA(SkelCloseRange), - SAVE_DATA(SkelPersonality), SAVE_DATA(SkelAttrib), @@ -690,8 +672,7 @@ static saveable_data saveable_skel_data[] = saveable_module saveable_skel = { // code - saveable_skel_code, - SIZ(saveable_skel_code), + nullptr, 0, // data saveable_skel_data, diff --git a/source/games/sw/src/skull.cpp b/source/games/sw/src/skull.cpp index 9a134a49623..e8a7915a2bc 100644 --- a/source/games/sw/src/skull.cpp +++ b/source/games/sw/src/skull.cpp @@ -893,23 +893,6 @@ int DoBettyWait(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_skull_code[] = -{ - SAVE_CODE(DoSkullMove), - SAVE_CODE(DoSkullBeginDeath), - SAVE_CODE(DoSkullJump), - SAVE_CODE(DoSkullBob), - SAVE_CODE(DoSkullSpawnShrap), - SAVE_CODE(DoSkullWait), - - SAVE_CODE(DoBettyMove), - SAVE_CODE(DoBettyBeginDeath), - SAVE_CODE(DoBettyJump), - SAVE_CODE(DoBettyBob), - SAVE_CODE(DoBettySpawnShrap), - SAVE_CODE(DoBettyWait), -}; - static saveable_data saveable_skull_data[] = { SAVE_DATA(s_SkullWait), @@ -937,8 +920,7 @@ static saveable_data saveable_skull_data[] = saveable_module saveable_skull = { // code - saveable_skull_code, - SIZ(saveable_skull_code), + nullptr, 0, // data saveable_skull_data, diff --git a/source/games/sw/src/slidor.cpp b/source/games/sw/src/slidor.cpp index 150ea3f1d61..50473563978 100644 --- a/source/games/sw/src/slidor.cpp +++ b/source/games/sw/src/slidor.cpp @@ -609,26 +609,4 @@ int DoSlidor(DSWActor* actor) return 0; } -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - -#include "saveable.h" - -static saveable_code saveable_slidor_code[] = -{ - SAVE_CODE(DoSlidor), -}; - -saveable_module saveable_slidor = -{ - // code - saveable_slidor_code, - SIZ(saveable_slidor_code), - - // data - nullptr,0 -}; END_SW_NS diff --git a/source/games/sw/src/spike.cpp b/source/games/sw/src/spike.cpp index 7987e125fbb..431797979b0 100644 --- a/source/games/sw/src/spike.cpp +++ b/source/games/sw/src/spike.cpp @@ -477,28 +477,4 @@ int DoSpikeAuto(DSWActor* actor) return 0; } -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - - -#include "saveable.h" - -static saveable_code saveable_spike_code[] = -{ - SAVE_CODE(DoSpike), - SAVE_CODE(DoSpikeAuto), -}; - -saveable_module saveable_spike = -{ - // code - saveable_spike_code, - SIZ(saveable_spike_code), - - // data - nullptr,0 -}; END_SW_NS diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index 15a0260b3b2..329609fff44 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -6660,14 +6660,6 @@ Collision move_ground_missile(DSWActor* actor, const DVector2& change, double ce #include "saveable.h" -static saveable_code saveable_sprite_code[] = -{ - SAVE_CODE(DoGrating), - SAVE_CODE(DoKey), - SAVE_CODE(DoCoin), - SAVE_CODE(DoGet), -}; - static saveable_data saveable_sprite_data[] = { SAVE_DATA(Track), @@ -6696,13 +6688,7 @@ static saveable_data saveable_sprite_data[] = SAVE_DATA(s_GreenKey), SAVE_DATA(s_YellowKey), SAVE_DATA(s_Key), - /* - SAVE_DATA(s_BlueKeyStatue), - SAVE_DATA(s_RedKeyStatue), - SAVE_DATA(s_GreenKeyStatue), - SAVE_DATA(s_YellowKeyStatue), - SAVE_DATA(s_KeyStatue), - */ + SAVE_DATA(s_RedCoin), SAVE_DATA(s_YellowCoin), SAVE_DATA(s_GreenCoin), @@ -6738,7 +6724,6 @@ static saveable_data saveable_sprite_data[] = SAVE_DATA(s_IconSmMedkit), SAVE_DATA(s_IconBooster), SAVE_DATA(s_IconHeatCard), - //SAVE_DATA(s_IconEnvironSuit), SAVE_DATA(s_IconCloak), SAVE_DATA(s_IconFly), SAVE_DATA(s_IconNightVision), @@ -6748,8 +6733,7 @@ static saveable_data saveable_sprite_data[] = saveable_module saveable_sprite = { // code - saveable_sprite_code, - SIZ(saveable_sprite_code), + nullptr, 0, // data saveable_sprite_data, diff --git a/source/games/sw/src/sumo.cpp b/source/games/sw/src/sumo.cpp index 82605b3a443..62f722ee1bd 100644 --- a/source/games/sw/src/sumo.cpp +++ b/source/games/sw/src/sumo.cpp @@ -845,35 +845,14 @@ void BossHealthMeter(void) #include "saveable.h" -static saveable_code saveable_sumo_code[] = -{ - SAVE_CODE(NullSumo), - SAVE_CODE(DoSumoMove), - SAVE_CODE(DoSumoRumble), - SAVE_CODE(InitSumoFart), - SAVE_CODE(InitSumoStomp), - SAVE_CODE(InitSumoClap), - SAVE_CODE(DoSumoDeathMelt), -}; - static saveable_data saveable_sumo_data[] = { - SAVE_DATA(SumoBattle), - SAVE_DATA(SumoOffense), - SAVE_DATA(SumoBroadcast), - SAVE_DATA(SumoSurprised), - SAVE_DATA(SumoEvasive), - SAVE_DATA(SumoLostTarget), - SAVE_DATA(SumoCloseRange), - SAVE_DATA(SumoPersonality), SAVE_DATA(SumoAttrib), SAVE_DATA(s_SumoRun), SAVE_DATA(sg_SumoRun), - //SAVE_DATA(s_SumoCharge), - //SAVE_DATA(sg_SumoCharge), SAVE_DATA(s_SumoStand), SAVE_DATA(sg_SumoStand), SAVE_DATA(s_SumoPain), @@ -896,8 +875,7 @@ static saveable_data saveable_sumo_data[] = saveable_module saveable_sumo = { // code - saveable_sumo_code, - SIZ(saveable_sumo_code), + nullptr, 0, // data saveable_sumo_data, diff --git a/source/games/sw/src/vator.cpp b/source/games/sw/src/vator.cpp index 885218eaf9e..1acd7d77969 100644 --- a/source/games/sw/src/vator.cpp +++ b/source/games/sw/src/vator.cpp @@ -574,21 +574,4 @@ int DoVatorAuto(DSWActor* actor) } -#include "saveable.h" - -static saveable_code saveable_vator_code[] = -{ - SAVE_CODE(DoVator), - SAVE_CODE(DoVatorAuto), -}; - -saveable_module saveable_vator = -{ - // code - saveable_vator_code, - SIZ(saveable_vator_code), - - // data - nullptr,0 -}; END_SW_NS diff --git a/source/games/sw/src/wallmove.cpp b/source/games/sw/src/wallmove.cpp index 6150bc2cf45..1e5359e9458 100644 --- a/source/games/sw/src/wallmove.cpp +++ b/source/games/sw/src/wallmove.cpp @@ -213,29 +213,4 @@ int DoWallMoveMatch(short match) return found; } -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - - -#include "saveable.h" - -static saveable_code saveable_wallmove_code[] = -{ - SAVE_CODE(DoWallMove), - SAVE_CODE(CanSeeWallMove), - SAVE_CODE(DoWallMoveMatch), -}; - -saveable_module saveable_wallmove = -{ - // code - saveable_wallmove_code, - SIZ(saveable_wallmove_code), - - // data - nullptr,0 -}; END_SW_NS diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index af2fdb6b486..6ba664f5942 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -18553,133 +18553,6 @@ void QueueLoWangs(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_weapon_code[] = -{ - SAVE_CODE(SpawnShrapX), - SAVE_CODE(DoLavaErupt), - SAVE_CODE(DoVomit), - SAVE_CODE(DoVomitSplash), - SAVE_CODE(DoFastShrapJumpFall), - SAVE_CODE(DoTracerShrap), - SAVE_CODE(DoShrapJumpFall), - SAVE_CODE(DoShrapDamage), - SAVE_CODE(DoUziSmoke), - SAVE_CODE(DoShotgunSmoke), - SAVE_CODE(DoMineSpark), - SAVE_CODE(DoFireballFlames), - SAVE_CODE(DoBreakFlames), - SAVE_CODE(DoActorScale), - SAVE_CODE(DoRipperGrow), - SAVE_CODE(DoDamageTest), - SAVE_CODE(DoStar), - SAVE_CODE(DoCrossBolt), - SAVE_CODE(DoPlasmaDone), - SAVE_CODE(DoPlasmaFountain), - SAVE_CODE(DoPlasma), - SAVE_CODE(DoCoolgFire), - SAVE_CODE(DoEelFire), - SAVE_CODE(DoGrenade), - SAVE_CODE(DoVulcanBoulder), - SAVE_CODE(DoMineStuck), - SAVE_CODE(DoMine), - SAVE_CODE(DoPuff), - SAVE_CODE(DoRailPuff), - SAVE_CODE(DoBoltThinMan), - SAVE_CODE(DoTracer), - SAVE_CODE(DoEMP), - SAVE_CODE(DoEMPBurst), - SAVE_CODE(DoTankShell), - SAVE_CODE(DoTracerStart), - SAVE_CODE(DoLaser), - SAVE_CODE(DoLaserStart), - SAVE_CODE(DoRail), - SAVE_CODE(DoRailStart), - SAVE_CODE(DoRocket), - SAVE_CODE(DoMicroMini), - SAVE_CODE(SpawnExtraMicroMini), - SAVE_CODE(DoMicro), - SAVE_CODE(DoUziBullet), - SAVE_CODE(DoBoltSeeker), - SAVE_CODE(DoBoltShrapnel), - SAVE_CODE(DoBoltFatMan), - SAVE_CODE(DoElectro), - SAVE_CODE(DoLavaBoulder), - SAVE_CODE(DoSpear), - SAVE_CODE(SpawnGrenadeSmallExp), - SAVE_CODE(SpawnGrenadeExp), - SAVE_CODE(SpawnMineExp), - SAVE_CODE(DoSectorExp), - SAVE_CODE(SpawnSectorExp), - SAVE_CODE(SpawnLargeExp), - SAVE_CODE(SpawnMeteorExp), - SAVE_CODE(SpawnLittleExp), - SAVE_CODE(DoFireball), - SAVE_CODE(DoFindGround), - SAVE_CODE(DoFindGroundPoint), - SAVE_CODE(DoNapalm), - SAVE_CODE(DoBloodWorm), - SAVE_CODE(DoMeteor), - SAVE_CODE(DoSerpMeteor), - SAVE_CODE(DoMirvMissile), - SAVE_CODE(DoMirv), - SAVE_CODE(DoRing), - SAVE_CODE(DoSerpRing), - SAVE_CODE(InitLavaFlame), - SAVE_CODE(InitLavaThrow), - SAVE_CODE(InitVulcanBoulder), - SAVE_CODE(InitSerpRing), - SAVE_CODE(InitSerpRing), - SAVE_CODE(InitSpellNapalm), - SAVE_CODE(InitEnemyNapalm), - SAVE_CODE(InitSpellMirv), - SAVE_CODE(InitEnemyMirv), - SAVE_CODE(InitSwordAttack), - SAVE_CODE(InitFistAttack), - SAVE_CODE(InitSumoNapalm), - SAVE_CODE(InitSumoSkull), - SAVE_CODE(InitSumoStompAttack), - SAVE_CODE(InitMiniSumoClap), - SAVE_CODE(InitZillaRail), - SAVE_CODE(InitEnemyNuke), - SAVE_CODE(InitRipperSlash), - SAVE_CODE(InitBunnySlash), - SAVE_CODE(InitSerpSlash), - SAVE_CODE(InitCoolgBash), - SAVE_CODE(InitSkelSlash), - SAVE_CODE(InitGoroChop), - SAVE_CODE(InitHornetSting), - SAVE_CODE(InitSerpSpell), - SAVE_CODE(InitSerpMonstSpell), - SAVE_CODE(DoTeleRipper), - SAVE_CODE(InitEnemyRocket), - SAVE_CODE(InitEnemyRail), - SAVE_CODE(InitZillaRocket), - SAVE_CODE(InitEnemyStar), - SAVE_CODE(InitEnemyCrossbow), - SAVE_CODE(InitSkelSpell), - SAVE_CODE(InitCoolgFire), - SAVE_CODE(InitCoolgDrip), - SAVE_CODE(GenerateDrips), - SAVE_CODE(InitEelFire), - SAVE_CODE(InitFireballTrap), - SAVE_CODE(InitBoltTrap), - SAVE_CODE(InitEnemyCrossbow), - SAVE_CODE(InitSpearTrap), - SAVE_CODE(DoSuicide), - SAVE_CODE(DoDefaultStat), - SAVE_CODE(InitEnemyUzi), - SAVE_CODE(InitSpriteGrenade), - SAVE_CODE(InitEnemyMine), - SAVE_CODE(InitEnemyFireball), - SAVE_CODE(DoVehicleSmoke), - SAVE_CODE(DoWaterSmoke), - SAVE_CODE(SpawnVehicleSmoke), - SAVE_CODE(SpawnSmokePuff), - SAVE_CODE(DoBubble), - SAVE_CODE(DoFloorBlood), - SAVE_CODE(DoWallBlood), - SAVE_CODE(DoItemFly), -}; static saveable_data saveable_weapon_data[] = { @@ -18854,8 +18727,7 @@ static saveable_data saveable_weapon_data[] = saveable_module saveable_weapon = { // code - saveable_weapon_code, - SIZ(saveable_weapon_code), + nullptr, 0, // data saveable_weapon_data, diff --git a/source/games/sw/src/zilla.cpp b/source/games/sw/src/zilla.cpp index a1c5d8750b0..ae17145b696 100644 --- a/source/games/sw/src/zilla.cpp +++ b/source/games/sw/src/zilla.cpp @@ -740,24 +740,8 @@ int DoZillaDeathMelt(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_zilla_code[] = -{ - SAVE_CODE(NullZilla), - SAVE_CODE(DoZillaMove), - SAVE_CODE(DoZillaStomp), - SAVE_CODE(DoZillaDeathMelt), -}; - static saveable_data saveable_zilla_data[] = { - SAVE_DATA(ZillaBattle), - SAVE_DATA(ZillaOffense), - SAVE_DATA(ZillaBroadcast), - SAVE_DATA(ZillaSurprised), - SAVE_DATA(ZillaEvasive), - SAVE_DATA(ZillaLostTarget), - SAVE_DATA(ZillaCloseRange), - SAVE_DATA(ZillaPersonality), SAVE_DATA(ZillaAttrib), @@ -785,8 +769,7 @@ static saveable_data saveable_zilla_data[] = saveable_module saveable_zilla = { // code - saveable_zilla_code, - SIZ(saveable_zilla_code), + nullptr, 0, // data saveable_zilla_data, diff --git a/source/games/sw/src/zombie.cpp b/source/games/sw/src/zombie.cpp index 518ca07453a..a288b32785a 100644 --- a/source/games/sw/src/zombie.cpp +++ b/source/games/sw/src/zombie.cpp @@ -973,23 +973,8 @@ int DoZombiePain(DSWActor* actor) #include "saveable.h" -static saveable_code saveable_zombie_code[] = -{ - SAVE_CODE(DoZombieMove), - SAVE_CODE(NullZombie), - SAVE_CODE(DoZombiePain), -}; - static saveable_data saveable_zombie_data[] = { - SAVE_DATA(ZombieBattle), - SAVE_DATA(ZombieOffense), - SAVE_DATA(ZombieBroadcast), - SAVE_DATA(ZombieSurprised), - SAVE_DATA(ZombieEvasive), - SAVE_DATA(ZombieLostTarget), - SAVE_DATA(ZombieCloseRange), - SAVE_DATA(ZombiePersonality), SAVE_DATA(ZombieAttrib), @@ -1021,8 +1006,7 @@ static saveable_data saveable_zombie_data[] = saveable_module saveable_zombie = { // code - saveable_zombie_code, - SIZ(saveable_zombie_code), + nullptr, 0, // data saveable_zombie_data, diff --git a/wadsrc/static/zscript/games/sw/swactor.zs b/wadsrc/static/zscript/games/sw/swactor.zs index 2a962fcda2c..5b6970061d7 100644 --- a/wadsrc/static/zscript/games/sw/swactor.zs +++ b/wadsrc/static/zscript/games/sw/swactor.zs @@ -290,5 +290,6 @@ class SWActor : CoreActor native native int DoLaserStart(); native int DoTracerStart(); native int DoRailStart(); + native int DoGenerateSewerDebris(); }