summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2024-11-21 10:48:50 +1100
committerGitHub <noreply@github.com>2024-11-20 15:48:50 -0800
commit0b51a16453b0dcf136bf694206ee603adac67eaf (patch)
treee1cd8196a489bbc982a87665557fe2ab5ce5c6dc /include
parent70e97dc285caf2060dda282c7420ed1e655f806e (diff)
Player Docs: Spin Attack (#1741)
* spin attack * cleanup * fix bss * PR review * sync func name * add todo
Diffstat (limited to 'include')
-rw-r--r--include/z64player.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/include/z64player.h b/include/z64player.h
index 8a3aaa7eb..4b7345505 100644
--- a/include/z64player.h
+++ b/include/z64player.h
@@ -560,6 +560,14 @@ typedef enum PlayerLedgeClimbType {
#define LEDGE_DIST_MAX 399.96002f
+typedef enum PlayerStickDirection {
+ /* -1 */ PLAYER_STICK_DIR_NONE = -1,
+ /* 0 */ PLAYER_STICK_DIR_FORWARD,
+ /* 1 */ PLAYER_STICK_DIR_LEFT,
+ /* 2 */ PLAYER_STICK_DIR_BACKWARD,
+ /* 3 */ PLAYER_STICK_DIR_RIGHT
+} PlayerStickDirection;
+
// TODO: less dumb name
#define SFX_VOICE_BANK_SIZE 0x20
@@ -893,8 +901,8 @@ typedef enum PlayerCueId {
#define PLAYER_STATE1_400 (1 << 10)
// Currently carrying an actor
#define PLAYER_STATE1_CARRYING_ACTOR (1 << 11)
-// charging spin attack
-#define PLAYER_STATE1_1000 (1 << 12)
+// Currently charging a spin attack (by holding down the B button)
+#define PLAYER_STATE1_CHARGING_SPIN_ATTACK (1 << 12)
//
#define PLAYER_STATE1_2000 (1 << 13)
//
@@ -1250,9 +1258,9 @@ typedef struct Player {
/* 0xADB */ s8 meleeWeaponState;
/* 0xADC */ s8 unk_ADC;
/* 0xADD */ s8 unk_ADD; // Some sort of combo counter
- /* 0xADE */ u8 unk_ADE;
- /* 0xADF */ s8 unk_ADF[4]; // Circular buffer used for testing for triggering a quickspin
- /* 0xAE3 */ s8 unk_AE3[4]; // Circular buffer used for ?
+ /* 0xADE */ u8 controlStickDataIndex; // cycles between 0 - 3. Used to index `controlStickSpinAngles` and `controlStickDirections`
+ /* 0xADF */ s8 controlStickSpinAngles[4]; // Stores a modified version of the control stick angle for the last 4 frames. Used for checking spins.
+ /* 0xAE3 */ s8 controlStickDirections[4]; // Stores the control stick direction (relative to shape yaw) for the last 4 frames. See `PlayerStickDirection`.
/* 0xAE7 */ union {
s8 actionVar1;
} av1; // "Action Variable 1": context dependent variable that has different meanings depending on what action is currently running