summaryrefslogtreecommitdiff
path: root/src/field/bike.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/field/bike.c')
-rw-r--r--src/field/bike.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/field/bike.c b/src/field/bike.c
index 8db01b4b4..736dbc837 100644
--- a/src/field/bike.c
+++ b/src/field/bike.c
@@ -14,6 +14,11 @@ extern bool8 gBikeCyclingChallenge;
extern u8 gBikeCollisions;
extern u8 gUnusedBikeCameraAheadPanback;
+#ifdef DEBUG
+extern u8 gUnknown_020297ED;
+u8 debug_sub_805F2B0(u8);
+#endif
+
static void MovePlayerOnMachBike(u8, u16, u16);
static u8 GetMachBikeTransition(u8 *);
static void MachBikeTransition_FaceDirection(u8);
@@ -126,6 +131,14 @@ static const struct BikeHistoryInputInfo gAcroBikeTricksList[] =
void MovePlayerOnBike(u8 direction, u16 newKeys, u16 heldKeys)
{
+#ifdef DEBUG
+ if (gUnknown_020297ED && debug_sub_805F2B0(direction))
+ {
+ Bike_SetBikeStill();
+ return;
+ }
+#endif
+
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_MACH_BIKE)
MovePlayerOnMachBike(direction, newKeys, heldKeys);
else
@@ -271,6 +284,14 @@ static void MachBikeTransition_TrySlowDown(u8 var)
// the acro bike requires the input handler to be executed before the transition can.
static void MovePlayerOnAcroBike(u8 newDirection, u16 newKeys, u16 heldKeys)
{
+#ifdef DEBUG
+ if (gUnknown_020297ED && debug_sub_805F2B0(newDirection))
+ {
+ Bike_SetBikeStill();
+ return;
+ }
+#endif
+
sAcroBikeTransitions[CheckMovementInputAcroBike(&newDirection, newKeys, heldKeys)](newDirection);
}