summaryrefslogtreecommitdiff
path: root/include/bike.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/bike.h')
-rw-r--r--include/bike.h53
1 files changed, 37 insertions, 16 deletions
diff --git a/include/bike.h b/include/bike.h
index decbd1d49..28aa2037d 100644
--- a/include/bike.h
+++ b/include/bike.h
@@ -1,15 +1,17 @@
#ifndef GUARD_BIKE_H
#define GUARD_BIKE_H
-struct UnknownStruct1
+// the struct below is used for checking button combinations of the last input so that the acro can potentially perform a side/turn jump.
+// its possible that at some point Game Freak intended for the acro bike to have more complex tricks: but only the acro jump combinations can be seen in the final ROM.
+struct BikeHistoryInputInfo
{
- u32 unk0;
- u32 unk4;
- u32 unk8;
- u32 unkC;
- const u8 *unk10;
- const u8 *unk14;
- u32 unk18;
+ u32 dirHistoryMatch; // the direction you need to press
+ u32 abStartSelectHistoryMatch; // the button you need to press
+ u32 dirHistoryMask; // mask applied so that way only the recent nybble (the recent input) is checked
+ u32 abStartSelectHistoryMask; // mask applied so that way only the recent nybble (the recent input) is checked
+ const u8 *dirTimerHistoryList; // list of timers to check for direction before the button+dir combination can be verified.
+ const u8 *abStartSelectHistoryList; // list of timers to check for buttons before the button+dir combination can be verified.
+ u32 direction; // direction to jump
};
// Player speeds
@@ -22,7 +24,16 @@ enum
SPEED_FASTEST,
};
-//Acro bike states
+// mach bike transitions enum
+enum
+{
+ MACH_TRANS_FACE_DIRECTION,
+ MACH_TRANS_TURN_DIRECTION,
+ MACH_TRANS_KEEP_MOVING,
+ MACH_TRANS_START_MOVING
+};
+
+// Acro bike states
enum
{
ACRO_STATE_NORMAL,
@@ -30,27 +41,37 @@ enum
ACRO_STATE_WHEELIE_STANDING,
ACRO_STATE_BUNNY_HOP,
ACRO_STATE_WHEELIE_MOVING,
- ACRO_STATE_5,
- ACRO_STATE_6,
+ ACRO_STATE_SIDE_JUMP,
+ ACRO_STATE_TURN_JUMP,
};
-//Acro bike transitions
+// Acro bike transitions
enum
{
ACRO_TRANS_FACE_DIRECTION,
- ACRO_TRANS_NORMAL_TO_WHEELIE = 3,
+ ACRO_TRANS_TURN_DIRECTION,
+ ACRO_TRANS_MOVING,
+ ACRO_TRANS_NORMAL_TO_WHEELIE,
ACRO_TRANS_WHEELIE_TO_NORMAL,
+ ACRO_TRANS_WHEELIE_IDLE,
+ ACRO_TRANS_WHEELIE_HOPPING_STANDING,
+ ACRO_TRANS_WHEELIE_HOPPING_MOVING,
+ ACRO_TRANS_SIDE_JUMP,
+ ACRO_TRANS_TURN_JUMP,
+ ACRO_TRANS_WHEELIE_MOVING,
+ ACRO_TRANS_WHEELIE_RISING_MOVING,
+ ACRO_TRANS_WHEELIE_LOWERING_MOVING,
};
void MovePlayerOnBike(u8 direction, u16 newKeys, u16 heldKeys);
-void sub_80E5B38(u16 a, u16 b);
+void Bike_TryAcroBikeHistoryUpdate(u16 a, u16 b);
bool8 IsRunningDisallowed(u8 tile);
bool8 IsBikingDisallowedByPlayer(void);
bool8 player_should_look_direction_be_enforced_upon_movement(void);
void GetOnOffBike(u8 var);
void BikeClearState(int var1, int var2);
-void sub_80E6010(u8 var);
+void Bike_UpdateBikeCounterSpeed(u8 var);
s16 GetPlayerSpeed(void);
-void sub_80E6084(void);
+void Bike_HandleBumpySlopeJump(void);
#endif