Mario Kart 64
Loading...
Searching...
No Matches
defines.h
Go to the documentation of this file.
1#ifndef DEFINES_H
2#define DEFINES_H
3
4
8#define OK 1
9#define BAD 0
10
41#define DEBUG_MODE 0
42#define DEBUG_MENU 1
43#define HOLD_ALL_DPAD_AND_C_BUTTONS (U_JPAD | L_JPAD | R_JPAD | D_JPAD | U_CBUTTONS | L_CBUTTONS | R_CBUTTONS | D_CBUTTONS)
44
48#define DEBUG_MENU_DISABLED 1
49#define DEBUG_MENU_DEBUG_MODE 2
50#define DEBUG_MENU_COURSE 3
51#define DEBUG_MENU_SCREEN_MODE 4
52#define DEBUG_MENU_PLAYER 5
53#define DEBUG_MENU_SOUND_MODE 6
54#define DEBUG_MENU_GIVE_ALL_GOLD_CUP 7
55#define DEBUG_MENU_EXITED 64
56
60#define DEBUG_GOTO_RACING 0
61#define DEBUG_GOTO_ENDING 1
62#define DEBUG_GOTO_CREDITS_SEQUENCE_CC_50 2
63#define DEBUG_GOTO_CREDITS_SEQUENCE_CC_EXTRA 3
64
68#define DEMO_MODE_ACTIVE 1
69#define DEMO_MODE_INACTIVE 0
70
71#ifdef VERSION_EU
72#define COURSE_TIMER_ITER 0.020041665999999999 // 1 / 50
73#else
74#define COURSE_TIMER_ITER 0.01666666 // 1 / 60
75#endif
76
77#define V_BlANK_TIMER_ITER 0.01666666
78
85#define PLAYER_INACTIVE 0 // 0x0000
86#define PLAYER_UNKNOWN_0x40 (1 << 6) // 0x0040
87#define PLAYER_INVISIBLE_OR_BOMB (1 << 8) // 0x0100
88#define PLAYER_STAGING (1 << 9) // 0x0200
89#define PLAYER_UNKNOWN (1 << 10) // 0x0400 // unused ?
90#define PLAYER_CINEMATIC_MODE (1 << 11) // 0x0800 // Also used to track eliminations in Battle mode.
91#define PLAYER_CPU (1 << 12) // 0x1000
92#define PLAYER_START_SEQUENCE (1 << 13) // 0x2000
93#define PLAYER_HUMAN (1 << 14) // 0x4000
94#define PLAYER_EXISTS (1 << 15) // 0x8000
95
96// Compiles to -0x1000 in diff.py
97#define PLAYER_HUMAN_AND_CPU PLAYER_EXISTS | PLAYER_HUMAN | PLAYER_CPU | PLAYER_START_SEQUENCE
98
99#define ZERO_PLAYERS_SELECTED 0
100#define ONE_PLAYERS_SELECTED 1
101#define TWO_PLAYERS_SELECTED 2
102#define THREE_PLAYERS_SELECTED 3
103#define FOUR_PLAYERS_SELECTED 4
104#define SELECTED_PLAYER_DEFINES_TOTAL 5
105
106#define PLAYER_ONE 0
107#define PLAYER_TWO 1
108#define PLAYER_THREE 2
109#define PLAYER_FOUR 3
110
111#define NUM_PLAYERS 8
112
113#define MARIO_SIZE 0.75f
114#define LUIGI_SIZE 0.75f
115#define YOSHI_SIZE 0.75f
116#define TOAD_SIZE 0.75f
117#define DK_SIZE 0.75f
118#define WARIO_SIZE 0.75f
119#define PEACH_SIZE 0.75f
120#define BOWSER_SIZE 0.75f
121
122// 2P Game has Grand Prix, VS, and Battle as available game types
123#define MAX_NUM_MAIN_MENU_GAME_TYPES 3
124
128#define GRAND_PRIX 0
129#define TIME_TRIALS 1
130#define VERSUS 2
131#define BATTLE 3
132
141#define CC_50 0
142#define CC_100 1
143#define CC_150 2
144#define CC_EXTRA 3
145#define CC_BATTLE 4
146
153#define MUSHROOM_CUP 0
154#define FLOWER_CUP 1
155#define STAR_CUP 2
156#define SPECIAL_CUP 3
157#define BATTLE_CUP 4
158#define NUM_CUPS 5
159
166#define MARIO 0
167#define LUIGI 1
168#define YOSHI 2
169#define TOAD 3
170#define DK 4
171#define WARIO 5
172#define PEACH 6
173#define BOWSER 7
174
178#define OPTIONS_MENU 5
179#define DATA_MENU 6
180#define COURSE_DATA_MENU 7
181#define LOGO_INTRO_MENU 8
182#define CONTROLLER_PAK_MENU 9
183#define START_MENU 10
184#define MAIN_MENU 11
185#define PLAYER_SELECT_MENU 12
186#define COURSE_SELECT_MENU 13
187#define RACING_DUPLICATE 14
188
192#define START_MENU_FROM_QUIT 0
193#define MAIN_MENU_FROM_QUIT 1
194#define PLAYER_SELECT_MENU_FROM_QUIT 2
195#define COURSE_SELECT_MENU_FROM_QUIT 3
196#define RACING 4
197#define ENDING 5
198#define CREDITS_SEQUENCE 9
199
203#define BLANK_MAIN_MENU 0
204#define OPTIONS_SELECTION 1
205#define DATA_SELECTION 2
206#define PLAYER_NUM_SELECTION 3
207#define GAME_MODE_SELECTION 4
208#define GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION 5 // Selecting CC for GP and Versus. Selecting "Begin" or "Data" for Time Trials. Unused for Battle
209#define CONFIRM_OK_SELECTION 6
210#define CONFIRM_OK_SELECTION_FROM_BACK_OUT 7
211#define TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT 8
212
216#define CONTROLLER_PAK_MENU_SELECT_RECORD 1
217#define CONTROLLER_PAK_MENU_END 2
218#define CONTROLLER_PAK_MENU_ERASE 3
219#define CONTROLLER_PAK_MENU_QUIT 4
220#define CONTROLLER_PAK_MENU_TABLE_GAME_DATA 5
221#define CONTROLLER_PAK_MENU_GO_TO_ERASING 6
222#define CONTROLLER_PAK_MENU_ERASING 7
223#define CONTROLLER_PAK_MENU_ERASE_ERROR_NOT_ERASED 8
224#define CONTROLLER_PAK_MENU_ERASE_ERROR_NO_PAK 9
225#define CONTROLLER_PAK_MENU_ERASE_ERROR_PAK_CHANGED 10
226
230#define SCREEN_MODE_1P 0
231#define SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL 1
232#define SCREEN_MODE_2P_SPLITSCREEN_VERTICAL 2
233#define SCREEN_MODE_3P_4P_SPLITSCREEN 3
234#define NUM_SCREEN_MODES 4
235
239#define TIME_TRIAL_3LAP_RECORD_1 0
240#define TIME_TRIAL_3LAP_RECORD_2 1
241#define TIME_TRIAL_3LAP_RECORD_3 2
242#define TIME_TRIAL_3LAP_RECORD_4 3
243#define TIME_TRIAL_3LAP_RECORD_5 4
244#define TIME_TRIAL_1LAP_RECORD 5
245
254#define TEXT_BLUE 0
255#define TEXT_GREEN 1
256#define TEXT_RED 2
257#define TEXT_YELLOW 3
258#define TEXT_BLUE_GREEN_RED_CYCLE_1 4
259#define TEXT_BLUE_GREEN_RED_CYCLE_2 5
260
266#define SOUND_STEREO 0
267#define SOUND_HEADPHONES 1
268#define SOUND_UNUSED 2
269#define SOUND_MONO 3
270#define NUM_SOUND_MODES 4
271
276#define DEMO_ONE 0 // Mario, Mario Raceway, Grand Prix
277#define DEMO_TWO 1 // Yoshi DK, Choco Mountain, Versus
278#define DEMO_THREE 2 // Luigi, Kalamari Desert, Grand Prix
279#define DEMO_FOUR 3 // Wario Yoshi Bowser, Wario Stadium, Versus
280#define DEMO_FIVE 4 // Bowser, Bowser Castle, Grand Prix
281#define DEMO_SIX 5 // Mario Luigi Peach Toad, Sherbert Land, Versus
282#define NUM_DEMOS 6
283
284#define CUP_COURSE_ONE 0
285#define CUP_COURSE_TWO 1
286#define CUP_COURSE_THREE 2
287#define CUP_COURSE_FOUR 3
288#define NUM_COURSES_PER_CUP 4
289
293typedef enum {
294 /* 0x00 */ ITEM_NONE = 0,
295 /* 0x01 */ ITEM_BANANA,
299 /* 0x05 */ ITEM_RED_SHELL,
304 /* 0x0A */ ITEM_STAR,
305 /* 0x0B */ ITEM_BOO,
306 /* 0x0C */ ITEM_MUSHROOM,
309 /* 0x0F */ ITEM_SUPER_MUSHROOM
311
315#define BALLOON_STATUS_GONE 0
316#define BALLOON_STATUS_PRESENT 1
317#define BALLOON_STATUS_DEPARTING 2
318
322#define MAX_TIME 0x927C0
323
328#define BOOST_SOUND_EFFECT 0x200 // being boosted by trigger a mushroom
329#define BOO_SOUND_EFFECT 0x800 // being a boo
330#define STAR_SOUND_EFFECT 0x2000 // being a star
331#define HIT_ROTATING_SOUND_EFFECT 0x4000 // hitting a rotating object
332#define BOOST_RAMP_WOOD_SOUND_EFFECT 0x8000 // being boosted by a ramp
333#define HOLD_BANANA_SOUND_EFFECT 0x40000 // holding a banana
334#define REVERSE_SOUND_EFFECT 0x400000 // being in the wrong direction
335#define BOOST_RAMP_ASPHALT_SOUND_EFFECT 0x800000 // being boosted by a boost pad
336#define HIT_BY_ITEM_SOUND_EFFECT 0x1000000 // being hit by an item
337
342#define BOOST_RAMP_WOOD_EFFECT 0x4 // being boosted by a ramp
343#define STAR_EFFECT 0x200 // being a star
344#define BOOST_EFFECT 0x2000 // being boosted by trigger a mushroom
345#define BOOST_RAMP_ASPHALT_EFFECT 0x100000 // being boosted by a boost pad
346#define HIT_BY_ITEM_EFFECT 0x2000000 // being hit by an item
347#define LIGHTNING_EFFECT 0x40000000 // being hit by lightning
348#define BOO_EFFECT 0x80000000 // being a boo
349
354#define SPAWN_FIRST_SHELL 0
355#define SPAWN_SECOND_SHELL 1
356#define SPAWN_THIRD_SHELL 2
357
358#define GPACK_RGB888(r, g, b) (((r) << 16) | ((g) << 8) | (b))
359#define COLOR_LIGHT GPACK_RGB888(0x1C, 0x00, 0x00)
360#define COLOR_LAVA GPACK_RGB888(0x34, 0x00, 0x00)
361#define COLOR_BLACK GPACK_RGB888(0, 0, 0)
362
363#endif // DEFINES_H
ITEMS
Item IDs.
Definition defines.h:293
@ ITEM_TRIPLE_MUSHROOM
Definition defines.h:308
@ ITEM_THUNDERBOLT
Definition defines.h:302
@ ITEM_TRIPLE_GREEN_SHELL
Definition defines.h:298
@ ITEM_STAR
Definition defines.h:304
@ ITEM_BLUE_SPINY_SHELL
Definition defines.h:301
@ ITEM_BANANA_BUNCH
Definition defines.h:296
@ ITEM_GREEN_SHELL
Definition defines.h:297
@ ITEM_FAKE_ITEM_BOX
Definition defines.h:303
@ ITEM_NONE
Definition defines.h:294
@ ITEM_RED_SHELL
Definition defines.h:299
@ ITEM_SUPER_MUSHROOM
Definition defines.h:309
@ ITEM_BANANA
Definition defines.h:295
@ ITEM_MUSHROOM
Definition defines.h:306
@ ITEM_DOUBLE_MUSHROOM
Definition defines.h:307
@ ITEM_BOO
Definition defines.h:305
@ ITEM_TRIPLE_RED_SHELL
Definition defines.h:300