Skip to content

Commit

Permalink
Shorten zMechIs defs
Browse files Browse the repository at this point in the history
  • Loading branch information
escape209 committed Sep 29, 2024
1 parent 86d20e5 commit 528d0d6
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/SB/Game/zPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,32 +110,24 @@ void zPlatform_BreakawayFallFX(zPlatform* ent, F32 dt)

U32 zMechIsStartingForth(zPlatform* ent, U16 param_2)
{
U32 ret;
xEntMotion* mot = &ent->motion;
if (mot->asset->mech.type == 4)
if (ent->motion.asset->mech.type == 4)
{
ret = (__cntlzw(1 - param_2) >> 5) & 0xff;
return (__cntlzw(1 - param_2) >> 5) & 0xff;
}
else
{
return (__cntlzw(param_2) >> 5) & 0xff;
}

return ret;
}

U32 zMechIsStartingBack(zPlatform* ent, U16 param_2)
{
U32 ret;
xEntMotion* mot = &ent->motion;
if (mot->asset->mech.type == 4)
if (ent->motion.asset->mech.type == 4)
{
ret = (__cntlzw(4 - param_2) >> 5) & 0xff;
return (__cntlzw(4 - param_2) >> 5) & 0xff;
}
else
{
return (__cntlzw(3 - param_2) >> 5) & 0xff;
}

return ret;
}

0 comments on commit 528d0d6

Please sign in to comment.