mirror of https://github.com/pret/pokeemerald.git
Rename GoSpeedX functions to WalkNormal, WalkFast, etc.
This commit is contained in:
parent
4cedd2d551
commit
3f5f057ebe
|
@ -11,10 +11,10 @@ void PlayerGetDestCoords(s16 *, s16 *);
|
||||||
u8 GetPlayerFacingDirection(void);
|
u8 GetPlayerFacingDirection(void);
|
||||||
u8 GetPlayerMovementDirection(void);
|
u8 GetPlayerMovementDirection(void);
|
||||||
u8 PlayerGetCopyableMovement(void);
|
u8 PlayerGetCopyableMovement(void);
|
||||||
void PlayerGoSpeed1(u8);
|
void PlayerWalkNormal(u8);
|
||||||
void PlayerGoSpeed2(u8);
|
void PlayerWalkFast(u8);
|
||||||
void PlayerRideWaterCurrent(u8);
|
void PlayerRideWaterCurrent(u8);
|
||||||
void PlayerGoSpeed4(u8);
|
void PlayerWalkFaster(u8);
|
||||||
void PlayerOnBikeCollide(u8);
|
void PlayerOnBikeCollide(u8);
|
||||||
void PlayerFaceDirection(u8 a);
|
void PlayerFaceDirection(u8 a);
|
||||||
void PlayerTurnInPlace(u8 a);
|
void PlayerTurnInPlace(u8 a);
|
||||||
|
|
|
@ -71,12 +71,12 @@ static void (*const sMachBikeTransitions[])(u8) =
|
||||||
MachBikeTransition_TrySlowDown,
|
MachBikeTransition_TrySlowDown,
|
||||||
};
|
};
|
||||||
|
|
||||||
// bikeFrameCounter is input which is represented by sMachBikeSpeeds in order: 0 is normal speed (1 speed), 1 is fast speed (2 speed), 2 is faster speed
|
// bikeFrameCounter is input which is represented by sMachBikeSpeeds in order
|
||||||
static void (*const sMachBikeSpeedCallbacks[])(u8) =
|
static void (*const sMachBikeSpeedCallbacks[])(u8) =
|
||||||
{
|
{
|
||||||
PlayerGoSpeed1, // normal speed (1 speed)
|
PlayerWalkNormal,
|
||||||
PlayerGoSpeed2, // fast speed (2 speed)
|
PlayerWalkFast,
|
||||||
PlayerGoSpeed4, // faster speed
|
PlayerWalkFaster,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void (*const sAcroBikeTransitions[])(u8) =
|
static void (*const sAcroBikeTransitions[])(u8) =
|
||||||
|
|
|
@ -470,27 +470,27 @@ static u8 DoForcedMovementInCurrentDirection(void (*a)(u8))
|
||||||
|
|
||||||
static bool8 ForcedMovement_Slip(void)
|
static bool8 ForcedMovement_Slip(void)
|
||||||
{
|
{
|
||||||
return DoForcedMovementInCurrentDirection(PlayerGoSpeed2);
|
return DoForcedMovementInCurrentDirection(PlayerWalkFast);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 ForcedMovement_WalkSouth(void)
|
static bool8 ForcedMovement_WalkSouth(void)
|
||||||
{
|
{
|
||||||
return DoForcedMovement(DIR_SOUTH, PlayerGoSpeed1);
|
return DoForcedMovement(DIR_SOUTH, PlayerWalkNormal);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 ForcedMovement_WalkNorth(void)
|
static bool8 ForcedMovement_WalkNorth(void)
|
||||||
{
|
{
|
||||||
return DoForcedMovement(DIR_NORTH, PlayerGoSpeed1);
|
return DoForcedMovement(DIR_NORTH, PlayerWalkNormal);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 ForcedMovement_WalkWest(void)
|
static bool8 ForcedMovement_WalkWest(void)
|
||||||
{
|
{
|
||||||
return DoForcedMovement(DIR_WEST, PlayerGoSpeed1);
|
return DoForcedMovement(DIR_WEST, PlayerWalkNormal);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 ForcedMovement_WalkEast(void)
|
static bool8 ForcedMovement_WalkEast(void)
|
||||||
{
|
{
|
||||||
return DoForcedMovement(DIR_EAST, PlayerGoSpeed1);
|
return DoForcedMovement(DIR_EAST, PlayerWalkNormal);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 ForcedMovement_PushedSouthByCurrent(void)
|
static bool8 ForcedMovement_PushedSouthByCurrent(void)
|
||||||
|
@ -524,22 +524,22 @@ static u8 ForcedMovement_Slide(u8 direction, void (*b)(u8))
|
||||||
|
|
||||||
static bool8 ForcedMovement_SlideSouth(void)
|
static bool8 ForcedMovement_SlideSouth(void)
|
||||||
{
|
{
|
||||||
return ForcedMovement_Slide(DIR_SOUTH, PlayerGoSpeed2);
|
return ForcedMovement_Slide(DIR_SOUTH, PlayerWalkFast);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 ForcedMovement_SlideNorth(void)
|
static bool8 ForcedMovement_SlideNorth(void)
|
||||||
{
|
{
|
||||||
return ForcedMovement_Slide(DIR_NORTH, PlayerGoSpeed2);
|
return ForcedMovement_Slide(DIR_NORTH, PlayerWalkFast);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 ForcedMovement_SlideWest(void)
|
static bool8 ForcedMovement_SlideWest(void)
|
||||||
{
|
{
|
||||||
return ForcedMovement_Slide(DIR_WEST, PlayerGoSpeed2);
|
return ForcedMovement_Slide(DIR_WEST, PlayerWalkFast);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 ForcedMovement_SlideEast(void)
|
static bool8 ForcedMovement_SlideEast(void)
|
||||||
{
|
{
|
||||||
return ForcedMovement_Slide(DIR_EAST, PlayerGoSpeed2);
|
return ForcedMovement_Slide(DIR_EAST, PlayerWalkFast);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 ForcedMovement_MatJump(void)
|
static bool8 ForcedMovement_MatJump(void)
|
||||||
|
@ -562,7 +562,7 @@ static bool8 ForcedMovement_MuddySlope(void)
|
||||||
{
|
{
|
||||||
Bike_UpdateBikeCounterSpeed(0);
|
Bike_UpdateBikeCounterSpeed(0);
|
||||||
playerObjEvent->facingDirectionLocked = TRUE;
|
playerObjEvent->facingDirectionLocked = TRUE;
|
||||||
return DoForcedMovement(DIR_SOUTH, PlayerGoSpeed2);
|
return DoForcedMovement(DIR_SOUTH, PlayerWalkFast);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -631,8 +631,8 @@ static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)
|
||||||
|
|
||||||
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
|
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
|
||||||
{
|
{
|
||||||
// speed 2 is fast, same speed as running
|
// same speed as running
|
||||||
PlayerGoSpeed2(direction);
|
PlayerWalkFast(direction);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,7 +645,7 @@ static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PlayerGoSpeed1(direction);
|
PlayerWalkNormal(direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -953,16 +953,14 @@ void PlayerSetAnimId(u8 movementActionId, u8 copyableMovement)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// normal speed (1 speed)
|
void PlayerWalkNormal(u8 direction)
|
||||||
void PlayerGoSpeed1(u8 a)
|
|
||||||
{
|
{
|
||||||
PlayerSetAnimId(GetWalkNormalMovementAction(a), 2);
|
PlayerSetAnimId(GetWalkNormalMovementAction(direction), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// fast speed (2 speed)
|
void PlayerWalkFast(u8 direction)
|
||||||
void PlayerGoSpeed2(u8 a)
|
|
||||||
{
|
{
|
||||||
PlayerSetAnimId(GetWalkFastMovementAction(a), 2);
|
PlayerSetAnimId(GetWalkFastMovementAction(direction), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerRideWaterCurrent(u8 a)
|
void PlayerRideWaterCurrent(u8 a)
|
||||||
|
@ -970,10 +968,9 @@ void PlayerRideWaterCurrent(u8 a)
|
||||||
PlayerSetAnimId(GetRideWaterCurrentMovementAction(a), 2);
|
PlayerSetAnimId(GetRideWaterCurrentMovementAction(a), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// faster speed
|
void PlayerWalkFaster(u8 direction)
|
||||||
void PlayerGoSpeed4(u8 a)
|
|
||||||
{
|
{
|
||||||
PlayerSetAnimId(GetWalkFasterMovementAction(a), 2);
|
PlayerSetAnimId(GetWalkFasterMovementAction(direction), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PlayerRun(u8 a)
|
static void PlayerRun(u8 a)
|
||||||
|
|
Loading…
Reference in New Issue