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
7
#define OK 1
8
#define BAD 0
9
40
#if defined(GCC) || defined(DEBUG)
41
#define ENABLE_DEBUG_MODE 1
42
#else
43
#define ENABLE_DEBUG_MODE 0
44
#endif
45
46
#define HOLD_ALL_DPAD_AND_C_BUTTONS \
47
(U_JPAD | L_JPAD | R_JPAD | D_JPAD | U_CBUTTONS | L_CBUTTONS | R_CBUTTONS | D_CBUTTONS)
48
52
#define DEMO_MODE_ACTIVE 1
53
#define DEMO_MODE_INACTIVE 0
54
55
#ifdef VERSION_EU
56
#define COURSE_TIMER_ITER 0.020041665999999999
// 1 / 50
57
#define COURSE_TIMER_ITER_f 0.020041665999999999f
// 1 / 50
58
#else
59
#define COURSE_TIMER_ITER 0.01666666
// 1 / 60
60
#define COURSE_TIMER_ITER_f 0.01666666f
// 1 / 60
61
#endif
62
63
#define V_BlANK_TIMER_ITER 0.01666666
64
71
#define PLAYER_INACTIVE 0
// 0x0000
72
#define PLAYER_UNKNOWN_0x40 (1 << 6)
// 0x0040
73
#define PLAYER_INVISIBLE_OR_BOMB (1 << 8)
// 0x0100
74
#define PLAYER_STAGING (1 << 9)
// 0x0200
75
#define PLAYER_UNKNOWN (1 << 10)
// 0x0400 // unused ?
76
#define PLAYER_CINEMATIC_MODE (1 << 11)
// 0x0800 // Also used to track eliminations in Battle mode.
77
#define PLAYER_KART_AI (1 << 12)
// 0x1000
78
#define PLAYER_START_SEQUENCE (1 << 13)
// 0x2000
79
#define PLAYER_HUMAN (1 << 14)
// 0x4000
80
#define PLAYER_EXISTS (1 << 15)
// 0x8000
81
82
// Compiles to -0x1000 in diff.py
83
#define PLAYER_HUMAN_AND_KART_AI PLAYER_EXISTS | PLAYER_HUMAN | PLAYER_KART_AI | PLAYER_START_SEQUENCE
84
85
#define ZERO_PLAYERS_SELECTED 0
86
#define ONE_PLAYERS_SELECTED 1
87
#define TWO_PLAYERS_SELECTED 2
88
#define THREE_PLAYERS_SELECTED 3
89
#define FOUR_PLAYERS_SELECTED 4
90
#define SELECTED_PLAYER_DEFINES_TOTAL 5
91
92
enum
PlayerId
{
93
PLAYER_NONE
= -1,
94
PLAYER_ONE
= 0,
95
PLAYER_TWO
= 1,
96
PLAYER_THREE
= 2,
97
PLAYER_FOUR
= 3,
98
PLAYER_FIVE
= 4,
99
PLAYER_SIX
= 5,
100
PLAYER_SEVEN
= 6,
101
PLAYER_EIGHT
= 7
102
};
103
104
#define NUM_PLAYERS 8
105
106
#define MARIO_SIZE 0.75f
107
#define LUIGI_SIZE 0.75f
108
#define YOSHI_SIZE 0.75f
109
#define TOAD_SIZE 0.75f
110
#define DK_SIZE 0.75f
111
#define WARIO_SIZE 0.75f
112
#define PEACH_SIZE 0.75f
113
#define BOWSER_SIZE 0.75f
114
115
// 2P Game has Grand Prix, VS, and Battle as available game types
116
#define MAX_NUM_MAIN_MENU_GAME_TYPES 3
117
121
#define GRAND_PRIX 0
122
#define TIME_TRIALS 1
123
#define VERSUS 2
124
#define BATTLE 3
125
134
#define CC_50 0
135
#define CC_100 1
136
#define CC_150 2
137
#define CC_EXTRA 3
138
#define CC_BATTLE 4
139
146
enum
{
MUSHROOM_CUP
,
FLOWER_CUP
,
STAR_CUP
,
SPECIAL_CUP
,
BATTLE_CUP
,
NUM_CUPS
};
147
148
#define NUM_COURSES_PER_CUP 4
149
153
enum
{
COURSE_ONE
,
COURSE_TWO
,
COURSE_THREE
,
COURSE_FOUR
};
154
161
#define MARIO 0
162
#define LUIGI 1
163
#define YOSHI 2
164
#define TOAD 3
165
#define DK 4
166
#define WARIO 5
167
#define PEACH 6
168
#define BOWSER 7
169
173
#define OPTIONS_MENU 5
174
#define DATA_MENU 6
175
#define COURSE_DATA_MENU 7
176
#define LOGO_INTRO_MENU 8
177
#define CONTROLLER_PAK_MENU 9
178
#define START_MENU 10
179
#define MAIN_MENU 11
180
#define PLAYER_SELECT_MENU 12
181
#define COURSE_SELECT_MENU 13
182
#define RACING_DUPLICATE 14
183
187
#define START_MENU_FROM_QUIT 0
188
#define MAIN_MENU_FROM_QUIT 1
189
#define PLAYER_SELECT_MENU_FROM_QUIT 2
190
#define COURSE_SELECT_MENU_FROM_QUIT 3
191
#define RACING 4
192
#define ENDING 5
193
#define CREDITS_SEQUENCE 9
194
198
#define SCREEN_MODE_1P 0
199
#define SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL 1
200
#define SCREEN_MODE_2P_SPLITSCREEN_VERTICAL 2
201
#define SCREEN_MODE_3P_4P_SPLITSCREEN 3
202
#define NUM_SCREEN_MODES 4
203
207
#define TIME_TRIAL_3LAP_RECORD_1 0
208
#define TIME_TRIAL_3LAP_RECORD_2 1
209
#define TIME_TRIAL_3LAP_RECORD_3 2
210
#define TIME_TRIAL_3LAP_RECORD_4 3
211
#define TIME_TRIAL_3LAP_RECORD_5 4
212
#define TIME_TRIAL_1LAP_RECORD 5
213
222
#define TEXT_BLUE 0
223
#define TEXT_GREEN 1
224
#define TEXT_RED 2
225
#define TEXT_YELLOW 3
226
#define TEXT_BLUE_GREEN_RED_CYCLE_1 4
227
#define TEXT_BLUE_GREEN_RED_CYCLE_2 5
228
234
#define SOUND_STEREO 0
235
#define SOUND_HEADPHONES 1
236
#define SOUND_UNUSED 2
237
#define SOUND_MONO 3
238
#define NUM_SOUND_MODES 4
239
244
#define DEMO_ONE 0
// Mario, Mario Raceway, Grand Prix
245
#define DEMO_TWO 1
// Yoshi DK, Choco Mountain, Versus
246
#define DEMO_THREE 2
// Luigi, Kalamari Desert, Grand Prix
247
#define DEMO_FOUR 3
// Wario Yoshi Bowser, Wario Stadium, Versus
248
#define DEMO_FIVE 4
// Bowser, Bowser Castle, Grand Prix
249
#define DEMO_SIX 5
// Mario Luigi Peach Toad, Sherbert Land, Versus
250
#define NUM_DEMOS 6
251
255
enum
ITEMS
{
256
/* 0x00 */
ITEM_NONE
= 0,
257
/* 0x01 */
ITEM_BANANA
,
258
/* 0x02 */
ITEM_BANANA_BUNCH
,
259
/* 0x03 */
ITEM_GREEN_SHELL
,
260
/* 0x04 */
ITEM_TRIPLE_GREEN_SHELL
,
261
/* 0x05 */
ITEM_RED_SHELL
,
262
/* 0x06 */
ITEM_TRIPLE_RED_SHELL
,
263
/* 0x07 */
ITEM_BLUE_SPINY_SHELL
,
264
/* 0x08 */
ITEM_THUNDERBOLT
,
265
/* 0x09 */
ITEM_FAKE_ITEM_BOX
,
266
/* 0x0A */
ITEM_STAR
,
267
/* 0x0B */
ITEM_BOO
,
268
/* 0x0C */
ITEM_MUSHROOM
,
269
/* 0x0D */
ITEM_DOUBLE_MUSHROOM
,
270
/* 0x0E */
ITEM_TRIPLE_MUSHROOM
,
271
/* 0x0F */
ITEM_SUPER_MUSHROOM
272
};
273
274
enum
KART_AI_BEHAVIOURS
{
275
BEHAVIOUR_NONE
= 0,
276
BEHAVIOUR_1
,
277
BEHAVIOUR_HOP
,
278
BEHAVIOUR_3
,
279
BEHAVIOUR_4
,
280
BEHAVIOUR_5
,
281
BEHAVIOUR_NORMAL_SPEED
,
282
BEHAVIOUR_FAST_SPEED
,
283
BEHAVIOUR_SLOW_SPEED
,
284
BEHAVIOUR_9
,
285
BEHAVIOUR_10
,
286
BEHAVIOUR_MAX_SPEED
287
};
288
289
enum
DIRECTION
{
NORTH
,
EAST
,
SOUTH
,
WEST
};
290
294
#define BALLOON_STATUS_GONE 0
295
#define BALLOON_STATUS_PRESENT 1
296
#define BALLOON_STATUS_DEPARTING 2
297
301
#define MAX_TIME 0x927C0
302
307
#define HIT_SOUND_EFFECT 0x100
// hitting an object
308
#define BOOST_SOUND_EFFECT 0x200
// being boosted by trigger a mushroom
309
#define BOO_SOUND_EFFECT 0x800
// being a boo
310
#define STAR_SOUND_EFFECT 0x2000
// being a star
311
#define HIT_ROTATING_SOUND_EFFECT 0x4000
// hitting a rotating object
312
#define BOOST_RAMP_WOOD_SOUND_EFFECT 0x8000
// being boosted by a ramp
313
#define HOLD_BANANA_SOUND_EFFECT 0x40000
// holding a banana
314
#define REVERSE_SOUND_EFFECT 0x400000
// being in the wrong direction
315
#define BOOST_RAMP_ASPHALT_SOUND_EFFECT 0x800000
// being boosted by a boost pad
316
#define HIT_BY_ITEM_SOUND_EFFECT 0x1000000
// being hit by an item
317
322
#define BOOST_RAMP_WOOD_EFFECT 0x4
// being boosted by a ramp
323
#define STAR_EFFECT 0x200
// being a star
324
#define BOOST_EFFECT 0x2000
// being boosted by trigger a mushroom
325
#define BOOST_RAMP_ASPHALT_EFFECT 0x100000
// being boosted by a boost pad
326
#define HIT_BY_ITEM_EFFECT 0x2000000
// being hit by an item
327
#define HIT_EFFECT 0x4000000
// hitting an object
328
#define LIGHTNING_EFFECT 0x40000000
// being hit by lightning
329
#define BOO_EFFECT 0x80000000
// being a boo
330
335
#define SPAWN_FIRST_SHELL 0
336
#define SPAWN_SECOND_SHELL 1
337
#define SPAWN_THIRD_SHELL 2
338
339
#define GPACK_RGB888(r, g, b) (((r) << 16) | ((g) << 8) | (b))
340
#define COLOR_LIGHT GPACK_RGB888(0x1C, 0x00, 0x00)
341
#define COLOR_LAVA GPACK_RGB888(0x34, 0x00, 0x00)
342
#define COLOR_BLACK GPACK_RGB888(0, 0, 0)
343
344
#endif
// DEFINES_H
345
352
#define GRID_SIZE 32
353
354
#define FACING_Y_AXIS 0x4000
355
#define FACING_X_AXIS 0x8000
356
#define FACING_Z_AXIS 0x2000
COURSE_ONE
@ COURSE_ONE
Definition
defines.h:153
COURSE_THREE
@ COURSE_THREE
Definition
defines.h:153
COURSE_TWO
@ COURSE_TWO
Definition
defines.h:153
COURSE_FOUR
@ COURSE_FOUR
Definition
defines.h:153
KART_AI_BEHAVIOURS
KART_AI_BEHAVIOURS
Definition
defines.h:274
BEHAVIOUR_FAST_SPEED
@ BEHAVIOUR_FAST_SPEED
Definition
defines.h:282
BEHAVIOUR_NORMAL_SPEED
@ BEHAVIOUR_NORMAL_SPEED
Definition
defines.h:281
BEHAVIOUR_SLOW_SPEED
@ BEHAVIOUR_SLOW_SPEED
Definition
defines.h:283
BEHAVIOUR_MAX_SPEED
@ BEHAVIOUR_MAX_SPEED
Definition
defines.h:286
BEHAVIOUR_4
@ BEHAVIOUR_4
Definition
defines.h:279
BEHAVIOUR_HOP
@ BEHAVIOUR_HOP
Definition
defines.h:277
BEHAVIOUR_9
@ BEHAVIOUR_9
Definition
defines.h:284
BEHAVIOUR_5
@ BEHAVIOUR_5
Definition
defines.h:280
BEHAVIOUR_3
@ BEHAVIOUR_3
Definition
defines.h:278
BEHAVIOUR_NONE
@ BEHAVIOUR_NONE
Definition
defines.h:275
BEHAVIOUR_1
@ BEHAVIOUR_1
Definition
defines.h:276
BEHAVIOUR_10
@ BEHAVIOUR_10
Definition
defines.h:285
PlayerId
PlayerId
Definition
defines.h:92
PLAYER_SIX
@ PLAYER_SIX
Definition
defines.h:99
PLAYER_FIVE
@ PLAYER_FIVE
Definition
defines.h:98
PLAYER_SEVEN
@ PLAYER_SEVEN
Definition
defines.h:100
PLAYER_FOUR
@ PLAYER_FOUR
Definition
defines.h:97
PLAYER_EIGHT
@ PLAYER_EIGHT
Definition
defines.h:101
PLAYER_NONE
@ PLAYER_NONE
Definition
defines.h:93
PLAYER_TWO
@ PLAYER_TWO
Definition
defines.h:95
PLAYER_ONE
@ PLAYER_ONE
Definition
defines.h:94
PLAYER_THREE
@ PLAYER_THREE
Definition
defines.h:96
ITEMS
ITEMS
Item IDs.
Definition
defines.h:255
ITEM_TRIPLE_MUSHROOM
@ ITEM_TRIPLE_MUSHROOM
Definition
defines.h:270
ITEM_THUNDERBOLT
@ ITEM_THUNDERBOLT
Definition
defines.h:264
ITEM_TRIPLE_GREEN_SHELL
@ ITEM_TRIPLE_GREEN_SHELL
Definition
defines.h:260
ITEM_STAR
@ ITEM_STAR
Definition
defines.h:266
ITEM_BLUE_SPINY_SHELL
@ ITEM_BLUE_SPINY_SHELL
Definition
defines.h:263
ITEM_BANANA_BUNCH
@ ITEM_BANANA_BUNCH
Definition
defines.h:258
ITEM_GREEN_SHELL
@ ITEM_GREEN_SHELL
Definition
defines.h:259
ITEM_FAKE_ITEM_BOX
@ ITEM_FAKE_ITEM_BOX
Definition
defines.h:265
ITEM_NONE
@ ITEM_NONE
Definition
defines.h:256
ITEM_RED_SHELL
@ ITEM_RED_SHELL
Definition
defines.h:261
ITEM_SUPER_MUSHROOM
@ ITEM_SUPER_MUSHROOM
Definition
defines.h:271
ITEM_BANANA
@ ITEM_BANANA
Definition
defines.h:257
ITEM_MUSHROOM
@ ITEM_MUSHROOM
Definition
defines.h:268
ITEM_DOUBLE_MUSHROOM
@ ITEM_DOUBLE_MUSHROOM
Definition
defines.h:269
ITEM_BOO
@ ITEM_BOO
Definition
defines.h:267
ITEM_TRIPLE_RED_SHELL
@ ITEM_TRIPLE_RED_SHELL
Definition
defines.h:262
NUM_CUPS
@ NUM_CUPS
Definition
defines.h:146
STAR_CUP
@ STAR_CUP
Definition
defines.h:146
FLOWER_CUP
@ FLOWER_CUP
Definition
defines.h:146
SPECIAL_CUP
@ SPECIAL_CUP
Definition
defines.h:146
MUSHROOM_CUP
@ MUSHROOM_CUP
Definition
defines.h:146
BATTLE_CUP
@ BATTLE_CUP
Definition
defines.h:146
DIRECTION
DIRECTION
Definition
defines.h:289
SOUTH
@ SOUTH
Definition
defines.h:289
EAST
@ EAST
Definition
defines.h:289
NORTH
@ NORTH
Definition
defines.h:289
WEST
@ WEST
Definition
defines.h:289
include
defines.h
Generated by
1.11.0