Mario Kart 64
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_SEQUENCE 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 
112 #define MARIO_SIZE 0.75f
113 #define LUIGI_SIZE 0.75f
114 #define YOSHI_SIZE 0.75f
115 #define TOAD_SIZE 0.75f
116 #define DK_SIZE 0.75f
117 #define WARIO_SIZE 0.75f
118 #define PEACH_SIZE 0.75f
119 #define BOWSER_SIZE 0.75f
120 
121 // 2P Game has Grand Prix, VS, and Battle as available game types
122 #define MAX_NUM_MAIN_MENU_GAME_TYPES 3
123 
127 #define GRAND_PRIX 0
128 #define TIME_TRIALS 1
129 #define VERSUS 2
130 #define BATTLE 3
131 
140 #define CC_50 0
141 #define CC_100 1
142 #define CC_150 2
143 #define CC_EXTRA 3
144 #define CC_BATTLE 4
145 
152 #define MUSHROOM_CUP 0
153 #define FLOWER_CUP 1
154 #define STAR_CUP 2
155 #define SPECIAL_CUP 3
156 #define BATTLE_CUP 4
157 #define NUM_CUPS 5
158 
165 #define MARIO 0
166 #define LUIGI 1
167 #define YOSHI 2
168 #define TOAD 3
169 #define DK 4
170 #define WARIO 5
171 #define PEACH 6
172 #define BOWSER 7
173 
177 #define OPTIONS_MENU 5
178 #define DATA_MENU 6
179 #define COURSE_DATA_MENU 7
180 #define LOGO_INTRO_MENU 8
181 #define CONTROLLER_PAK_MENU 9
182 #define START_MENU 10
183 #define MAIN_MENU 11
184 #define PLAYER_SELECT_MENU 12
185 #define COURSE_SELECT_MENU 13
186 #define RACING_DUPLICATE 14
187 
191 #define START_MENU_FROM_QUIT 0
192 #define MAIN_MENU_FROM_QUIT 1
193 #define PLAYER_SELECT_MENU_FROM_QUIT 2
194 #define COURSE_SELECT_MENU_FROM_QUIT 3
195 #define RACING 4
196 #define ENDING_SEQUENCE 5
197 #define CREDITS_SEQUENCE 9
198 
202 #define BLANK_MAIN_MENU 0
203 #define OPTIONS_SELECTION 1
204 #define DATA_SELECTION 2
205 #define PLAYER_NUM_SELECTION 3
206 #define GAME_MODE_SELECTION 4
207 #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
208 #define CONFIRM_OK_SELECTION 6
209 #define CONFIRM_OK_SELECTION_FROM_BACK_OUT 7
210 #define TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT 8
211 
215 #define CONTROLLER_PAK_MENU_SELECT_RECORD 1
216 #define CONTROLLER_PAK_MENU_END 2
217 #define CONTROLLER_PAK_MENU_ERASE 3
218 #define CONTROLLER_PAK_MENU_QUIT 4
219 #define CONTROLLER_PAK_MENU_TABLE_GAME_DATA 5
220 #define CONTROLLER_PAK_MENU_GO_TO_ERASING 6
221 #define CONTROLLER_PAK_MENU_ERASING 7
222 #define CONTROLLER_PAK_MENU_ERASE_ERROR_NOT_ERASED 8
223 #define CONTROLLER_PAK_MENU_ERASE_ERROR_NO_PAK 9
224 #define CONTROLLER_PAK_MENU_ERASE_ERROR_PAK_CHANGED 10
225 
229 #define SCREEN_MODE_1P 0
230 #define SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL 1
231 #define SCREEN_MODE_2P_SPLITSCREEN_VERTICAL 2
232 #define SCREEN_MODE_3P_4P_SPLITSCREEN 3
233 #define NUM_SCREEN_MODES 4
234 
238 #define TIME_TRIAL_3LAP_RECORD_1 0
239 #define TIME_TRIAL_3LAP_RECORD_2 1
240 #define TIME_TRIAL_3LAP_RECORD_3 2
241 #define TIME_TRIAL_3LAP_RECORD_4 3
242 #define TIME_TRIAL_3LAP_RECORD_5 4
243 #define TIME_TRIAL_1LAP_RECORD 5
244 
253 #define TEXT_BLUE 0
254 #define TEXT_GREEN 1
255 #define TEXT_RED 2
256 #define TEXT_YELLOW 3
257 #define TEXT_BLUE_GREEN_RED_CYCLE_1 4
258 #define TEXT_BLUE_GREEN_RED_CYCLE_2 5
259 
265 #define SOUND_STEREO 0
266 #define SOUND_HEADPHONES 1
267 #define SOUND_UNUSED 2
268 #define SOUND_MONO 3
269 #define NUM_SOUND_MODES 4
270 
275 #define DEMO_ONE 0 // Mario, Mario Raceway, Grand Prix
276 #define DEMO_TWO 1 // Yoshi DK, Choco Mountain, Versus
277 #define DEMO_THREE 2 // Luigi, Kalamari Desert, Grand Prix
278 #define DEMO_FOUR 3 // Wario Yoshi Bowser, Wario Stadium, Versus
279 #define DEMO_FIVE 4 // Bowser, Bowser Castle, Grand Prix
280 #define DEMO_SIX 5 // Mario Luigi Peach Toad, Sherbert Land, Versus
281 #define NUM_DEMOS 6
282 
283 #define CUP_COURSE_ONE 0
284 #define CUP_COURSE_TWO 1
285 #define CUP_COURSE_THREE 2
286 #define CUP_COURSE_FOUR 3
287 #define NUM_COURSES_PER_CUP 4
288 
292 #define ITEM_NONE 0
293 #define ITEM_BANANA 1
294 #define ITEM_BANANA_BUNCH 2
295 #define ITEM_GREEN_SHELL 3
296 #define ITEM_TRIPLE_GREEN_SHELL 4
297 #define ITEM_RED_SHELL 5
298 #define ITEM_TRIPLE_RED_SHELL 6
299 #define ITEM_BLUE_SPINY_SHELL 7
300 #define ITEM_THUNDERBOLT 8
301 #define ITEM_FAKE_ITEM_BOX 9
302 #define ITEM_STAR 10
303 #define ITEM_BOO 11
304 #define ITEM_MUSHROOM 12
305 #define ITEM_DOUBLE_MUSHROOM 13
306 #define ITEM_TRIPLE_MUSHROOM 14
307 #define ITEM_SUPER_MUSHROOM 15
308 
312 #define BALLOON_STATUS_GONE 0
313 #define BALLOON_STATUS_PRESENT 1
314 #define BALLOON_STATUS_DEPARTING 2
315 
319 #define MAX_TIME 0x927C0
320 
325 #define BOOST_EFFECT 0x200 // being boosted by trigger a mushroom or star
326 #define BOO_EFFECT 0x800 // being a boo
327 #define STAR_EFFECT 0x2000 // being a star
328 #define HIT_ROTATING_EFFECT 0x4000 // hitting a rotating object
329 #define HOLD_BANANA_EFFECT 0x40000 // holding a banana
330 #define REVERSE_EFFECT 0x400000 // being in the wrong direction
331 #define HIT_BY_ITEM_EFFECT 0x1000000 // being hit by an item
332 #define LIGHTNING_EFFECT 0x40000000 // being hit by lightning
333 
334 
339 #define SPAWN_FIRST_SHELL 0
340 #define SPAWN_SECOND_SHELL 1
341 #define SPAWN_THIRD_SHELL 2
342 
343 #define GPACK_RGB888(r, g, b) (((r) << 16) | ((g) << 8) | (b))
344 #define COLOR_LIGHT GPACK_RGB888(0x1C, 0x00, 0x00)
345 #define COLOR_LAVA GPACK_RGB888(0x34, 0x00, 0x00)
346 #define COLOR_BLACK GPACK_RGB888(0, 0, 0)
347 
348 #endif // DEFINES_H