inline this since its super smol
This commit is contained in:
1 parent
80168e59c1
commit
7e81337298
2 files changed
+9
-13
No files matched your search
+8
-1
@@ -286,7 +286,14 @@ mobj_t *P_SPMAngle(mobj_t *source, mobjtype_t type, angle_t angle, UINT8 aimtype
|
||||
#ifdef SEENAMES
|
||||
#define P_SpawnNameFinder(s,t) P_SPMAngle(s,t,s->angle,true,0)
|
||||
#endif
|
||||
SINT8 P_MobjFlip(const mobj_t *mobj);
|
||||
|
||||
// P_MobjFlip
|
||||
// Special utility to return +1 or -1 depending on mobj's gravity
|
||||
FUNCINLINE static ATTRINLINE SINT8 P_MobjFlip(const mobj_t *mobj)
|
||||
{
|
||||
return (mobj && mobj->eflags & MFE_VERTICALFLIP) ? -1 : 1;
|
||||
}
|
||||
|
||||
fixed_t P_GetMobjGravity(mobj_t *mo);
|
||||
FUNCMATH boolean P_WeaponOrPanel(mobjtype_t type);
|
||||
|
||||
|
||||
+1
-12
@@ -91,6 +91,7 @@ FUNCINLINE static ATTRINLINE void P_CycleStateAnimation(mobj_t *mobj)
|
||||
// var2 determines delay between animation frames
|
||||
if (!(mobj->frame & FF_ANIMATE) || --mobj->anim_duration != 0)
|
||||
return;
|
||||
|
||||
mobj->anim_duration = (UINT16)mobj->state->var2;
|
||||
|
||||
// compare the current sprite frame to the one we started from
|
||||
@@ -351,18 +352,6 @@ static boolean P_SetPrecipMobjState(precipmobj_t *mobj, statenum_t state)
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// P_MobjFlip
|
||||
//
|
||||
// Special utility to return +1 or -1 depending on mobj's gravity
|
||||
//
|
||||
SINT8 P_MobjFlip(const mobj_t *mobj)
|
||||
{
|
||||
if (mobj && mobj->eflags & MFE_VERTICALFLIP)
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//
|
||||
// P_WeaponOrPanel
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user