diff --git a/source/games/sw/src/ai.cpp b/source/games/sw/src/ai.cpp index cf935a0aa..31a29b5ea 100644 --- a/source/games/sw/src/ai.cpp +++ b/source/games/sw/src/ai.cpp @@ -43,7 +43,7 @@ BEGIN_SW_NS ANIMATOR InitActorRunToward; bool DropAhead(DSWActor* actor, int min_height); -ANIMATORp ChooseAction(DECISION decision[]); +ANIMATOR* ChooseAction(DECISION decision[]); #define CHOOSE2(value) (RANDOM_P2(1024) < (value)) @@ -130,7 +130,7 @@ void DoActorSetSpeed(DSWActor* actor, uint8_t speed) goro.c etc. */ -ANIMATORp ChooseAction(DECISION decision[]) +ANIMATOR* ChooseAction(DECISION decision[]) { // !JIM! Here is an opportunity for some AI, instead of randomness! int random_value = RANDOM_P2(1024<<5)>>5; @@ -163,7 +163,7 @@ int ChooseActionNumber(int16_t decision[]) } } -int DoActorNoise(ANIMATORp Action, DSWActor* actor) +int DoActorNoise(ANIMATOR* Action, DSWActor* actor) { if (Action == InitActorAmbientNoise) { @@ -473,10 +473,10 @@ DECISION GenericFlaming[] = do anymore and then this routine is called again. */ -ANIMATORp DoActorActionDecide(DSWActor* actor) +ANIMATOR* DoActorActionDecide(DSWActor* actor) { int dist; - ANIMATORp action; + ANIMATOR* action; bool ICanSee=false; // REMINDER: This function is not even called if SpriteControl doesn't let @@ -655,7 +655,7 @@ int InitActorDecide(DSWActor* actor) int DoActorDecide(DSWActor* actor) { - ANIMATORp actor_action; + ANIMATOR* actor_action; // See what to do next actor_action = DoActorActionDecide(actor); diff --git a/source/games/sw/src/ai.h b/source/games/sw/src/ai.h index eadab2e6e..8a6ba8fed 100644 --- a/source/games/sw/src/ai.h +++ b/source/games/sw/src/ai.h @@ -33,7 +33,7 @@ BEGIN_SW_NS struct DECISION { int range; - ANIMATORp action; + ANIMATOR* action; }; // Personality structure diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index b4985f0c8..1cad93ad4 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -373,11 +373,9 @@ struct ATTRIBUTE; struct SECTOR_OBJECT; struct PANEL_SPRITE; struct ANIM; - class DSWActor; -typedef int ANIMATOR (DSWActor* actor); -typedef ANIMATOR *ANIMATORp; +typedef int ANIMATOR (DSWActor* actor); typedef void pANIMATOR (PANEL_SPRITE*); typedef void (*soANIMATORp) (SECTOR_OBJECT*); @@ -385,7 +383,7 @@ struct STATE { short Pic; int Tics; - ANIMATORp Animator; + ANIMATOR* Animator; STATE* NextState; }; @@ -919,7 +917,7 @@ struct USER STATE* StateEnd; STATE* *StateFallOverride; // a bit kludgy - override std fall state - ANIMATORp ActorActionFunc; + ANIMATOR* ActorActionFunc; ACTOR_ACTION_SET* ActorActionSet; PERSONALITY* Personality; ATTRIBUTE* Attrib; diff --git a/source/games/sw/src/misc.h b/source/games/sw/src/misc.h index 5b9b3f024..1ca91deb2 100644 --- a/source/games/sw/src/misc.h +++ b/source/games/sw/src/misc.h @@ -38,7 +38,7 @@ void PlaceSectorObjectsOnTracks(void); void PlaceActorsOnTracks(void); void SetupSectorObject(sectortype* sect, short tag); void PostSetupSectorObject(void); -void VehicleSetSmoke(SECTOR_OBJECT* sop, ANIMATORp animator); +void VehicleSetSmoke(SECTOR_OBJECT* sop, ANIMATOR* animator); void CollapseSectorObject(SECTOR_OBJECT* sop, int nx, int ny); void KillSectorObjectSprites(SECTOR_OBJECT* sop); void MoveSectorObjects(SECTOR_OBJECT* sop, short locktics); diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 30b9dfda4..1928f31fe 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -2628,7 +2628,7 @@ void PlaceSectorObject(SECTOR_OBJECT* sop, int newx, int newy) RefreshPoints(sop, newx - sop->xmid, newy - sop->ymid, false); } -void VehicleSetSmoke(SECTOR_OBJECT* sop, ANIMATORp animator) +void VehicleSetSmoke(SECTOR_OBJECT* sop, ANIMATOR* animator) { sectortype* *sectp; diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 0736548db..22585ab5a 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -55,7 +55,7 @@ struct MISSILE_PLACEMENT void SpawnZombie2(DSWActor*); Collision move_ground_missile(DSWActor* actor, int xchange, int ychange, int ceildist, int flordist, uint32_t cliptype, int numtics); void DoPlayerBeginDie(PLAYER*); -void VehicleSetSmoke(SECTOR_OBJECT* sop, ANIMATORp animator); +void VehicleSetSmoke(SECTOR_OBJECT* sop, ANIMATOR* animator); ANIMATOR DoBettyBeginDeath; ANIMATOR DoSkullBeginDeath; ANIMATOR DoRipperGrow; @@ -11060,7 +11060,7 @@ int DoMirv(DSWActor* actor) return false; } -bool MissileSetPos(DSWActor* actor, ANIMATORp DoWeapon, int dist) +bool MissileSetPos(DSWActor* actor, ANIMATOR* DoWeapon, int dist) { int oldvel, oldzvel; int oldxc, oldyc, oldzc; @@ -11101,7 +11101,7 @@ bool MissileSetPos(DSWActor* actor, ANIMATORp DoWeapon, int dist) return retval; } -bool TestMissileSetPos(DSWActor* actor, ANIMATORp DoWeapon, int dist, int zvel) +bool TestMissileSetPos(DSWActor* actor, ANIMATOR* DoWeapon, int dist, int zvel) { int oldvel, oldzvel; int oldxc, oldyc, oldzc; diff --git a/source/games/sw/src/weapon.h b/source/games/sw/src/weapon.h index 454152b97..4e27358a0 100644 --- a/source/games/sw/src/weapon.h +++ b/source/games/sw/src/weapon.h @@ -96,7 +96,7 @@ void SpawnGrenadeExp(DSWActor*); DSWActor* SpawnSectorExp(DSWActor*); int DoShrapVelocity(DSWActor*); int ShrapKillSprite(DSWActor*); -bool MissileSetPos(DSWActor*,ANIMATORp DoWeapon,int dist); +bool MissileSetPos(DSWActor*,ANIMATOR* DoWeapon,int dist); int ActorPain(DSWActor*); int SpawnBreakFlames(DSWActor*); bool PlayerTakeDamage(PLAYER* pp, DSWActor* weapActor);