diff options
| author | GriffinR <griffin.g.richards@gmail.com> | 2021-11-02 15:07:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-02 15:07:59 -0400 |
| commit | c98fbb5ca6edf4f2bb3d2eada318082051f0849d (patch) | |
| tree | 1a15ec3e4110f619cbd345779ff09afbc5562359 /src/field_player_avatar.c | |
| parent | 47286d1ecb526c989d38e6e2e1c5cf80b2c5ec3f (diff) | |
| parent | 510ccbdf4cdc380594d9ee253fc209cb477d9df4 (diff) | |
Merge pull request #1538 from cbt6/move-speed
Rename some player movement speed functions
Diffstat (limited to 'src/field_player_avatar.c')
| -rw-r--r-- | src/field_player_avatar.c | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 6ce304c2c..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); } -// fastest speed (4 speed) -void PlayerGoSpeed4(u8 a) +void PlayerWalkFaster(u8 direction) { - PlayerSetAnimId(GetWalkFastestMovementAction(a), 2); + PlayerSetAnimId(GetWalkFasterMovementAction(direction), 2); } static void PlayerRun(u8 a) |
