Mario Kart 64
Loading...
Searching...
No Matches
objects.h
Go to the documentation of this file.
1#ifndef OBJECTS_H
2#define OBJECTS_H
3
4#include "spline.h"
5#include "common_structs.h"
6
7#define OBJECT_LIST_SIZE 0x226
8#define SOME_OBJECT_INDEX_LIST_SIZE 32
9
10typedef struct
11{
12 /* 0x00 */ f32 sizeScaling;
13 /* 0x04 */ Vec3f pos;
14 /* 0x10 */ Vec3f origin_pos;
15 /* 0x1C */ Vec3f unk_01C;
16 /* 0x28 */ Vec3f unk_028;
17 /* 0x34 */ f32 unk_034;
18 /* 0x38 */ Vec3f velocity;
19 /* 0x44 */ f32 unk_044;
20 /* 0x48 */ s32 unk_048;
21 /* 0x4C */ s32 unk_04C;
22 /* 0x50 */ s32 unk_050;
23 /* 0x54 */ s32 unk_054;
24 /* 0x58 */ s32 unk_058;
25 /* 0x5C */ s32 unk_05C;
26 /* 0x60 */ u8 *activeTLUT;
27 /* 0x64 */ u8 *activeTexture;
33 /* 0x68 */ u8 *tlutList; // I feel like this should actually be `u8 (*tlutList)[512]`, but that causes mismatches
34 /* 0x6C */ u8 *textureList;
35 /* 0x70 */ Gfx *model;
36 /* 0x74 */ Vtx *vertex;
37 /* 0x78 */ s8 unk_078[0x04];
39 /* 0x80 */ SplineData *spline;
40 /* 0x84 */ s16 unk_084[0xA];
41 /* 0x98 */ u16 timer;
42 /* 0x9A */ u16 unk_09A;
43 /* 0x9C */ s16 unk_09C;
44 /* 0x9E */ s16 unk_09E;
45 /* 0xA0 */ s16 unk_0A0;
46 /* 0xA2 */ s16 unk_0A2;
47 /* 0xA4 */ s16 type;
48 /* 0xA6 */ s16 state;
49 /* 0xA8 */ s16 unk_0A8;
50 /* 0xAA */ s16 unk_0AA;
51 /* 0xAC */ s16 unk_0AC;
52 /* 0xAE */ s16 unk_0AE;
53 /* 0xB0 */ s16 unk_0B0;
54 /* 0xB2 */ Vec3su orientation; // rotation, I think
55 /* 0xB8 */ Vec3su unk_0B8;
57 /* 0xC4 */ u16 unk_0C4;
58 /* 0xC6 */ u16 unk_0C6;
59 /* 0xC8 */ u16 boundingBoxSize;
60 /* 0xCA */ s8 unk_0CA;
61 /* 0xCB */ s8 unk_0CB;
62 /* 0xCC */ s8 unk_0CC;
63 /* 0xCD */ s8 unk_0CD;
64 /* 0xCE */ s8 unk_0CE;
65 /* 0xCF */ s8 unk_0CF;
66 /* 0xD0 */ s8 unk_0D0;
67 /* 0xD1 */ s8 unk_0D1;
68 /* 0xD2 */ s8 itemDisplay;
69 /* 0xD3 */ s8 unk_0D3;
70 /* 0xD4 */ s8 unk_0D4;
71 /* 0xD5 */ u8 unk_0D5;
72 /* 0xD6 */ u8 unk_0D6;
73 /* 0xD7 */ u8 unk_0D7;
74 /* 0xD8 */ u8 unk_0D8;
75 /* 0xD9 */ u8 textureWidth;
76 /* 0xDA */ u8 textureHeight;
77 /* 0xDB */ u8 unk_0DB;
78 /* 0xDC */ u8 unk_0DC;
79 /* 0xDD */ u8 unk_0DD;
80 /* 0xDE */ s8 unk_0DE;
81 /* 0xDF */ u8 unk_0DF;
82} Objects; // size = 0xE0
83
84extern Objects gObjectList[];
85
86typedef struct
87{
88 /* 0x00 */ f32 sizeScaling;
89 /* 0x04 */ Vec3f pos;
90 /* 0x10 */ Vec3f origin_pos;
91 /* 0x1C */ Vec3f unk_01C;
92 /* 0x28 */ Vec3f unk_028;
93 /* 0x34 */ f32 unk_034;
94 /* 0x38 */ Vec3f velocity;
95 /* 0x44 */ f32 unk_044;
96 /* 0x48 */ s32 unk_048;
97 /* 0x4C */ s32 unk_04C;
98 /* 0x50 */ s32 unk_050;
99 /* 0x54 */ s32 unk_054;
100 /* 0x58 */ s32 unk_058;
101 /* 0x5C */ s32 unk_05C;
102 /* 0x60 */ u8 *activeTLUT;
103 /* 0x64 */ u8 *activeTexture;
109 /* 0x68 */ u8 *tlutList; // I feel like this should actually be `u8 (*tlutList)[512]`, but that causes mismatches
110 /* 0x6C */ u8 *textureList;
111 /* 0x70 */ Gfx *model;
112 /* 0x74 */ Vtx *vertex;
113 /* 0x78 */ s8 unk_078[0x04];
114 /* 0x7C */ Vec4s *unk_07C;
115 /* 0x80 */ Vec4s *unk_080; // unk_080[][4]?
116 /* 0x84 */ s16 unk_084[0xA];
118 /* 0x9A */ u16 unk_09A;
119 /* 0x9C */ s16 unk_09C;
120 /* 0x9E */ s16 unk_09E;
121 /* 0xA0 */ s16 unk_0A0;
122 /* 0xA2 */ s16 unk_0A2;
123 /* 0xA4 */ s16 currentItem;
124 /* 0xA6 */ s16 itemDisplayState; // Usually a state tracker
125 /* 0xA8 */ s16 unk_0A8;
126 /* 0xAA */ s16 unk_0AA;
127 /* 0xAC */ s16 unk_0AC;
128 /* 0xAE */ s16 unk_0AE;
129 /* 0xB0 */ s16 unk_0B0;
130 /* 0xB2 */ Vec3su orientation; // rotation, I think
131 /* 0xB8 */ Vec3su unk_0B8;
133 /* 0xC4 */ u16 unk_0C4;
134 /* 0xC6 */ u16 unk_0C6;
135 /* 0xC8 */ u16 unk_0C8;
136 /* 0xCA */ s8 unk_0CA;
137 /* 0xCB */ s8 unk_0CB;
138 /* 0xCC */ s8 unk_0CC;
139 /* 0xCD */ s8 unk_0CD;
140 /* 0xCE */ s8 unk_0CE;
141 /* 0xCF */ s8 unk_0CF;
142 /* 0xD0 */ s8 unk_0D0;
143 /* 0xD1 */ s8 unk_0D1;
144 /* 0xD2 */ s8 itemDisplay;
145 /* 0xD3 */ s8 unk_0D3;
146 /* 0xD4 */ s8 unk_0D4;
147 /* 0xD5 */ u8 unk_0D5;
148 /* 0xD6 */ u8 unk_0D6;
149 /* 0xD7 */ u8 unk_0D7;
150 /* 0xD8 */ u8 unk_0D8;
151 /* 0xD9 */ u8 textureWidth;
152 /* 0xDA */ u8 textureHeight;
153 /* 0xDB */ u8 unk_0DB;
154 /* 0xDC */ u8 unk_0DC;
155 /* 0xDD */ u8 unk_0DD;
156 /* 0xDE */ s8 unk_0DE;
157 /* 0xDF */ u8 unk_0DF;
158} ItemWindowObjects; // size = 0xE0
159
160// This are other lists of indices in gObjectList.
161
166extern s32 D_80183DA0;
167
169extern s32 gIndexLakituList[];
170
171#define DELETED_OBJECT_ID -1
172#define NULL_OBJECT_ID -1
173
176
177// Used for loop bounds when accessing indexObjectList1
178extern s16 D_80165750;
179
185extern s32 D_8018D1C8;
186extern s32 D_8018D1D0;
187extern s32 D_8018D1D8;
188
190extern s32 D_8018D3C0;
191
192extern Collision D_8018C0B0[];
193
202#define NUM_YV_FLAG_POLES 4
203
204typedef struct {
205 /* 0x0 */ Vec3s pos;
206 /* 0x6 */ u16 rot;
207} YVFlagPoleSpawn; // size = 0x8;
208
210
211#define NUM_CRABS 0xA
212
213typedef struct {
214 /* 0x0 */ s16 startX;
215 /* 0x2 */ s16 patrolX;
216 /* 0x4 */ s16 startZ;
217 /* 0x6 */ s16 patrolZ;
218} CrabSpawn;
219
220extern CrabSpawn gCrabSpawns[];
221
222#define NUM_THWOMPS_50CC 8
223#define NUM_THWOMPS_100CC_EXTRA 11
224#define NUM_THWOMPS_150CC 12
225
226extern Vec3f D_800E6734[];
227
228typedef struct {
229 /* 0x0 */ s16 startX;
230 /* 0x2 */ s16 startZ;
231 /* 0x4 */ s16 unk_4; // Group Id?
232 /* 0x6 */ s16 unk_6; // Starting State?
233} ThwompSpawn; // size = 0x8;
234
239
241
242#define NUM_NEON_SIGNS 10
243#define NUM_CHAIN_CHOMPS 3
244
245#define NUM_PENGUINS 15
246
256extern s32 indexObjectList1[];
257
258#define NUM_SEAGULLS 10
259#define NUM_SNOWMEN 19
260#define NUM_HEDGEHOGS 15
261
262typedef struct {
263 /* 0x0 */ Vec3s pos;
264 /* 0x6 */ s16 unk_6; // Group Id?
265} SnowmanSpawn; // size = 0x8;
266
268
269typedef struct {
270 /* 0x0 */ Vec3s pos;
271 /* 0x6 */ s16 unk_06; // Group Id?
272} HegdehogSpawn; // size = 0x8;
273
276
285extern s32 indexObjectList2[];
286
287// This struct is used by a lot of different objects
288// Stars, clouds, exahust smoke (I think?)
289typedef struct {
292} StarSpawn;
293
294#define NUM_BOOS 0xA
295#define NUM_FIRE_BREATHS 4
296
298
299// These should really, really be Vec3s arrays, but that doesn't match
300extern s16 D_800E5740[];
301extern s16 D_800E579C[];
302extern s16 D_800E57F8[];
303
308extern s32 indexObjectList3[];
309
313extern s32 indexObjectList4[];
314
315#define gObjectParticle1_SIZE 128
316#define NUM_MAX_MOLES 0x1F
317#define NUM_GROUP1_MOLES 8
318#define NUM_GROUP2_MOLES 11
319#define NUM_GROUP3_MOLES 12
320#define NUM_SNOWFLAKES 0x32
321
322extern Vec3s gMoleSpawns[];
323
328extern s8 D_8018D198[];
329extern s8 D_8018D1A8[];
330extern s8 D_8018D1B8[];
331
333extern s32 D_8018CF10;
334
342extern s32 gObjectParticle1[];
343
346
348extern s16 D_8018D174;
349
350#define gObjectParticle2_SIZE 128
351
356extern s32 gObjectParticle2[];
357
360
362extern s32 D_8018D3BC;
363
364#define gObjectParticle3_SIZE 128
365extern s32 gObjectParticle3[];
368extern s16 D_80165730;
369
371extern s16 D_80165738;
372
373#define gObjectParticle4_SIZE 0x40
374
375#define NUM_TORCHES 8
376
377// This should really be `extern Vec3s gTorchSpawns[];`
379extern s16 gTorchSpawns[];
380
386extern s32 gObjectParticle4[];
387
390
391// Maximum number of leaves that can be falling?
392#define gLeafParticle_SIZE 0x40
393// Number of leaves to spawn each bonk?
394#define gLeafParticle_SPAWN_SIZE 0x14
395
400extern s32 gLeafParticle[];
401
404
405#define D_8018CC80_SIZE 0x64
406
411extern s32 D_8018CC80[];
412
414extern s32 D_8018D1F0;
415
417extern s32 D_8018D1F8;
418
420extern s16 D_8018D17C;
421
423extern s8 D_8018D230;
424
426extern s32 D_8018D3C4;
427
428#endif
s16 Vec4s[4]
Definition common_structs.h:10
f32 Vec3f[3]
Definition common_structs.h:6
u16 Vec3su[3]
Definition common_structs.h:9
s16 Vec3s[3]
Definition common_structs.h:8
ThwompSpawn gThomwpSpawns150CC[]
Definition some_data.c:329
s16 D_800E579C[]
Definition some_data.c:283
s32 D_8018D3C4
Some sort of limiter on how many of some object type can spawn.
Definition code_80057C60_var.c:149
s32 D_8018D1C8
Definition code_80057C60_var.c:74
s32 gObjectParticle2[]
Definition code_80057C60.c:315
s32 gItemWindowObjectByPlayerId[]
Appears to be a list of object list indices for the Item Window part of the HUD.
Definition code_80057C60.c:259
s32 indexObjectList3[]
Definition code_80057C60.c:293
s16 D_80165750
s32 D_8018D1D8
Definition code_80057C60_var.c:78
s8 D_8018D1B8[]
Definition code_80057C60_var.c:67
s32 gLeafParticle[]
Definition code_80057C60.c:330
s16 gNumActiveThwomps
Definition code_80057C60.c:111
s32 D_8018CC80[]
Definition code_80057C60.c:336
s32 gObjectParticle1[]
Definition code_80057C60.c:309
s16 D_8018D174
Used for cycling through snowflakes in func_80078790.
Definition code_80057C60_var.c:50
s32 gNextFreeObjectParticle4
Next free spot in gObjectParticle4? Wraps back around to 0 if it gets bigger than gObjectParticle4_SI...
Definition code_80057C60.c:253
s32 indexObjectList2[]
Definition code_80057C60.c:280
s32 gIndexLakituList[]
Lakitu?
Definition code_80057C60.c:238
Collision D_8018C0B0[]
Array of (4) Collisions?
Definition code_80057C60.c:301
s8 D_8018D198[]
Definition code_80057C60_var.c:63
s32 indexObjectList1[]
Definition code_80057C60.c:270
s16 D_8018D17C
Also next free spot in D_8018CC80?
Definition code_80057C60_var.c:53
s32 gNextFreeLeafParticle
Next free spot in gLeafParticle? Wraps back around to 0 if it gets bigger than gLeafParticle_SIZE.
Definition code_80057C60.c:256
s32 gObjectParticle4[]
Definition code_80057C60.c:325
s16 D_800E5740[]
Definition some_data.c:273
Objects gObjectList[]
Definition code_80057C60.c:227
s32 gNextFreeObjectParticle2
Next free spot in gObjectParticle2? Wraps back around to 0 if it gets bigger than gObjectParticle2_SI...
Definition code_80057C60.c:247
ThwompSpawn * gThowmpSpawnList
Definition code_80057C60.c:113
s32 gNextFreeObjectParticle3
Next free spot in gObjectParticle3?
Definition code_80057C60.c:250
s32 D_80183DA0
Definition code_80057C60.c:235
s32 gObjectParticle3[]
Definition code_80057C60.c:318
s32 D_8018D3BC
Controls number of come object type placed into gObjectParticle2 on Frappe Snowland....
Definition code_80057C60_var.c:145
CrabSpawn gCrabSpawns[]
Definition some_data.c:611
s8 D_8018D1A8[]
Definition code_80057C60_var.c:65
Vec3s gMoleSpawns[]
Definition some_data.c:769
YVFlagPoleSpawn D_800E5DF4[]
Definition some_data.c:546
s32 D_8018CF10
Unknown object index, only set for Kalimari Desert, never read.
Definition code_80057C60.c:339
Vec3s gHedgehogPatrolPoints[]
Definition some_data.c:571
s32 D_8018D1F8
Next free spot in D_8018CC80?
Definition code_80057C60_var.c:88
ThwompSpawn gThomwpSpawns50CC[]
Definition some_data.c:302
s16 D_80165730
Definition code_80057C60.c:101
s16 D_800E57F8[]
Definition some_data.c:293
Vec3s gFireBreathsSpawns[]
Definition some_data.c:265
ThwompSpawn gThwompSpawns100CCExtra[]
Definition some_data.c:314
SnowmanSpawn gSnowmanSpawns[]
Definition some_data.c:589
s32 gNextFreeObjectParticle1
Next free spot in gObjectParticle1? Wraps back around to 0 if it gets bigger than gObjectParticle1_SI...
Definition code_80057C60.c:244
s32 D_8018D1F0
Number of used spots in D_8018CC80?
Definition code_80057C60_var.c:85
HegdehogSpawn gHedgehogSpawns[]
Definition some_data.c:553
s32 D_8018D3C0
Limit on some object type (ice chips?) in Sherbet Land.
Definition code_80057C60_var.c:147
Vec3f D_800E6734[]
Definition some_data.c:934
s16 D_80165738
Tracking a count of some object type, don't know what object type yet.
Definition code_80057C60.c:104
s16 gTorchSpawns[]
Definition some_data.c:945
s8 D_8018D230
Something related to the display of the clouds/stars?
Definition code_80057C60_var.c:107
s32 D_8018D1D0
Definition code_80057C60_var.c:76
s32 indexObjectList4[]
Definition code_80057C60.c:299
Definition common_structs.h:114
Definition objects.h:213
s16 startX
Definition objects.h:214
s16 patrolZ
Definition objects.h:217
s16 startZ
Definition objects.h:216
s16 patrolX
Definition objects.h:215
Definition objects.h:269
s16 unk_06
Definition objects.h:271
Vec3s pos
Definition objects.h:270
Definition objects.h:87
u8 unk_0DB
Definition objects.h:153
s16 itemDisplayState
Definition objects.h:124
u16 unk_0C8
Definition objects.h:135
s16 unk_0AA
Definition objects.h:126
u8 * textureList
Definition objects.h:110
s8 unk_0D1
Definition objects.h:143
s8 unk_0D0
Definition objects.h:142
f32 sizeScaling
Definition objects.h:88
s32 unk_04C
Definition objects.h:97
s16 unk_0AC
Definition objects.h:127
u8 unk_0DF
Definition objects.h:157
u8 unk_0D7
Definition objects.h:149
s16 unk_0A0
Definition objects.h:121
s8 unk_0CF
Definition objects.h:141
Gfx * model
Definition objects.h:111
s8 unk_0CD
Definition objects.h:139
s8 unk_0CB
Definition objects.h:137
s8 unk_0CE
Definition objects.h:140
Vec4s * unk_07C
Definition objects.h:114
u8 unk_0D8
Definition objects.h:150
s8 unk_0DE
Definition objects.h:156
s32 unk_05C
Definition objects.h:101
u8 unk_0D6
Definition objects.h:148
s16 currentItem
Definition objects.h:123
s8 unk_0D3
Definition objects.h:145
Vec4s * unk_080
Definition objects.h:115
s16 unk_0B0
Definition objects.h:129
s16 unk_09E
Definition objects.h:120
Vtx * vertex
Definition objects.h:112
s32 unk_058
Definition objects.h:100
s16 unk_0AE
Definition objects.h:128
Vec3su direction_angle
Definition objects.h:132
u16 unk_0C6
Definition objects.h:134
f32 unk_044
Definition objects.h:95
s16 unk_09C
Definition objects.h:119
s8 unk_0CC
Definition objects.h:138
Vec3f origin_pos
Definition objects.h:90
Vec3f velocity
Definition objects.h:94
Vec3f unk_01C
Definition objects.h:91
s32 unk_048
Definition objects.h:96
s8 itemDisplay
Definition objects.h:144
Vec3f unk_028
Definition objects.h:92
s8 unk_0CA
Definition objects.h:136
s32 unk_050
Definition objects.h:98
u8 * tlutList
Definition objects.h:109
u8 unk_0D5
Definition objects.h:147
u8 unk_0DD
Definition objects.h:155
u8 unk_0DC
Definition objects.h:154
Vec3su orientation
Definition objects.h:130
s16 unk_0A2
Definition objects.h:122
u8 * activeTexture
Definition objects.h:103
s8 unk_0D4
Definition objects.h:146
Vec3f pos
Definition objects.h:89
u8 textureHeight
Definition objects.h:152
u8 textureWidth
Definition objects.h:151
u16 unk_09A
Definition objects.h:118
u16 unk_0C4
Definition objects.h:133
u8 * activeTLUT
Definition objects.h:102
s16 unk_0A8
Definition objects.h:125
u16 goldenMushroomTimer
Definition objects.h:117
s32 unk_054
Definition objects.h:99
Vec3su unk_0B8
Definition objects.h:131
f32 unk_034
Definition objects.h:93
Definition objects.h:11
s8 unk_0CD
Definition objects.h:63
u8 unk_0D8
Definition objects.h:74
SplineControlPoint * controlPoints
Definition objects.h:38
Gfx * model
Definition objects.h:35
s8 unk_0D1
Definition objects.h:67
f32 sizeScaling
Definition objects.h:12
s16 unk_0A0
Definition objects.h:45
u8 unk_0DC
Definition objects.h:78
u8 * textureList
Definition objects.h:34
u8 unk_0D7
Definition objects.h:73
u8 unk_0DD
Definition objects.h:79
f32 unk_034
Definition objects.h:17
Vec3f pos
Definition objects.h:13
s32 unk_04C
Definition objects.h:21
s8 unk_0CF
Definition objects.h:65
s8 itemDisplay
Definition objects.h:68
s8 unk_0DE
Definition objects.h:80
s16 unk_0A2
Definition objects.h:46
Vec3f velocity
Definition objects.h:18
u16 boundingBoxSize
Definition objects.h:59
u16 unk_0C6
Definition objects.h:58
Vec3f unk_01C
Definition objects.h:15
u8 textureHeight
Definition objects.h:76
Vec3su unk_0B8
Definition objects.h:55
s16 state
Definition objects.h:48
s16 unk_0AE
Definition objects.h:52
s32 unk_058
Definition objects.h:24
u8 * activeTexture
Definition objects.h:27
f32 unk_044
Definition objects.h:19
u8 unk_0D5
Definition objects.h:71
s32 unk_050
Definition objects.h:22
u8 * tlutList
Definition objects.h:33
s32 unk_054
Definition objects.h:23
s8 unk_0D0
Definition objects.h:66
s16 unk_0AA
Definition objects.h:50
u8 unk_0DF
Definition objects.h:81
s8 unk_0CC
Definition objects.h:62
s16 unk_0AC
Definition objects.h:51
s8 unk_0CA
Definition objects.h:60
s16 type
Definition objects.h:47
s32 unk_048
Definition objects.h:20
Vtx * vertex
Definition objects.h:36
Vec3f origin_pos
Definition objects.h:14
Vec3su orientation
Definition objects.h:54
u8 unk_0DB
Definition objects.h:77
s16 unk_09C
Definition objects.h:43
s8 unk_0CE
Definition objects.h:64
u8 textureWidth
Definition objects.h:75
s8 unk_0D3
Definition objects.h:69
s16 unk_09E
Definition objects.h:44
u16 unk_0C4
Definition objects.h:57
s8 unk_0CB
Definition objects.h:61
u8 * activeTLUT
Definition objects.h:26
u16 unk_09A
Definition objects.h:42
s16 unk_0B0
Definition objects.h:53
s16 unk_0A8
Definition objects.h:49
SplineData * spline
Definition objects.h:39
u8 unk_0D6
Definition objects.h:72
Vec3su direction_angle
Definition objects.h:56
s8 unk_0D4
Definition objects.h:70
u16 timer
Definition objects.h:41
s32 unk_05C
Definition objects.h:25
Vec3f unk_028
Definition objects.h:16
Definition objects.h:262
s16 unk_6
Definition objects.h:264
Vec3s pos
Definition objects.h:263
Definition spline.h:21
Definition spline.h:31
Definition objects.h:289
Vec3su pos
Definition objects.h:290
u16 id
Definition objects.h:291
Definition objects.h:228
s16 startX
Definition objects.h:229
s16 unk_4
Definition objects.h:231
s16 startZ
Definition objects.h:230
s16 unk_6
Definition objects.h:232
Definition objects.h:204
Vec3s pos
Definition objects.h:205
u16 rot
Definition objects.h:206
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:33
unsigned short int u16
Definition ultratypes.h:14
unsigned char u8
Definition ultratypes.h:12