summaryrefslogtreecommitdiff
path: root/src/bike.c
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-05-25 09:30:24 -0500
committerMarcus Huderle <huderlem@gmail.com>2018-05-29 17:43:11 -0500
commitbc97185452e4dd38a808afeac7b6c774d4ab1163 (patch)
treecce8625b11a840a19219b5af051c6ebe83c3d95f /src/bike.c
parent4d92810ad64d6b01701de7f4796467c402542420 (diff)
Label all movement type functions and their callbacks
Diffstat (limited to 'src/bike.c')
-rw-r--r--src/bike.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bike.c b/src/bike.c
index 25419c6cf..66227e029 100644
--- a/src/bike.c
+++ b/src/bike.c
@@ -153,7 +153,7 @@ static void MovePlayerOnMachBike(u8 direction, u16 newKeys, u16 heldKeys)
static u8 GetMachBikeTransition(u8 *dirTraveling)
{
// if the dir updated before this function, get the relevent new direction to check later.
- u8 direction = player_get_direction_upper_nybble();
+ u8 direction = GetPlayerMovementDirection();
// is the player standing still?
if (*dirTraveling == 0)
@@ -301,7 +301,7 @@ static u8 CheckMovementInputAcroBike(u8 *newDirection, u16 newKeys, u16 heldKeys
static u8 AcroBikeHandleInputNormal(u8 *newDirection, u16 newKeys, u16 heldKeys)
{
- u8 direction = player_get_direction_upper_nybble();
+ u8 direction = GetPlayerMovementDirection();
gPlayerAvatar.bikeFrameCounter = 0;
if (*newDirection == DIR_NONE)
@@ -354,7 +354,7 @@ static u8 AcroBikeHandleInputTurning(u8 *newDirection, u16 newKeys, u16 heldKeys
Bike_SetBikeStill();
return ACRO_TRANS_TURN_DIRECTION;
}
- direction = player_get_direction_upper_nybble();
+ direction = GetPlayerMovementDirection();
if (*newDirection == AcroBike_GetJumpDirection())
{
Bike_SetBikeStill(); // Bike_SetBikeStill sets speed to standing, but the next line immediately overrides it. could have just reset acroBikeState to 0 here instead of wasting a jump.
@@ -383,7 +383,7 @@ static u8 AcroBikeHandleInputWheelieStanding(u8 *newDirection, u16 newKeys, u16
u8 direction;
struct MapObject *playerMapObj;
- direction = player_get_direction_upper_nybble();
+ direction = GetPlayerMovementDirection();
playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
gPlayerAvatar.runningState = NOT_MOVING;
@@ -430,7 +430,7 @@ static u8 AcroBikeHandleInputBunnyHop(u8 *newDirection, u16 newKeys, u16 heldKey
u8 direction;
struct MapObject *playerMapObj;
- direction = player_get_direction_upper_nybble();
+ direction = GetPlayerMovementDirection();
playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
if (!(heldKeys & B_BUTTON))
{
@@ -477,7 +477,7 @@ static u8 AcroBikeHandleInputWheelieMoving(u8 *newDirection, u16 newKeys, u16 he
u8 direction;
struct MapObject *playerMapObj;
- direction = player_get_direction_lower_nybble();
+ direction = GetPlayerFacingDirection();
playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
if (!(heldKeys & B_BUTTON))
{
@@ -1065,7 +1065,7 @@ void Bike_HandleBumpySlopeJump(void)
if (MetatileBehavior_IsBumpySlope(tileBehavior))
{
gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_STANDING;
- sub_8059C94(player_get_direction_upper_nybble());
+ sub_8059C94(GetPlayerMovementDirection());
}
}
}