diff options
| author | coco875 <59367621+coco875@users.noreply.github.com> | 2025-07-10 23:11:36 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-10 17:11:36 -0600 |
| commit | 6a8baf89369374a4e3bbccb5b45d5de36eb7e843 (patch) | |
| tree | aa7f4d83f1c965950b82165228903c68089eccc6 /include | |
| parent | 371adbd7b98d221a460bbbb31301a81498d44227 (diff) | |
port pr 730 from the decomp (#445)
* port pr 730 from the decomp
Co-Authored-By: Jed Grabman <7600154+jedgrabman@users.noreply.github.com>
* rename file
* small fix
* finish fix time trial
---------
Co-authored-by: Jed Grabman <7600154+jedgrabman@users.noreply.github.com>
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/defines.h | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/include/defines.h b/include/defines.h index 5895dc96c..594d43f46 100644 --- a/include/defines.h +++ b/include/defines.h @@ -48,6 +48,27 @@ #define HOLD_ALL_DPAD_AND_C_BUTTONS \ (U_JPAD | L_JPAD | R_JPAD | D_JPAD | U_CBUTTONS | L_CBUTTONS | R_CBUTTONS | D_CBUTTONS) +#define ALL_BUTTONS \ + (A_BUTTON | B_BUTTON | L_TRIG | R_TRIG | Z_TRIG | START_BUTTON | U_JPAD | L_JPAD | R_JPAD | D_JPAD | U_CBUTTONS | \ + L_CBUTTONS | R_CBUTTONS | D_CBUTTONS) + +/** + * Replay controller buttons + * Used for time trial replays (including staff and player ghosts) + * Each entry is converted to a u32 value + * This allows access to the button struct member + */ +#define REPLAY_A_BUTTON (1 << 31) // 0x80000000 +#define REPLAY_B_BUTTON (1 << 30) // 0x40000000 +#define REPLAY_Z_TRIG (1 << 29) // 0x20000000 +#define REPLAY_R_TRIG (1 << 28) // 0x10000000 + +#define REPLAY_FRAME_COUNTER 0xFF0000 +#define REPLAY_CLEAR_FRAME_COUNTER (0xFFFFFFFF & ~REPLAY_FRAME_COUNTER) +#define REPLAY_STICK_Y 0xFF00 +#define REPLAY_STICK_X 0xFF +#define REPLAY_FRAME_INCREMENT 0x10000 + /** * @brief Jump to demo mode from the debug menu using L and A */ @@ -382,15 +403,15 @@ enum PLACE { FIRST_PLACE, SECOND_PLACE, THIRD_PLACE, FOURTH_PLACE }; /** * @brief durations of effects */ - #define STAR_EFFECT_DURATION 0xA - #define BOO_EFFECT_DURATION 0x7 - - /** - * @brief alpha related values - */ - #define ALPHA_MAX 0xFF - #define ALPHA_MIN 0x0 - #define ALPHA_BOO_EFFECT 0x60 +#define STAR_EFFECT_DURATION 0xA +#define BOO_EFFECT_DURATION 0x7 + +/** + * @brief alpha related values + */ +#define ALPHA_MAX 0xFF +#define ALPHA_MIN 0x0 +#define ALPHA_BOO_EFFECT 0x60 #define ALPHA_CHANGE_LARGE 8 #define ALPHA_CHANGE_MEDIUM 4 |
