summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bike.c8
-rw-r--r--src/field_player_avatar.c41
2 files changed, 23 insertions, 26 deletions
diff --git a/src/bike.c b/src/bike.c
index 5aa132a9e..470b6412f 100644
--- a/src/bike.c
+++ b/src/bike.c
@@ -71,12 +71,12 @@ static void (*const sMachBikeTransitions[])(u8) =
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) =
{
- PlayerGoSpeed1, // normal speed (1 speed)
- PlayerGoSpeed2, // fast speed (2 speed)
- PlayerGoSpeed4, // faster speed
+ PlayerWalkNormal,
+ PlayerWalkFast,
+ PlayerWalkFaster,
};
static void (*const sAcroBikeTransitions[])(u8) =
diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c
index 84c70435d..00800636d 100644
--- a/src/field_player_avatar.c
+++ b/src/field_player_avatar.c
@@ -470,27 +470,27 @@ static u8 DoForcedMovementInCurrentDirection(void (*a)(u8))
static bool8 ForcedMovement_Slip(void)
{
- return DoForcedMovementInCurrentDirection(PlayerGoSpeed2);
+ return DoForcedMovementInCurrentDirection(PlayerWalkFast);
}
static bool8 ForcedMovement_WalkSouth(void)
{
- return DoForcedMovement(DIR_SOUTH, PlayerGoSpeed1);
+ return DoForcedMovement(DIR_SOUTH, PlayerWalkNormal);
}
static bool8 ForcedMovement_WalkNorth(void)
{
- return DoForcedMovement(DIR_NORTH, PlayerGoSpeed1);
+ return DoForcedMovement(DIR_NORTH, PlayerWalkNormal);
}
static bool8 ForcedMovement_WalkWest(void)
{
- return DoForcedMovement(DIR_WEST, PlayerGoSpeed1);
+ return DoForcedMovement(DIR_WEST, PlayerWalkNormal);
}
static bool8 ForcedMovement_WalkEast(void)
{
- return DoForcedMovement(DIR_EAST, PlayerGoSpeed1);
+ return DoForcedMovement(DIR_EAST, PlayerWalkNormal);
}
static bool8 ForcedMovement_PushedSouthByCurrent(void)
@@ -524,22 +524,22 @@ static u8 ForcedMovement_Slide(u8 direction, void (*b)(u8))
static bool8 ForcedMovement_SlideSouth(void)
{
- return ForcedMovement_Slide(DIR_SOUTH, PlayerGoSpeed2);
+ return ForcedMovement_Slide(DIR_SOUTH, PlayerWalkFast);
}
static bool8 ForcedMovement_SlideNorth(void)
{
- return ForcedMovement_Slide(DIR_NORTH, PlayerGoSpeed2);
+ return ForcedMovement_Slide(DIR_NORTH, PlayerWalkFast);
}
static bool8 ForcedMovement_SlideWest(void)
{
- return ForcedMovement_Slide(DIR_WEST, PlayerGoSpeed2);
+ return ForcedMovement_Slide(DIR_WEST, PlayerWalkFast);
}
static bool8 ForcedMovement_SlideEast(void)
{
- return ForcedMovement_Slide(DIR_EAST, PlayerGoSpeed2);
+ return ForcedMovement_Slide(DIR_EAST, PlayerWalkFast);
}
static bool8 ForcedMovement_MatJump(void)
@@ -562,7 +562,7 @@ static bool8 ForcedMovement_MuddySlope(void)
{
Bike_UpdateBikeCounterSpeed(0);
playerObjEvent->facingDirectionLocked = TRUE;
- return DoForcedMovement(DIR_SOUTH, PlayerGoSpeed2);
+ return DoForcedMovement(DIR_SOUTH, PlayerWalkFast);
}
else
{
@@ -631,8 +631,8 @@ static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
{
- // speed 2 is fast, same speed as running
- PlayerGoSpeed2(direction);
+ // same speed as running
+ PlayerWalkFast(direction);
return;
}
@@ -645,7 +645,7 @@ static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)
}
else
{
- PlayerGoSpeed1(direction);
+ PlayerWalkNormal(direction);
}
}
@@ -953,16 +953,14 @@ void PlayerSetAnimId(u8 movementActionId, u8 copyableMovement)
}
}
-// normal speed (1 speed)
-void PlayerGoSpeed1(u8 a)
+void PlayerWalkNormal(u8 direction)
{
- PlayerSetAnimId(GetWalkNormalMovementAction(a), 2);
+ PlayerSetAnimId(GetWalkNormalMovementAction(direction), 2);
}
-// fast speed (2 speed)
-void PlayerGoSpeed2(u8 a)
+void PlayerWalkFast(u8 direction)
{
- PlayerSetAnimId(GetWalkFastMovementAction(a), 2);
+ PlayerSetAnimId(GetWalkFastMovementAction(direction), 2);
}
void PlayerRideWaterCurrent(u8 a)
@@ -970,10 +968,9 @@ void PlayerRideWaterCurrent(u8 a)
PlayerSetAnimId(GetRideWaterCurrentMovementAction(a), 2);
}
-// faster speed
-void PlayerGoSpeed4(u8 a)
+void PlayerWalkFaster(u8 direction)
{
- PlayerSetAnimId(GetWalkFasterMovementAction(a), 2);
+ PlayerSetAnimId(GetWalkFasterMovementAction(direction), 2);
}
static void PlayerRun(u8 a)