From 771b4bcf43e7e094e1a86dfeae8b180c225dfa7a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 30 Oct 2021 20:03:15 +0200 Subject: [PATCH] - renamed ChangeState to ChangeSpriteState. --- source/games/sw/src/actor.cpp | 24 +++++----- source/games/sw/src/break.cpp | 5 -- source/games/sw/src/bunny.cpp | 2 +- source/games/sw/src/coolg.cpp | 6 +-- source/games/sw/src/coolie.cpp | 4 +- source/games/sw/src/eel.cpp | 2 +- source/games/sw/src/game.h | 2 +- source/games/sw/src/girlninj.cpp | 2 +- source/games/sw/src/goro.cpp | 2 +- source/games/sw/src/hornet.cpp | 2 +- source/games/sw/src/jweapon.cpp | 10 ++-- source/games/sw/src/lava.cpp | 2 +- source/games/sw/src/miscactr.cpp | 78 ++++++++++++++++---------------- source/games/sw/src/ninja.cpp | 18 ++++---- source/games/sw/src/ripper.cpp | 2 +- source/games/sw/src/ripper2.cpp | 2 +- source/games/sw/src/sector.cpp | 8 ++-- source/games/sw/src/serp.cpp | 2 +- source/games/sw/src/skel.cpp | 2 +- source/games/sw/src/skull.cpp | 8 ++-- source/games/sw/src/sprite.cpp | 12 ++--- source/games/sw/src/sumo.cpp | 2 +- source/games/sw/src/weapon.cpp | 40 ++++++++-------- source/games/sw/src/weapon.h | 2 +- source/games/sw/src/zilla.cpp | 2 +- source/games/sw/src/zombie.cpp | 2 +- 26 files changed, 119 insertions(+), 124 deletions(-) diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index fb2b0d62b..55878b871 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -111,12 +111,12 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) switch (meansofdeath) { case WPN_NM_LAVA: - ChangeState(SpriteNum, u->StateEnd); + ChangeSpriteState(SpriteNum, u->StateEnd); u->RotNum = 0; break; case WPN_NM_SECTOR_SQUISH: - ChangeState(SpriteNum, u->StateEnd); + ChangeSpriteState(SpriteNum, u->StateEnd); u->RotNum = 0; break; } @@ -134,7 +134,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) // Coolie actually explodes himself // he is the Sprite AND Weapon case COOLIE_RUN_R0: - ChangeState(SpriteNum, u->StateEnd); + ChangeSpriteState(SpriteNum, u->StateEnd); u->RotNum = 0; sp->xvel <<= 1; u->ActorActionFunc = nullptr; @@ -152,9 +152,9 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) InitPlasmaFountain(wp, sp); PlaySound(DIGI_NINJAINHALF, sp, v3df_none); if (sw_ninjahack) - ChangeState(SpriteNum, &s_NinjaDieSlicedHack[5]); + ChangeSpriteState(SpriteNum, &s_NinjaDieSlicedHack[5]); else - ChangeState(SpriteNum, &s_NinjaDieSliced[0]); + ChangeSpriteState(SpriteNum, &s_NinjaDieSliced[0]); } else { @@ -163,7 +163,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) InitPlasmaFountain(wp, sp); } - ChangeState(SpriteNum, u->StateEnd); + ChangeSpriteState(SpriteNum, u->StateEnd); u->RotNum = 0; u->ActorActionFunc = nullptr; sp->xvel = 200 + RandomRange(200); @@ -177,7 +177,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) // test for gibable dead bodies if (RandomRange(1000) > 500) SET(sp->cstat, CSTAT_SPRITE_YFLIP); - ChangeState(SpriteNum, u->StateEnd); + ChangeSpriteState(SpriteNum, u->StateEnd); sp->xvel = 0; u->jump_speed = 0; DoActorBeginJump(actor); @@ -198,14 +198,14 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) case EEL_RUN_R0: case STAR1: case SUMO_RUN_R0: - ChangeState(SpriteNum, u->StateEnd); + ChangeSpriteState(SpriteNum, u->StateEnd); u->RotNum = 0; break; case UZI_SMOKE: if (RandomRange(1000) > 500) SET(sp->cstat, CSTAT_SPRITE_YFLIP); - ChangeState(SpriteNum, u->StateEnd); + ChangeSpriteState(SpriteNum, u->StateEnd); u->RotNum = 0; // Rippers still gotta jump or they fall off walls weird if (u->ID == RIPPER_RUN_R0 || u->ID == RIPPER2_RUN_R0) @@ -228,7 +228,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) case UZI_SMOKE+1: // Shotgun if (RandomRange(1000) > 500) SET(sp->cstat, CSTAT_SPRITE_YFLIP); - ChangeState(SpriteNum, u->StateEnd); + ChangeSpriteState(SpriteNum, u->StateEnd); u->RotNum = 0; // Rippers still gotta jump or they fall off walls weird @@ -253,7 +253,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) { case SKULL_R0: case BETTY_R0: - ChangeState(SpriteNum, u->StateEnd); + ChangeSpriteState(SpriteNum, u->StateEnd); break; default: @@ -264,7 +264,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) if (RandomRange(1000) > 500) SET(sp->cstat, CSTAT_SPRITE_YFLIP); - ChangeState(SpriteNum, u->StateEnd); + ChangeSpriteState(SpriteNum, u->StateEnd); u->RotNum = 0; u->ActorActionFunc = nullptr; sp->xvel = 300 + RandomRange(400); diff --git a/source/games/sw/src/break.cpp b/source/games/sw/src/break.cpp index 552a30c48..c782a72da 100644 --- a/source/games/sw/src/break.cpp +++ b/source/games/sw/src/break.cpp @@ -883,7 +883,6 @@ int UserBreakSprite(short BreakSprite) DoMatchEverything(nullptr, match, -1); // Kill sound if one is attached DeleteNoSoundOwner(BreakSprite); - //change_sprite_stat(BreakSprite, STAT_SUICIDE); KillBreakSprite(BreakSprite); return true; } @@ -913,8 +912,6 @@ int UserBreakSprite(short BreakSprite) // Kill sound if one is attached DeleteNoSoundOwner(BreakSprite); KillBreakSprite(BreakSprite); - //KillSprite(BreakSprite); - //change_sprite_stat(BreakSprite, STAT_SUICIDE); return true; } else if (SP_TAG8(sp) == 2) @@ -1004,8 +1001,6 @@ int AutoBreakSprite(short BreakSprite, short type) // Kill sound if one is attached DeleteNoSoundOwner(BreakSprite); KillBreakSprite(BreakSprite); - //change_sprite_stat(BreakSprite, STAT_SUICIDE); - //KillSprite(BreakSprite); return true; } else diff --git a/source/games/sw/src/bunny.cpp b/source/games/sw/src/bunny.cpp index faf09ad10..f8e33a4c7 100644 --- a/source/games/sw/src/bunny.cpp +++ b/source/games/sw/src/bunny.cpp @@ -749,7 +749,7 @@ SetupBunny(short SpriteNum) // return(0); // } - ChangeState(SpriteNum, s_BunnyRun[0]); + ChangeSpriteState(SpriteNum, s_BunnyRun[0]); u->StateEnd = s_BunnyDie; u->Rot = sg_BunnyRun; //sp->xrepeat = 64; diff --git a/source/games/sw/src/coolg.cpp b/source/games/sw/src/coolg.cpp index 1c7b6ed31..4c0ed0616 100644 --- a/source/games/sw/src/coolg.cpp +++ b/source/games/sw/src/coolg.cpp @@ -530,7 +530,7 @@ int SetupCoolg(DSWActor* actor) } u = actor->u(); - ChangeState(SpriteNum, s_CoolgRun[0]); + ChangeSpriteState(SpriteNum, s_CoolgRun[0]); u->Attrib = &CoolgAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_CoolgDie; @@ -560,7 +560,7 @@ int NewCoolg(DSWActor* actor) nu = actorNew->u(); np = &actorNew->s(); - ChangeState(actorNew->GetSpriteIndex(), &s_CoolgBirth[0]); + ChangeSpriteState(actorNew->GetSpriteIndex(), &s_CoolgBirth[0]); nu->StateEnd = s_CoolgDie; nu->Rot = sg_CoolgRun; np->pal = nu->spal = u->spal; @@ -589,7 +589,7 @@ int DoCoolgBirth(DSWActor* actor) u->Attrib = &CoolgAttrib; DoActorSetSpeed(actor, NORM_SPEED); - ChangeState(New, s_CoolgRun[0]); + ChangeSpriteState(New, s_CoolgRun[0]); u->StateEnd = s_CoolgDie; u->Rot = sg_CoolgRun; diff --git a/source/games/sw/src/coolie.cpp b/source/games/sw/src/coolie.cpp index 827357c8e..149b40c30 100644 --- a/source/games/sw/src/coolie.cpp +++ b/source/games/sw/src/coolie.cpp @@ -542,7 +542,7 @@ SetupCoolie(short SpriteNum) u->Health = HEALTH_COOLIE; } - ChangeState(SpriteNum,s_CoolieRun[0]); + ChangeSpriteState(SpriteNum,s_CoolieRun[0]); u->Attrib = &CoolieAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_CoolieDie; @@ -672,7 +672,7 @@ DoCoolieWaitBirth(DSWActor* actor) if ((u->Counter -= ACTORMOVETICS) <= 0) { - ChangeState(SpriteNum,&s_CoolieDie[9]); + ChangeSpriteState(SpriteNum,&s_CoolieDie[9]); } return 0; diff --git a/source/games/sw/src/eel.cpp b/source/games/sw/src/eel.cpp index 89cdad393..dfa9241b3 100644 --- a/source/games/sw/src/eel.cpp +++ b/source/games/sw/src/eel.cpp @@ -394,7 +394,7 @@ SetupEel(short SpriteNum) u->Health = 40; } - ChangeState(SpriteNum, s_EelRun[0]); + ChangeSpriteState(SpriteNum, s_EelRun[0]); u->Attrib = &EelAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_EelDie; diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index 52eab783d..8fd7cd010 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -1945,7 +1945,7 @@ void SetOwner(int a, int b); // we still need this... void ClearOwner(DSWActor* ownr); void SetAttach(short, short); void analyzesprites(spritetype* tsprite, int& spritesortcnt, int viewx, int viewy, int viewz, int camang); -void ChangeState(short SpriteNum, STATEp statep); +void ChangeSpriteState(short SpriteNum, STATEp statep); void CollectPortals(); #define FAF_PLACE_MIRROR_PIC 341 diff --git a/source/games/sw/src/girlninj.cpp b/source/games/sw/src/girlninj.cpp index c7693eae6..86c1a90a7 100644 --- a/source/games/sw/src/girlninj.cpp +++ b/source/games/sw/src/girlninj.cpp @@ -740,7 +740,7 @@ SetupGirlNinja(short SpriteNum) sp->pal = u->spal = 26; EnemyDefaults(SpriteNum, &GirlNinjaActionSet, &GirlNinjaPersonality); - ChangeState(SpriteNum, s_GirlNinjaRun[0]); + ChangeSpriteState(SpriteNum, s_GirlNinjaRun[0]); DoActorSetSpeed(actor, NORM_SPEED); u->Radius = 280; diff --git a/source/games/sw/src/goro.cpp b/source/games/sw/src/goro.cpp index 2d5538912..d89a2fae7 100644 --- a/source/games/sw/src/goro.cpp +++ b/source/games/sw/src/goro.cpp @@ -500,7 +500,7 @@ SetupGoro(short SpriteNum) u->Health = HEALTH_GORO; } - ChangeState(SpriteNum, s_GoroRun[0]); + ChangeSpriteState(SpriteNum, s_GoroRun[0]); u->Attrib = &GoroAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_GoroDie; diff --git a/source/games/sw/src/hornet.cpp b/source/games/sw/src/hornet.cpp index 9569deb0f..fca89e74f 100644 --- a/source/games/sw/src/hornet.cpp +++ b/source/games/sw/src/hornet.cpp @@ -306,7 +306,7 @@ SetupHornet(short SpriteNum) u->Health = HEALTH_HORNET; } - ChangeState(SpriteNum, s_HornetRun[0]); + ChangeSpriteState(SpriteNum, s_HornetRun[0]); u->Attrib = &HornetAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_HornetDie; diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index aff27d7d6..df6b3f11f 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -498,7 +498,7 @@ DoBloodSpray(DSWActor* actor) } RESET(sp->cstat,CSTAT_SPRITE_INVISIBLE); - ChangeState(Weapon, s_BloodSprayDrip); + ChangeSpriteState(Weapon, s_BloodSprayDrip); } //WallBounce(Weapon, wall_ang); @@ -1194,7 +1194,7 @@ DoCaltrops(DSWActor* actor) u->xchange = u->ychange = 0; SET(sp->extra, SPRX_BREAKABLE); SET(sp->cstat,CSTAT_SPRITE_BREAKABLE); - ChangeState(Weapon, s_CaltropsStick); + ChangeSpriteState(Weapon, s_CaltropsStick); return true; } } @@ -1232,7 +1232,7 @@ DoCaltrops(DSWActor* actor) u->xchange = u->ychange = 0; SET(sp->extra, SPRX_BREAKABLE); SET(sp->cstat,CSTAT_SPRITE_BREAKABLE); - ChangeState(Weapon, s_CaltropsStick); + ChangeSpriteState(Weapon, s_CaltropsStick); return true; } } @@ -2421,9 +2421,9 @@ SetCarryFlag(int16_t Weapon) u->Counter = 0; change_sprite_stat(Weapon, STAT_ITEM); if (sp->hitag == 1) - ChangeState(Weapon, s_CarryFlagNoDet); + ChangeSpriteState(Weapon, s_CarryFlagNoDet); else - ChangeState(Weapon, s_CarryFlag); + ChangeSpriteState(Weapon, s_CarryFlag); return false; } diff --git a/source/games/sw/src/lava.cpp b/source/games/sw/src/lava.cpp index ae79b5b05..336c44cc2 100644 --- a/source/games/sw/src/lava.cpp +++ b/source/games/sw/src/lava.cpp @@ -470,7 +470,7 @@ SetupLava(short SpriteNum) u->Health = 100; } - ChangeState(SpriteNum, s_LavaRun[0]); + ChangeSpriteState(SpriteNum, s_LavaRun[0]); u->Attrib = &LavaAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_LavaDie; diff --git a/source/games/sw/src/miscactr.cpp b/source/games/sw/src/miscactr.cpp index 33c76b205..c897f611c 100644 --- a/source/games/sw/src/miscactr.cpp +++ b/source/games/sw/src/miscactr.cpp @@ -131,7 +131,7 @@ SetupToiletGirl(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_ToiletGirlStand); + ChangeSpriteState(SpriteNum,s_ToiletGirlStand); u->Attrib = &ToiletGirlAttrib; u->StateEnd = s_ToiletGirlStand; u->Rot = 0; @@ -187,7 +187,7 @@ int DoToiletGirl(DSWActor* actor) else PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan, CHAN_AnimeMad); } - ChangeState(SpriteNum,s_ToiletGirlUzi); + ChangeSpriteState(SpriteNum,s_ToiletGirlUzi); u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8); u->FlagOwner = 0; } @@ -233,7 +233,7 @@ int NullToiletGirl(DSWActor* actor) else PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan, CHAN_AnimeMad); } - ChangeState(SpriteNum,s_ToiletGirlUzi); + ChangeSpriteState(SpriteNum,s_ToiletGirlUzi); u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8); u->FlagOwner = 0; } @@ -252,7 +252,7 @@ int ToiletGirlUzi(DSWActor* actor) if ((u->WaitTics -= ACTORMOVETICS) <= 0) { u->WaitTics = RandomRange(240)+120; - ChangeState(SpriteNum,s_ToiletGirlStand); + ChangeSpriteState(SpriteNum,s_ToiletGirlStand); u->FlagOwner = 0; } @@ -267,7 +267,7 @@ int ToiletGirlPain(DSWActor* actor) NullToiletGirl(actor); if ((u->WaitTics -= ACTORMOVETICS) <= 0) - ChangeState(SpriteNum,s_ToiletGirlStand); + ChangeSpriteState(SpriteNum,s_ToiletGirlStand); return 0; } @@ -374,7 +374,7 @@ SetupWashGirl(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_WashGirlStand); + ChangeSpriteState(SpriteNum,s_WashGirlStand); u->Attrib = &WashGirlAttrib; u->StateEnd = s_WashGirlStand; u->Rot = 0; @@ -412,7 +412,7 @@ int DoWashGirl(DSWActor* actor) PlaySound(DIGI_ANIMESING2, sp, v3df_dontpan, CHAN_AnimeSing); } - ChangeState(SpriteNum,s_WashGirlStandScrub); + ChangeSpriteState(SpriteNum,s_WashGirlStandScrub); u->ShellNum = RandomRange(2*120)+240; } else @@ -421,7 +421,7 @@ int DoWashGirl(DSWActor* actor) { if ((u->ShellNum -= ACTORMOVETICS) < 0) { - ChangeState(SpriteNum,s_WashGirlStand); + ChangeSpriteState(SpriteNum,s_WashGirlStand); u->ShellNum = 0; } } @@ -439,7 +439,7 @@ int DoWashGirl(DSWActor* actor) else PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan, CHAN_AnimeMad); } - ChangeState(SpriteNum,s_WashGirlUzi); + ChangeSpriteState(SpriteNum,s_WashGirlUzi); u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8); u->FlagOwner = 0; } @@ -482,7 +482,7 @@ int NullWashGirl(DSWActor* actor) else PlaySound(DIGI_ANIMEMAD2, sp, v3df_dontpan, CHAN_AnimeMad); } - ChangeState(SpriteNum,s_WashGirlUzi); + ChangeSpriteState(SpriteNum,s_WashGirlUzi); u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8); u->FlagOwner = 0; } @@ -501,7 +501,7 @@ int WashGirlUzi(DSWActor* actor) if ((u->WaitTics -= ACTORMOVETICS) <= 0) { u->WaitTics = RandomRange(240)+120; - ChangeState(SpriteNum,s_WashGirlStand); + ChangeSpriteState(SpriteNum,s_WashGirlStand); u->FlagOwner = 0; } @@ -515,7 +515,7 @@ int WashGirlPain(DSWActor* actor) NullWashGirl(actor); if ((u->WaitTics -= ACTORMOVETICS) <= 0) - ChangeState(SpriteNum,s_WashGirlStand); + ChangeSpriteState(SpriteNum,s_WashGirlStand); return 0; } @@ -586,7 +586,7 @@ SetupTrashCan(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_TrashCanStand); + ChangeSpriteState(SpriteNum,s_TrashCanStand); u->Attrib = &TrashCanAttrib; u->StateEnd = s_TrashCanStand; u->Rot = 0; @@ -638,7 +638,7 @@ int TrashCanPain(DSWActor* actor) KeepActorOnFloor(actor); if ((u->WaitTics -= ACTORMOVETICS) <= 0) - ChangeState(SpriteNum,s_TrashCanStand); + ChangeSpriteState(SpriteNum,s_TrashCanStand); return 0; } @@ -696,7 +696,7 @@ SetupPachinkoLight(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_PachinkoLightStand); + ChangeSpriteState(SpriteNum,s_PachinkoLightStand); u->Attrib = &PachinkoLightAttrib; u->StateEnd = s_PachinkoLightStand; u->Rot = 0; @@ -723,7 +723,7 @@ int PachinkoLightOperate(DSWActor* actor) if ((u->WaitTics -= ACTORMOVETICS) <= 0) { sp->shade = -2; - ChangeState(SpriteNum,s_PachinkoLightStand); + ChangeSpriteState(SpriteNum,s_PachinkoLightStand); } return 0; } @@ -798,7 +798,7 @@ SetupPachinko1(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_Pachinko1Stand); + ChangeSpriteState(SpriteNum,s_Pachinko1Stand); u->Attrib = &Pachinko1Attrib; u->StateEnd = s_Pachinko1Stand; u->Rot = 0; @@ -859,7 +859,7 @@ int PachinkoCheckWin(DSWActor* actor) { tsp->shade = -90; // Full brightness tu->WaitTics = SEC(3); // Flash - ChangeState(i,s_PachinkoLightOperate); + ChangeSpriteState(i,s_PachinkoLightOperate); } } } @@ -970,7 +970,7 @@ SetupPachinko2(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_Pachinko2Stand); + ChangeSpriteState(SpriteNum,s_Pachinko2Stand); u->Attrib = &Pachinko2Attrib; u->StateEnd = s_Pachinko2Stand; u->Rot = 0; @@ -1054,7 +1054,7 @@ SetupPachinko3(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_Pachinko3Stand); + ChangeSpriteState(SpriteNum,s_Pachinko3Stand); u->Attrib = &Pachinko3Attrib; u->StateEnd = s_Pachinko3Stand; u->Rot = 0; @@ -1139,7 +1139,7 @@ SetupPachinko4(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_Pachinko4Stand); + ChangeSpriteState(SpriteNum,s_Pachinko4Stand); u->Attrib = &Pachinko4Attrib; u->StateEnd = s_Pachinko4Stand; u->Rot = 0; @@ -1253,7 +1253,7 @@ SetupCarGirl(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_CarGirlStand); + ChangeSpriteState(SpriteNum,s_CarGirlStand); u->Attrib = &CarGirlAttrib; u->StateEnd = s_CarGirlStand; u->Rot = 0; @@ -1300,7 +1300,7 @@ int DoCarGirl(DSWActor* actor) else PlaySound(DIGI_LANI054, sp, v3df_dontpan, CHAN_AnimeMad); } - ChangeState(SpriteNum,s_CarGirlUzi); + ChangeSpriteState(SpriteNum,s_CarGirlUzi); u->WaitTics = SEC(3)+SEC(RandomRange(2<<8)>>8); u->FlagOwner = 0; } @@ -1354,7 +1354,7 @@ int NullCarGirl(DSWActor* actor) else PlaySound(DIGI_LANI054, sp, v3df_dontpan, CHAN_AnimeMad); } - ChangeState(SpriteNum,s_CarGirlUzi); + ChangeSpriteState(SpriteNum,s_CarGirlUzi); u->WaitTics = SEC(3)+SEC(RandomRange(2<<8)>>8); u->FlagOwner = 0; } @@ -1373,7 +1373,7 @@ int CarGirlUzi(DSWActor* actor) if ((u->WaitTics -= ACTORMOVETICS) <= 0) { u->WaitTics = RandomRange(240)+120; - ChangeState(SpriteNum,s_CarGirlStand); + ChangeSpriteState(SpriteNum,s_CarGirlStand); u->FlagOwner = 0; } @@ -1387,7 +1387,7 @@ int CarGirlPain(DSWActor* actor) NullCarGirl(actor); if ((u->WaitTics -= ACTORMOVETICS) <= 0) - ChangeState(SpriteNum,s_CarGirlStand); + ChangeSpriteState(SpriteNum,s_CarGirlStand); return 0; } @@ -1476,7 +1476,7 @@ SetupMechanicGirl(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_MechanicGirlStand); + ChangeSpriteState(SpriteNum,s_MechanicGirlStand); u->Attrib = &MechanicGirlAttrib; u->StateEnd = s_MechanicGirlStand; u->Rot = 0; @@ -1522,7 +1522,7 @@ int DoMechanicGirl(DSWActor* actor) else PlaySound(DIGI_LANI079, sp, v3df_dontpan, CHAN_AnimeMad); } - ChangeState(SpriteNum,s_MechanicGirlDrill); + ChangeSpriteState(SpriteNum,s_MechanicGirlDrill); u->WaitTics = SEC(1)+SEC(RandomRange(2<<8)>>8); u->FlagOwner = 0; } @@ -1576,7 +1576,7 @@ int NullMechanicGirl(DSWActor* actor) else PlaySound(DIGI_LANI079, sp, v3df_dontpan, CHAN_AnimeMad); } - ChangeState(SpriteNum,s_MechanicGirlDrill); + ChangeSpriteState(SpriteNum,s_MechanicGirlDrill); u->WaitTics = SEC(1)+SEC(RandomRange(2<<8)>>8); u->FlagOwner = 0; } @@ -1594,7 +1594,7 @@ int MechanicGirlDrill(DSWActor* actor) if ((u->WaitTics -= ACTORMOVETICS) <= 0) { u->WaitTics = RandomRange(240)+120; - ChangeState(SpriteNum,s_MechanicGirlStand); + ChangeSpriteState(SpriteNum,s_MechanicGirlStand); u->FlagOwner = 0; } @@ -1609,7 +1609,7 @@ int MechanicGirlPain(DSWActor* actor) NullMechanicGirl(actor); if ((u->WaitTics -= ACTORMOVETICS) <= 0) - ChangeState(SpriteNum,s_MechanicGirlStand); + ChangeSpriteState(SpriteNum,s_MechanicGirlStand); return 0; } @@ -1698,7 +1698,7 @@ SetupSailorGirl(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_SailorGirlStand); + ChangeSpriteState(SpriteNum,s_SailorGirlStand); u->Attrib = &SailorGirlAttrib; u->StateEnd = s_SailorGirlStand; u->Rot = 0; @@ -1749,7 +1749,7 @@ int DoSailorGirl(DSWActor* actor) else PlaySound(DIGI_LANI066, sp, v3df_dontpan, CHAN_AnimeMad); } - ChangeState(SpriteNum,s_SailorGirlThrow); + ChangeSpriteState(SpriteNum,s_SailorGirlThrow); u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8); u->FlagOwner = 0; } @@ -1808,7 +1808,7 @@ int NullSailorGirl(DSWActor* actor) else PlaySound(DIGI_LANI066, sp, v3df_dontpan, CHAN_AnimeMad); } - ChangeState(SpriteNum,s_SailorGirlThrow); + ChangeSpriteState(SpriteNum,s_SailorGirlThrow); u->WaitTics = SEC(1)+SEC(RandomRange(3<<8)>>8); u->FlagOwner = 0; } @@ -1827,7 +1827,7 @@ int SailorGirlThrow(DSWActor* actor) if ((u->WaitTics -= ACTORMOVETICS) <= 0) { u->WaitTics = RandomRange(240)+120; - ChangeState(SpriteNum,s_SailorGirlStand); + ChangeSpriteState(SpriteNum,s_SailorGirlStand); u->FlagOwner = 0; } @@ -1841,7 +1841,7 @@ int SailorGirlPain(DSWActor* actor) NullSailorGirl(actor); if ((u->WaitTics -= ACTORMOVETICS) <= 0) - ChangeState(SpriteNum,s_SailorGirlStand); + ChangeSpriteState(SpriteNum,s_SailorGirlStand); return 0; } @@ -1914,7 +1914,7 @@ SetupPruneGirl(short SpriteNum) EnemyDefaults(SpriteNum, nullptr, nullptr); - ChangeState(SpriteNum,s_PruneGirlStand); + ChangeSpriteState(SpriteNum,s_PruneGirlStand); u->Attrib = &PruneGirlAttrib; u->StateEnd = s_PruneGirlStand; u->Rot = 0; @@ -2048,7 +2048,7 @@ int PruneGirlUzi(DSWActor* actor) if ((u->WaitTics -= ACTORMOVETICS) <= 0) { u->WaitTics = RandomRange(240)+120; - ChangeState(SpriteNum,s_PruneGirlStand); + ChangeSpriteState(SpriteNum,s_PruneGirlStand); u->FlagOwner = 0; } @@ -2063,7 +2063,7 @@ int PruneGirlPain(DSWActor* actor) NullPruneGirl(actor); if ((u->WaitTics -= ACTORMOVETICS) <= 0) - ChangeState(SpriteNum,s_PruneGirlStand); + ChangeSpriteState(SpriteNum,s_PruneGirlStand); return 0; } diff --git a/source/games/sw/src/ninja.cpp b/source/games/sw/src/ninja.cpp index 9c993e114..a9ddacad9 100644 --- a/source/games/sw/src/ninja.cpp +++ b/source/games/sw/src/ninja.cpp @@ -1862,14 +1862,14 @@ SetupNinja(short SpriteNum) u->Attrib = &NinjaAttrib; u->ActorActionSet = &NinjaActionSet; u->Personality = &NinjaPersonality; - ChangeState(SpriteNum, s_NinjaCeiling[0]); + ChangeSpriteState(SpriteNum, s_NinjaCeiling[0]); } else { u->Attrib = &NinjaAttrib; u->ActorActionSet = &NinjaSniperActionSet; u->Personality = &NinjaSniperPersonality; - ChangeState(SpriteNum, s_NinjaDuck[0]); + ChangeSpriteState(SpriteNum, s_NinjaDuck[0]); } } } @@ -1887,14 +1887,14 @@ SetupNinja(short SpriteNum) u->Attrib = &NinjaAttrib; u->ActorActionSet = &NinjaActionSet; u->Personality = &NinjaPersonality; - ChangeState(SpriteNum, s_NinjaCeiling[0]); + ChangeSpriteState(SpriteNum, s_NinjaCeiling[0]); } else { u->Attrib = &NinjaAttrib; u->ActorActionSet = &NinjaSniperActionSet; u->Personality = &NinjaSniperPersonality; - ChangeState(SpriteNum, s_NinjaDuck[0]); + ChangeSpriteState(SpriteNum, s_NinjaDuck[0]); } } } @@ -1926,11 +1926,11 @@ SetupNinja(short SpriteNum) u->Attrib = &NinjaAttrib; u->ActorActionSet = &NinjaSniperActionSet; u->Personality = &NinjaSniperPersonality; - ChangeState(SpriteNum, s_NinjaDuck[0]); + ChangeSpriteState(SpriteNum, s_NinjaDuck[0]); } } - ChangeState(SpriteNum, s_NinjaRun[0]); + ChangeSpriteState(SpriteNum, s_NinjaRun[0]); DoActorSetSpeed(actor, NORM_SPEED); u->Radius = 280; @@ -1995,7 +1995,7 @@ DoNinjaGrabThroat(DSWActor* actor) //SpawnBlood(SpriteNum, SpriteNum, -1, -1, -1, -1); - ChangeState(SpriteNum, u->StateEnd); + ChangeSpriteState(SpriteNum, u->StateEnd); sp->xvel = 0; //u->jump_speed = -300; //DoActorBeginJump(actor); @@ -2388,7 +2388,7 @@ PlayerSpriteLoadLevel(short SpriteNum) { USERp u = User[SpriteNum].Data(); - ChangeState(SpriteNum, s_NinjaRun[0]); + ChangeSpriteState(SpriteNum, s_NinjaRun[0]); u->Rot = sg_NinjaRun; u->ActorActionSet = &PlayerNinjaActionSet; } @@ -2417,7 +2417,7 @@ InitPlayerSprite(PLAYERp pp) u = User[sp_num].Data(); // Grouping items that need to be reset after a LoadLevel - ChangeState(sp_num, s_NinjaRun[0]); + ChangeSpriteState(sp_num, s_NinjaRun[0]); u->Rot = sg_NinjaRun; u->ActorActionSet = &PlayerNinjaActionSet; diff --git a/source/games/sw/src/ripper.cpp b/source/games/sw/src/ripper.cpp index 6b2df5983..d6cbd80b2 100644 --- a/source/games/sw/src/ripper.cpp +++ b/source/games/sw/src/ripper.cpp @@ -833,7 +833,7 @@ SetupRipper(short SpriteNum) u->Health = HEALTH_RIPPER/2; // Baby rippers are weaker } - ChangeState(SpriteNum, s_RipperRun[0]); + ChangeSpriteState(SpriteNum, s_RipperRun[0]); u->Attrib = &RipperAttrib; DoActorSetSpeed(actor, FAST_SPEED); u->StateEnd = s_RipperDie; diff --git a/source/games/sw/src/ripper2.cpp b/source/games/sw/src/ripper2.cpp index 9e48f3c94..f069900f5 100644 --- a/source/games/sw/src/ripper2.cpp +++ b/source/games/sw/src/ripper2.cpp @@ -901,7 +901,7 @@ SetupRipper2(short SpriteNum) u->Health = HEALTH_RIPPER2; } - ChangeState(SpriteNum, s_Ripper2Run[0]); + ChangeSpriteState(SpriteNum, s_Ripper2Run[0]); u->Attrib = &Ripper2Attrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_Ripper2Die; diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 65aba9a95..e5b49c750 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -1799,7 +1799,7 @@ OperateSprite(short SpriteNum, short player_is_operating) PlaySound(DIGI_PFLIP, sp, v3df_none); u->WaitTics = SEC(3) + SEC(RandomRange(10)); - ChangeState(SpriteNum,s_Pachinko1Operate); + ChangeSpriteState(SpriteNum,s_Pachinko1Operate); return true; @@ -1810,7 +1810,7 @@ OperateSprite(short SpriteNum, short player_is_operating) PlaySound(DIGI_PFLIP, sp, v3df_none); u->WaitTics = SEC(3) + SEC(RandomRange(10)); - ChangeState(SpriteNum,s_Pachinko2Operate); + ChangeSpriteState(SpriteNum,s_Pachinko2Operate); return true; @@ -1821,7 +1821,7 @@ OperateSprite(short SpriteNum, short player_is_operating) PlaySound(DIGI_PFLIP, sp, v3df_none); u->WaitTics = SEC(3) + SEC(RandomRange(10)); - ChangeState(SpriteNum,s_Pachinko3Operate); + ChangeSpriteState(SpriteNum,s_Pachinko3Operate); return true; @@ -1832,7 +1832,7 @@ OperateSprite(short SpriteNum, short player_is_operating) PlaySound(DIGI_PFLIP, sp, v3df_none); u->WaitTics = SEC(3) + SEC(RandomRange(10)); - ChangeState(SpriteNum,s_Pachinko4Operate); + ChangeSpriteState(SpriteNum,s_Pachinko4Operate); return true; diff --git a/source/games/sw/src/serp.cpp b/source/games/sw/src/serp.cpp index e048e427b..9f209a1d0 100644 --- a/source/games/sw/src/serp.cpp +++ b/source/games/sw/src/serp.cpp @@ -717,7 +717,7 @@ SetupSerp(short SpriteNum) if (Skill == 0) u->Health = 1100; if (Skill == 1) u->Health = 2200; - ChangeState(SpriteNum, s_SerpRun[0]); + ChangeSpriteState(SpriteNum, s_SerpRun[0]); u->Attrib = &SerpAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_SerpDie; diff --git a/source/games/sw/src/skel.cpp b/source/games/sw/src/skel.cpp index 57cc1ed17..8e91ffb9b 100644 --- a/source/games/sw/src/skel.cpp +++ b/source/games/sw/src/skel.cpp @@ -519,7 +519,7 @@ SetupSkel(short SpriteNum) u->Health = HEALTH_SKEL_PRIEST; } - ChangeState(SpriteNum, s_SkelRun[0]); + ChangeSpriteState(SpriteNum, s_SkelRun[0]); u->Attrib = &SkelAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_SkelDie; diff --git a/source/games/sw/src/skull.cpp b/source/games/sw/src/skull.cpp index 803797340..46869d46e 100644 --- a/source/games/sw/src/skull.cpp +++ b/source/games/sw/src/skull.cpp @@ -228,7 +228,7 @@ SetupSkull(short SpriteNum) u->Health = HEALTH_SKULL; } - ChangeState(SpriteNum, s_SkullWait[0]); + ChangeSpriteState(SpriteNum, s_SkullWait[0]); u->Attrib = &SkullAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_SkullExplode; @@ -349,7 +349,7 @@ DoSkullBeginDeath(DSWActor* actor) RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); u->RotNum = 0; u->Tics = 0; -// ChangeState(SpriteNum, u->StateEnd); +// ChangeSpriteState(SpriteNum, u->StateEnd); //u->State = u->StateStart = u->StateEnd; //u->State = u->StateEnd; u->ID = SKULL_R0; @@ -653,7 +653,7 @@ SetupBetty(short SpriteNum) u->Health = HEALTH_SKULL; } - ChangeState(SpriteNum, s_BettyWait[0]); + ChangeSpriteState(SpriteNum, s_BettyWait[0]); u->Attrib = &BettyAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_BettyExplode; @@ -769,7 +769,7 @@ DoBettyBeginDeath(DSWActor* actor) RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); u->RotNum = 0; u->Tics = 0; -// ChangeState(SpriteNum, u->StateEnd); +// ChangeSpriteState(SpriteNum, u->StateEnd); //u->State = u->StateStart = u->StateEnd; //u->State = u->StateEnd; u->ID = BETTY_R0; diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index 52d7a5645..afe7199f9 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -806,7 +806,7 @@ KillSprite(int16_t SpriteNum) } } -void ChangeState(short SpriteNum, STATEp statep) +void ChangeSpriteState(short SpriteNum, STATEp statep) { USERp u = User[SpriteNum].Data(); if (u == nullptr) @@ -3187,7 +3187,7 @@ KeyMain: //SET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); - ChangeState(SpriteNum, s_Key[num]); + ChangeSpriteState(SpriteNum, s_Key[num]); RESET(picanm[sp->picnum].sf, PICANM_ANIMTYPE_MASK); RESET(picanm[sp->picnum + 1].sf, PICANM_ANIMTYPE_MASK); @@ -3222,7 +3222,7 @@ KeyStatueMain: sprite[SpriteNum].picnum = u->ID = sprite[SpriteNum].picnum; u->spal = sp->pal; - ChangeState(SpriteNum, s_KeyStatue[num]); + ChangeSpriteState(SpriteNum, s_KeyStatue[num]); RESET(picanm[sp->picnum].sf, PICANM_ANIMTYPE_MASK); RESET(picanm[sp->picnum + 1].sf, PICANM_ANIMTYPE_MASK); @@ -4658,7 +4658,7 @@ int SpawnItemsMatch(short match) //SET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); - ChangeState(SpriteNum, s_Key[num]); + ChangeSpriteState(SpriteNum, s_Key[num]); RESET(picanm[sp->picnum].sf, PICANM_ANIMTYPE_MASK); RESET(picanm[sp->picnum + 1].sf, PICANM_ANIMTYPE_MASK); @@ -5299,7 +5299,7 @@ DoCoin(DSWActor* actor) if (u->StateStart != s_GreenCoin) { offset = int(u->State - u->StateStart); - ChangeState(SpriteNum, s_GreenCoin); + ChangeSpriteState(SpriteNum, s_GreenCoin); u->State = u->StateStart + offset; } } @@ -5308,7 +5308,7 @@ DoCoin(DSWActor* actor) if (u->StateStart != s_YellowCoin) { offset = int(u->State - u->StateStart); - ChangeState(SpriteNum, s_YellowCoin); + ChangeSpriteState(SpriteNum, s_YellowCoin); u->State = u->StateStart + offset; } } diff --git a/source/games/sw/src/sumo.cpp b/source/games/sw/src/sumo.cpp index 090cf9192..5feaa63ee 100644 --- a/source/games/sw/src/sumo.cpp +++ b/source/games/sw/src/sumo.cpp @@ -649,7 +649,7 @@ SetupSumo(short SpriteNum) if (Skill == 0) u->Health = 2000; if (Skill == 1) u->Health = 4000; - ChangeState(SpriteNum,s_SumoRun[0]); + ChangeSpriteState(SpriteNum,s_SumoRun[0]); u->Attrib = &SumoAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_SumoDie; diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index c1980a3ce..7459f13d1 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -3529,35 +3529,35 @@ AutoShrap: p = WoodShrap; shrap_xsize = shrap_ysize = 24; shrap_bounce = true; - ChangeState(short(parent - sprite), s_BreakBarrel); + ChangeSpriteState(short(parent - sprite), s_BreakBarrel); break; case BREAK_LIGHT: PlaySound(DIGI_BREAKGLASS,parent,v3df_dontpan|v3df_doppler); p = GlassShrap; shrap_xsize = shrap_ysize = 24; shrap_bounce = true; - ChangeState(short(parent - sprite), s_BreakLight); + ChangeSpriteState(short(parent - sprite), s_BreakLight); break; case BREAK_PEDISTAL: PlaySound(DIGI_BREAKSTONES,parent,v3df_dontpan|v3df_doppler); p = StoneShrap; shrap_xsize = shrap_ysize = 24; shrap_bounce = true; - ChangeState(short(parent - sprite), s_BreakPedistal); + ChangeSpriteState(short(parent - sprite), s_BreakPedistal); break; case BREAK_BOTTLE1: PlaySound(DIGI_BREAKGLASS,parent,v3df_dontpan|v3df_doppler); p = GlassShrap; shrap_xsize = shrap_ysize = 8; shrap_bounce = true; - ChangeState(short(parent - sprite), s_BreakBottle1); + ChangeSpriteState(short(parent - sprite), s_BreakBottle1); break; case BREAK_BOTTLE2: PlaySound(DIGI_BREAKGLASS,parent,v3df_dontpan|v3df_doppler); p = GlassShrap; shrap_xsize = shrap_ysize = 8; shrap_bounce = true; - ChangeState(short(parent - sprite), s_BreakBottle2); + ChangeSpriteState(short(parent - sprite), s_BreakBottle2); break; case BREAK_MUSHROOM: PlaySound(DIGI_BREAKDEBRIS,parent,v3df_dontpan|v3df_doppler); @@ -3907,7 +3907,7 @@ DoVomit(DSWActor* actor) } else { - ChangeState(SpriteNum, s_VomitSplash); + ChangeSpriteState(SpriteNum, s_VomitSplash); DoFindGroundPoint(SpriteNum); MissileWaterAdjust(SpriteNum); sp->z = u->loz; @@ -4012,7 +4012,7 @@ DoShrapJumpFall(DSWActor* actor) } if (u->ID == GORE_Drip) - ChangeState(SpriteNum, s_GoreFloorSplash); + ChangeSpriteState(SpriteNum, s_GoreFloorSplash); else ShrapKillSprite(SpriteNum); } @@ -4561,7 +4561,7 @@ WeaponMoveHit(short SpriteNum) if (hu->WaitTics <= 0) { hu->WaitTics = SEC(2); - ChangeState(hit_sprite,s_TrashCanPain); + ChangeSpriteState(hit_sprite,s_TrashCanPain); } break; case PACHINKO1: @@ -4904,7 +4904,7 @@ SetSuicide(short SpriteNum) SET(u->Flags, SPR_SUICIDE); u->RotNum = 0; } - ChangeState(SpriteNum, s_Suicide); + ChangeSpriteState(SpriteNum, s_Suicide); return 0; } @@ -8006,7 +8006,7 @@ DoStar(DSWActor* actor) if (!TEST(u->Flags, SPR_BOUNCE) && RANDOM_P2(1024) < STAR_STICK_RNUM) { u->motion_blur_num = 0; - ChangeState(Weapon, s_StarStuck); + ChangeSpriteState(Weapon, s_StarStuck); sp->xrepeat -= 16; sp->yrepeat -= 16; RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); @@ -8702,7 +8702,7 @@ DoPlasma(DSWActor* actor) else { u->Counter = 4; - ChangeState(Weapon, s_PlasmaDone); + ChangeSpriteState(Weapon, s_PlasmaDone); } return true; @@ -8734,7 +8734,7 @@ DoCoolgFire(DSWActor* actor) if (WeaponMoveHit(Weapon)) { PlaySound(DIGI_CGMAGICHIT, sp, v3df_follow); - ChangeState(Weapon, s_CoolgFireDone); + ChangeSpriteState(Weapon, s_CoolgFireDone); if (sp->owner >= 0 && User[sp->owner].Data() && User[sp->owner]->ID != RIPPER_RUN_R0) // JBF: added range check SpawnDemonFist(Weapon); // Just a red magic circle flash return true; @@ -9537,7 +9537,7 @@ SetMineStuck(int16_t Weapon) SET(sp->cstat, CSTAT_SPRITE_BLOCK_HITSCAN); u->Counter = 0; change_sprite_stat(Weapon, STAT_MINE_STUCK); - ChangeState(Weapon, s_MineStuck); + ChangeSpriteState(Weapon, s_MineStuck); return 0; } @@ -13474,7 +13474,7 @@ InitSwordAttack(PLAYERp pp) if (tu->WaitTics <= 0) { tu->WaitTics = SEC(2); - ChangeState(hitinfo.sprite,s_TrashCanPain); + ChangeSpriteState(hitinfo.sprite,s_TrashCanPain); } SpawnSwordSparks(pp, hitinfo.sect, -1, hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z, daang); PlaySound(DIGI_SWORDCLANK, &hitinfo.pos, v3df_none); @@ -13665,7 +13665,7 @@ InitFistAttack(PLAYERp pp) if (tu->WaitTics <= 0) { tu->WaitTics = SEC(2); - ChangeState(hitinfo.sprite,s_TrashCanPain); + ChangeSpriteState(hitinfo.sprite,s_TrashCanPain); } SpawnSwordSparks(pp, hitinfo.sect, -1, hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z, daang); PlaySound(DIGI_ARMORHIT, &hitinfo.pos, v3df_none); @@ -14744,7 +14744,7 @@ InitShotgun(PLAYERp pp) if (hu->WaitTics <= 0) { hu->WaitTics = SEC(2); - ChangeState(hitinfo.sprite,s_TrashCanPain); + ChangeSpriteState(hitinfo.sprite,s_TrashCanPain); } } @@ -16798,7 +16798,7 @@ int DoCoolgDrip(DSWActor* actor) { sp->z = u->loz - u->floor_dist; sp->yrepeat = sp->xrepeat = 32; - ChangeState(SpriteNum, s_GoreFloorSplash); + ChangeSpriteState(SpriteNum, s_GoreFloorSplash); if (u->spal == PALETTE_BLUE_LIGHTING) PlaySound(DIGI_DRIP, sp, v3df_none); } @@ -17594,7 +17594,7 @@ InitUzi(PLAYERp pp) if (hu->WaitTics <= 0) { hu->WaitTics = SEC(2); - ChangeState(hitinfo.sprite,s_TrashCanPain); + ChangeSpriteState(hitinfo.sprite,s_TrashCanPain); } } @@ -20955,7 +20955,7 @@ DoShrapVelocity(int16_t SpriteNum) else { if (u->ID == GORE_Drip) - ChangeState(SpriteNum, s_GoreFloorSplash); + ChangeSpriteState(SpriteNum, s_GoreFloorSplash); else ShrapKillSprite(SpriteNum); return true; @@ -21000,7 +21000,7 @@ DoShrapVelocity(int16_t SpriteNum) else { if (u->ID == GORE_Drip) - ChangeState(SpriteNum, s_GoreFloorSplash); + ChangeSpriteState(SpriteNum, s_GoreFloorSplash); else ShrapKillSprite(SpriteNum); return true; diff --git a/source/games/sw/src/weapon.h b/source/games/sw/src/weapon.h index a05335981..a8a476434 100644 --- a/source/games/sw/src/weapon.h +++ b/source/games/sw/src/weapon.h @@ -64,7 +64,7 @@ extern short GenericQueue[MAX_GENERIC_QUEUE]; extern short LoWangsQueueHead; extern short LoWangsQueue[MAX_LOWANGS_QUEUE]; -void ChangeState(short SpriteNum, STATEp statep); +void ChangeSpriteState(short SpriteNum, STATEp statep); void DoPlayerBeginRecoil(PLAYERp pp, short pix_amt); SECTOR_OBJECTp DetectSectorObject(SECTORp); SECTOR_OBJECTp DetectSectorObjectByWall(WALLp); diff --git a/source/games/sw/src/zilla.cpp b/source/games/sw/src/zilla.cpp index 8c2720728..7ab3808f9 100644 --- a/source/games/sw/src/zilla.cpp +++ b/source/games/sw/src/zilla.cpp @@ -662,7 +662,7 @@ SetupZilla(short SpriteNum) if (Skill == 0) u->Health = 2000; if (Skill == 1) u->Health = 4000; - ChangeState(SpriteNum,s_ZillaRun[0]); + ChangeSpriteState(SpriteNum,s_ZillaRun[0]); u->Attrib = &ZillaAttrib; DoActorSetSpeed(actor, NORM_SPEED); u->StateEnd = s_ZillaDie; diff --git a/source/games/sw/src/zombie.cpp b/source/games/sw/src/zombie.cpp index 4f38f76a4..62d5f6fc8 100644 --- a/source/games/sw/src/zombie.cpp +++ b/source/games/sw/src/zombie.cpp @@ -765,7 +765,7 @@ SetupZombie(short SpriteNum) u->Attrib = &ZombieAttrib; EnemyDefaults(SpriteNum, &ZombieActionSet, &ZombiePersonality); - ChangeState(SpriteNum, s_ZombieRun[0]); + ChangeSpriteState(SpriteNum, s_ZombieRun[0]); DoActorSetSpeed(actor, NORM_SPEED); u->Radius = 280;