- SW: Eliminated ANIMATORp typedef.

This commit is contained in:
Mitchell Richters 2022-01-01 09:09:34 +11:00
parent 1d51903a9e
commit 1c0ba71c69
7 changed files with 16 additions and 18 deletions

View file

@ -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);

View file

@ -33,7 +33,7 @@ BEGIN_SW_NS
struct DECISION
{
int range;
ANIMATORp action;
ANIMATOR* action;
};
// Personality structure

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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);