Mario Kart 64
Loading...
Searching...
No Matches
menus.h
Go to the documentation of this file.
1#ifndef MENUS_H
2#define MENUS_H
3
4#include <PR/os.h>
5#include <common_structs.h>
6#include <defines.h>
7
8// needs to be a union (or array...?) to go into rodata as a const
9// terrible for endianness... Best guess as to what this is for..
14
26
32 SUB_MENU_DATA, // 0x01, value repurposed in map select
86};
87
96 MAIN_MENU_MODE_SELECT, // Mario GP - T. Trials - VS - Battle
97 MAIN_MENU_MODE_SUB_SELECT, // CC Selection and T.Trials options (Begin, Data)
98 MAIN_MENU_OK_SELECT, // OK option after selecting a submode
99 MAIN_MENU_OK_SELECT_GO_BACK, // OK option after going back from player select
100 MAIN_MENU_MODE_SUB_SELECT_GO_BACK // Used in T.Trials after going back to Data option from course data
102
109 PLAYER_SELECT_MENU_OK, // OK option after selecting characters
110 PLAYER_SELECT_MENU_OK_GO_BACK // OK option after going back from map select
112
127
144
155
165
175
184
193
194
195/* functions */
196void update_menus(void);
197void options_menu_act(struct Controller*, u16);
202void splash_menu_act(struct Controller*, u16);
203void setup_game_mode_selected(void);
209void reset_cycle_flash_menu(void);
210void set_sound_mode(void);
211bool is_screen_being_faded(void);
212
213/* data */
214extern s32 gIntroModelZEye;
215extern f32 gIntroModelScale;
216extern f32 gIntroModelRotX;
217extern f32 gIntroModelRotY;
218extern f32 gIntroModelRotZ;
219extern f32 gIntroModelPosX;
220extern f32 gIntroModelPosY;
221extern f32 gIntroModelPosZ;
222
223extern s32 gMenuFadeType;
224
227extern s8 gSubMenuSelection;
233extern u8 gSoundMode;
234extern s8 gPlayerCount;
241extern s8 gDebugGotoScene;
242extern s8 gGhostPlayerInit;
243extern s8 gCourseMapInit;
245extern s32 gMenuDelayTimer;
247extern s8 gCupSelection;
248extern s8 gCourseIndexInCup;
249extern s8 unref_8018EE0C;
250
251extern s32 gMenuSelection; // D_800E86A0
253extern s8 gCharacterSelections[];
254
255extern s8 gGameModeMenuColumn[];
256extern s8 gGameModeSubMenuColumn[4][3];
257extern s8 gNextDemoId;
261
262extern const s8 gPlayerModeSelection[];
263extern const s32 gGameModePlayerSelection[][3];
265
266// end of menus.c variables
267
268#endif /* MENUS_H */
@ NUM_CUPS
Definition defines.h:146
#define NUM_COURSES_PER_CUP
Definition defines.h:148
FadeModeSelectionTypes
Options for gFadeModeSelection.
Definition menus.h:179
@ FADE_MODE_LOGO
Definition menus.h:182
@ FADE_MODE_MAIN
Definition menus.h:181
@ FADE_MODE_NONE
Definition menus.h:180
f32 gIntroModelRotZ
Definition menus.c:37
void logo_intro_menu_act(struct Controller *, u16)
s8 gScreenModeListIndex
Definition menus.c:50
void player_select_menu_act(struct Controller *, u16)
s8 gTimeTrialDataCourseIndex
Definition menus.c:56
s32 gMenuFadeType
Definition menus.c:42
s8 gSubMenuSelection
Definition menus.c:45
void options_menu_act(struct Controller *, u16)
Definition menus.c:245
s8 gControllerPakVisibleTableRows[]
Definition menus.c:91
f32 gIntroModelPosZ
Definition menus.c:40
s8 gGameModeMenuColumn[]
Definition menus.c:79
PlayerSelectMenuSelectionTypes
Options for gPlayerSelectMenuSelection.
Definition menus.h:106
@ PLAYER_SELECT_MENU_MAIN
Definition menus.h:108
@ PLAYER_SELECT_MENU_OK
Definition menus.h:109
@ PLAYER_SELECT_MENU_NONE
Definition menus.h:107
@ PLAYER_SELECT_MENU_OK_GO_BACK
Definition menus.h:110
f32 gIntroModelRotX
Definition menus.c:35
void main_menu_act(struct Controller *, u16)
s32 gMenuTimingCounter
Definition menus.c:62
s32 gMenuDelayTimer
Definition menus.c:63
bool is_screen_being_faded(void)
Definition menus.c:2035
const s16 gCupCourseOrder[NUM_CUPS][NUM_COURSES_PER_CUP]
Definition menus.c:148
s8 gDemoUseController
Definition menus.c:64
void controller_pak_menu_act(struct Controller *, u16)
s8 gCharacterGridIsSelected[4]
Definition menus.c:44
s8 gControllerPakMenuSelection
Definition menus.c:49
void splash_menu_act(struct Controller *, u16)
Definition menus.c:1021
s8 gControllerPakSelectedTableRow
Definition menus.c:87
s8 gCourseRecordsMenuSelection
Definition menus.c:57
s32 gIntroModelZEye
Definition menus.c:33
void update_menus(void)
Definition menus.c:175
s8 gGhostPlayerInit
Definition menus.c:60
s8 gPlayerCount
Definition menus.c:52
CourseRecordsMenuSelectionTypes
Options for gCourseRecordsMenuSelection.
Definition menus.h:148
@ COURSE_RECORDS_MENU_MAX
Definition menus.h:153
@ COURSE_RECORDS_MENU_ERASE_GHOST
Definition menus.h:152
@ COURSE_RECORDS_MENU_ERASE_RECORDS
Definition menus.h:151
@ COURSE_RECORDS_MENU_MIN
Definition menus.h:149
@ COURSE_RECORDS_MENU_RETURN_MENU
Definition menus.h:150
s8 gCupSelection
Definition menus.c:65
s32 gMenuSelection
Definition menus.c:71
void reset_cycle_flash_menu(void)
Definition menus.c:2014
s8 gCourseIndexInCup
Definition menus.c:67
f32 gIntroModelRotY
Definition menus.c:36
void data_menu_act(struct Controller *, u16)
s8 gTimeTrialsResultCursorSelection
Definition menus.c:54
s8 gPlayerSelectMenuSelection
Definition menus.c:47
ControllerPakMenuSelectionTypes
Options for gControllerPakMenuSelection.
Definition menus.h:131
@ CONTROLLER_PAK_MENU_SELECT_RECORD
Definition menus.h:133
@ CONTROLLER_PAK_MENU_ERASE_ERROR_PAK_CHANGED
Definition menus.h:142
@ CONTROLLER_PAK_MENU_TABLE_GAME_DATA
Definition menus.h:137
@ CONTROLLER_PAK_MENU_QUIT
Definition menus.h:136
@ CONTROLLER_PAK_MENU_ERASE_ERROR_NO_PAK
Definition menus.h:141
@ CONTROLLER_PAK_MENU_GO_TO_ERASING
Definition menus.h:138
@ CONTROLLER_PAK_MENU_END
Definition menus.h:134
@ CONTROLLER_PAK_MENU_ERASE_ERROR_NOT_ERASED
Definition menus.h:140
@ CONTROLLER_PAK_MENU_ERASE
Definition menus.h:135
@ CONTROLLER_PAK_MENU_ERASING
Definition menus.h:139
@ CONTROLLER_PAK_MENU_NONE
Definition menus.h:132
s8 gCourseRecordsSubMenuSelection
Definition menus.c:58
f32 gIntroModelScale
Definition menus.c:34
s8 gControllerPakScrollDirection
Definition menus.c:93
const s8 gPlayerModeSelection[]
Definition menus.c:114
s8 gDebugGotoScene
Definition menus.c:59
s8 gCourseMapInit
Definition menus.c:61
void course_data_menu_act(struct Controller *, u16)
DebugGotoSceneTypes
Options for gDebugGotoScene.
Definition menus.h:169
@ DEBUG_GOTO_RACING
Definition menus.h:170
@ DEBUG_GOTO_CREDITS_SEQUENCE_DEFAULT
Definition menus.h:172
@ DEBUG_GOTO_ENDING
Definition menus.h:171
@ DEBUG_GOTO_CREDITS_SEQUENCE_EXTRA
Definition menus.h:173
s8 unref_8018EE0C
Definition menus.c:68
s8 gGameModeSubMenuColumn[4][3]
Definition menus.c:84
f32 gIntroModelPosX
Definition menus.c:38
bool is_character_spot_free(s32)
Definition menus.c:1513
CourseRecordsSubMenuSelectionTypes
Options for gCourseRecordsSubMenuSelection.
Definition menus.h:159
@ COURSE_RECORDS_SUB_MENU_MAX
Definition menus.h:163
@ COURSE_RECORDS_SUB_MENU_QUIT
Definition menus.h:161
@ COURSE_RECORDS_SUB_MENU_MIN
Definition menus.h:160
@ COURSE_RECORDS_SUB_MENU_ERASE
Definition menus.h:162
s8 gDebugMenuSelection
Definition menus.c:48
s8 gMainMenuSelection
Definition menus.c:46
s8 gNextDemoId
Definition menus.c:86
SubMenuSelectionType
Options for gSubMenuSelection.
Definition menus.h:30
@ SUB_MENU_COPY_PAK_ERROR_1P_MAX
Definition menus.h:70
@ SUB_MENU_COPY_PAK_FROM_GHOST2_1P
Definition menus.h:53
@ SUB_MENU_MAP_SELECT_COURSE
Definition menus.h:34
@ SUB_MENU_COPY_PAK_TO_GHOST1_2P
Definition menus.h:62
@ SUB_MENU_COPY_PAK_START
Definition menus.h:76
@ SUB_MENU_COPY_PAK_TO_GHOST2_2P
Definition menus.h:63
@ SUB_MENU_COPY_PAK_ERROR_BAD_READ_1P
Definition menus.h:67
@ SUB_MENU_DATA_OPTIONS
Definition menus.h:37
@ SUB_MENU_COPY_PAK_FROM_GHOST_MAX
Definition menus.h:54
@ SUB_MENU_COPY_PAK_UNABLE_COPY_FROM_1P
Definition menus.h:81
@ SUB_MENU_COPY_PAK_PROMPT_MAX
Definition menus.h:74
@ SUB_MENU_COPY_PAK_CREATE_GAME_DATA_DONE
Definition menus.h:85
@ SUB_MENU_COPY_PAK_UNABLE_ERROR_MAX
Definition menus.h:83
@ SUB_MENU_COPY_PAK_ERROR_NO_PAGES_1P
Definition menus.h:69
@ SUB_MENU_COPY_PAK_TO_GHOST_MIN
Definition menus.h:61
@ SUB_MENU_COPY_PAK_ERROR_NO_GHOST_DATA
Definition menus.h:56
@ SUB_MENU_COPY_PAK_ACTION_MIN
Definition menus.h:75
@ SUB_MENU_DATA_CANT_ERASE
Definition menus.h:39
@ SUB_MENU_ERASE_QUIT
Definition menus.h:47
@ SUB_MENU_COPY_PAK_ERROR_2P_MAX
Definition menus.h:60
@ SUB_MENU_COPY_PAK_PROMPT_COPY
Definition menus.h:73
@ SUB_MENU_COPY_PAK_PROMPT_MIN
Definition menus.h:71
@ SUB_MENU_MAP_SELECT_OK
Definition menus.h:35
@ SUB_MENU_COPY_PAK_ERROR_NO_PAK_2P
Definition menus.h:58
@ SUB_MENU_COPY_PAK_TO_GHOST_MAX
Definition menus.h:64
@ SUB_MENU_ERASE_MAX
Definition menus.h:49
@ SUB_MENU_COPY_PAK_FROM_GHOST1_1P
Definition menus.h:52
@ SUB_MENU_COPY_PAK_ERROR_CANT_CREATE_1P
Definition menus.h:68
@ SUB_MENU_COPY_PAK_ERROR_1P_MIN
Definition menus.h:65
@ SUB_MENU_MAP_SELECT_BATTLE_COURSE
Definition menus.h:36
@ SUB_MENU_DATA
Definition menus.h:32
@ SUB_MENU_COPY_PAK_ERROR_BAD_READ_2P
Definition menus.h:59
@ SUB_MENU_OPTION_SOUND_MODE
Definition menus.h:42
@ SUB_MENU_OPTION_MAX
Definition menus.h:45
@ SUB_MENU_NONE
Definition menus.h:31
@ SUB_MENU_COPY_PAK_ERROR_2P_MIN
Definition menus.h:55
@ SUB_MENU_MAP_SELECT_CUP
Definition menus.h:33
@ SUB_MENU_COPY_PAK_UNABLE_READ_FROM_2P
Definition menus.h:82
@ SUB_MENU_COPY_PAK_COPYING
Definition menus.h:77
@ SUB_MENU_COPY_PAK_ERROR_NO_GAME_DATA
Definition menus.h:57
@ SUB_MENU_OPTION_RETURN_GAME_SELECT
Definition menus.h:41
@ SUB_MENU_ERASE_MIN
Definition menus.h:46
@ SUB_MENU_COPY_PAK_FROM_GHOST_MIN
Definition menus.h:51
@ SUB_MENU_COPY_PAK_CREATE_GAME_DATA_INIT
Definition menus.h:84
@ SUB_MENU_COPY_PAK_ERROR_NO_PAK_1P
Definition menus.h:66
@ SUB_MENU_COPY_PAK_UNABLE_ERROR_MIN
Definition menus.h:80
@ SUB_MENU_ERASE_ERASE
Definition menus.h:48
@ SUB_MENU_DATA_ERASE_CONFIRM
Definition menus.h:38
@ SUB_MENU_SAVE_DATA_ERASED
Definition menus.h:50
@ SUB_MENU_OPTION_ERASE_ALL_DATA
Definition menus.h:44
@ SUB_MENU_COPY_PAK_PROMPT_QUIT
Definition menus.h:72
@ SUB_MENU_OPTION_COPY_CONTROLLER_PAK
Definition menus.h:43
@ SUB_MENU_OPTION_MIN
Definition menus.h:40
@ SUB_MENU_COPY_PAK_ACTION_MAX
Definition menus.h:79
@ SUB_MENU_COPY_PAK_COMPLETED
Definition menus.h:78
u8 gSoundMode
Definition menus.c:51
void setup_game_mode_selected(void)
Definition menus.c:1232
s32 gFadeModeSelection
Definition menus.c:72
void set_sound_mode(void)
Definition menus.c:2021
s8 gBattleResultCursorSelection
Definition menus.c:55
MainMenuSelectionType
Options for gMainMenuSelection.
Definition menus.h:91
@ MAIN_MENU_NONE
Definition menus.h:92
@ MAIN_MENU_OK_SELECT_GO_BACK
Definition menus.h:99
@ MAIN_MENU_DATA
Definition menus.h:94
@ MAIN_MENU_PLAYER_SELECT
Definition menus.h:95
@ MAIN_MENU_OPTION
Definition menus.h:93
@ MAIN_MENU_OK_SELECT
Definition menus.h:98
@ MAIN_MENU_MODE_SELECT
Definition menus.h:96
@ MAIN_MENU_MODE_SUB_SELECT_GO_BACK
Definition menus.h:100
@ MAIN_MENU_MODE_SUB_SELECT
Definition menus.h:97
s8 gVersusResultCursorSelection
Definition menus.c:53
s8 gCharacterGridSelections[4]
Definition menus.c:43
void load_menu_states(s32)
Definition menus.c:1830
ControllerPakScrollDirectionTypes
Options for gControllerPakScrollDirection.
Definition menus.h:188
@ CONTROLLER_PAK_SCROLL_DIR_NONE
Definition menus.h:189
@ CONTROLLER_PAK_SCROLL_DIR_DOWN
Definition menus.h:190
@ CONTROLLER_PAK_SCROLL_DIR_UP
Definition menus.h:191
DebugMenuSelectionTypes
Options for gDebugMenuSelection.
Definition menus.h:116
@ DEBUG_MENU_DEBUG_MODE
Definition menus.h:119
@ DEBUG_MENU_NONE
Definition menus.h:117
@ DEBUG_MENU_COURSE
Definition menus.h:120
@ DEBUG_MENU_SCREEN_MODE
Definition menus.h:121
@ DEBUG_MENU_OPTION_SELECTED
Definition menus.h:125
@ DEBUG_MENU_GIVE_ALL_GOLD_CUP
Definition menus.h:124
@ DEBUG_MENU_PLAYER
Definition menus.h:122
@ DEBUG_MENU_DISABLED
Definition menus.h:118
@ DEBUG_MENU_SOUND_MODE
Definition menus.h:123
MenuFadeTypes
Options for gMenuFadeType.
Definition menus.h:18
@ MENU_FADE_TYPE_MAIN
Definition menus.h:19
@ MENU_FADE_TYPE_OPTION
Definition menus.h:23
@ MENU_FADE_TYPE_MAX
Definition menus.h:24
@ MENU_FADE_TYPE_DEMO
Definition menus.h:21
@ MENU_FADE_TYPE_DATA
Definition menus.h:22
@ MENU_FADE_TYPE_BACK
Definition menus.h:20
const s32 gGameModePlayerSelection[][3]
Definition menus.c:134
f32 gIntroModelPosY
Definition menus.c:39
void course_select_menu_act(struct Controller *, u16)
Definition menus.c:1721
s8 gCharacterSelections[]
Definition menus.c:75
Definition common_structs.h:62
signed int s32
Definition ultratypes.h:15
signed char s8
Definition ultratypes.h:11
signed short int s16
Definition ultratypes.h:13
float f32
Definition ultratypes.h:34
unsigned short int u16
Definition ultratypes.h:14
unsigned char u8
Definition ultratypes.h:12
Definition menus.h:10
s32 word
Definition menus.h:12
u8 modes[4]
Definition menus.h:11