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 "common_structs.h"
5
6#define OBJECT_LIST_SIZE 0x226
7#define SOME_OBJECT_INDEX_LIST_SIZE 32
8
9typedef struct
10{
11 /* 0x00 */ f32 sizeScaling;
12 /* 0x04 */ Vec3f pos;
13 /* 0x10 */ Vec3f origin_pos;
14 /* 0x1C */ Vec3f unk_01C;
15 /* 0x28 */ Vec3f unk_028;
16 /* 0x34 */ f32 unk_034;
17 /* 0x38 */ Vec3f velocity;
18 /* 0x44 */ f32 unk_044;
19 /* 0x48 */ s32 unk_048;
20 /* 0x4C */ s32 unk_04C;
21 /* 0x50 */ s32 unk_050;
22 /* 0x54 */ s32 unk_054;
23 /* 0x58 */ s32 unk_058;
24 /* 0x5C */ s32 unk_05C;
25 /* 0x60 */ u8 *activeTLUT;
26 /* 0x64 */ u8 *activeTexture;
32 /* 0x68 */ u8 *tlutList; // I feel like this should actually be `u8 (*tlutList)[512]`, but that causes mismatches
33 /* 0x6C */ u8 *textureList;
34 /* 0x70 */ Gfx *model;
35 /* 0x74 */ Vtx *vertex;
36 /* 0x78 */ s8 unk_078[0x04];
37 /* 0x7C */ Vec4s *unk_07C;
38 /* 0x80 */ Vec4s *unk_080; // unk_080[][4]?
39 /* 0x84 */ s16 unk_084[0xA];
40 /* 0x98 */ u16 timer;
41 /* 0x9A */ u16 unk_09A;
42 /* 0x9C */ s16 unk_09C;
43 /* 0x9E */ s16 unk_09E;
44 /* 0xA0 */ s16 unk_0A0;
45 /* 0xA2 */ s16 unk_0A2;
46 /* 0xA4 */ s16 type;
47 /* 0xA6 */ s16 state;
48 /* 0xA8 */ s16 unk_0A8;
49 /* 0xAA */ s16 unk_0AA;
50 /* 0xAC */ s16 unk_0AC;
51 /* 0xAE */ s16 unk_0AE;
52 /* 0xB0 */ s16 unk_0B0;
53 /* 0xB2 */ Vec3su orientation; // rotation, I think
54 /* 0xB8 */ Vec3su unk_0B8;
56 /* 0xC4 */ u16 unk_0C4;
57 /* 0xC6 */ u16 unk_0C6;
58 /* 0xC8 */ u16 boundingBoxSize;
59 /* 0xCA */ s8 unk_0CA;
60 /* 0xCB */ s8 unk_0CB;
61 /* 0xCC */ s8 unk_0CC;
62 /* 0xCD */ s8 unk_0CD;
63 /* 0xCE */ s8 unk_0CE;
64 /* 0xCF */ s8 unk_0CF;
65 /* 0xD0 */ s8 unk_0D0;
66 /* 0xD1 */ s8 unk_0D1;
67 /* 0xD2 */ s8 itemDisplay;
68 /* 0xD3 */ s8 unk_0D3;
69 /* 0xD4 */ s8 unk_0D4;
70 /* 0xD5 */ u8 unk_0D5;
71 /* 0xD6 */ u8 unk_0D6;
72 /* 0xD7 */ u8 unk_0D7;
73 /* 0xD8 */ u8 unk_0D8;
74 /* 0xD9 */ u8 textureWidth;
75 /* 0xDA */ u8 textureHeight;
76 /* 0xDB */ u8 unk_0DB;
77 /* 0xDC */ u8 unk_0DC;
78 /* 0xDD */ u8 unk_0DD;
79 /* 0xDE */ s8 unk_0DE;
80 /* 0xDF */ u8 unk_0DF;
81} Objects; // size = 0xE0
82
83extern Objects gObjectList[];
84
85typedef struct
86{
87 /* 0x00 */ f32 sizeScaling;
88 /* 0x04 */ Vec3f pos;
89 /* 0x10 */ Vec3f origin_pos;
90 /* 0x1C */ Vec3f unk_01C;
91 /* 0x28 */ Vec3f unk_028;
92 /* 0x34 */ f32 unk_034;
93 /* 0x38 */ Vec3f velocity;
94 /* 0x44 */ f32 unk_044;
95 /* 0x48 */ s32 unk_048;
96 /* 0x4C */ s32 unk_04C;
97 /* 0x50 */ s32 unk_050;
98 /* 0x54 */ s32 unk_054;
99 /* 0x58 */ s32 unk_058;
100 /* 0x5C */ s32 unk_05C;
101 /* 0x60 */ u8 *activeTLUT;
102 /* 0x64 */ u8 *activeTexture;
108 /* 0x68 */ u8 *tlutList; // I feel like this should actually be `u8 (*tlutList)[512]`, but that causes mismatches
109 /* 0x6C */ u8 *textureList;
110 /* 0x70 */ Gfx *model;
111 /* 0x74 */ Vtx *vertex;
112 /* 0x78 */ s8 unk_078[0x04];
113 /* 0x7C */ Vec4s *unk_07C;
114 /* 0x80 */ Vec4s *unk_080; // unk_080[][4]?
115 /* 0x84 */ s16 unk_084[0xA];
117 /* 0x9A */ u16 unk_09A;
118 /* 0x9C */ s16 unk_09C;
119 /* 0x9E */ s16 unk_09E;
120 /* 0xA0 */ s16 unk_0A0;
121 /* 0xA2 */ s16 unk_0A2;
122 /* 0xA4 */ s16 currentItem;
123 /* 0xA6 */ s16 itemDisplayState; // Usually a state tracker
124 /* 0xA8 */ s16 unk_0A8;
125 /* 0xAA */ s16 unk_0AA;
126 /* 0xAC */ s16 unk_0AC;
127 /* 0xAE */ s16 unk_0AE;
128 /* 0xB0 */ s16 unk_0B0;
129 /* 0xB2 */ Vec3su orientation; // rotation, I think
130 /* 0xB8 */ Vec3su unk_0B8;
132 /* 0xC4 */ u16 unk_0C4;
133 /* 0xC6 */ u16 unk_0C6;
134 /* 0xC8 */ u16 unk_0C8;
135 /* 0xCA */ s8 unk_0CA;
136 /* 0xCB */ s8 unk_0CB;
137 /* 0xCC */ s8 unk_0CC;
138 /* 0xCD */ s8 unk_0CD;
139 /* 0xCE */ s8 unk_0CE;
140 /* 0xCF */ s8 unk_0CF;
141 /* 0xD0 */ s8 unk_0D0;
142 /* 0xD1 */ s8 unk_0D1;
143 /* 0xD2 */ s8 itemDisplay;
144 /* 0xD3 */ s8 unk_0D3;
145 /* 0xD4 */ s8 unk_0D4;
146 /* 0xD5 */ u8 unk_0D5;
147 /* 0xD6 */ u8 unk_0D6;
148 /* 0xD7 */ u8 unk_0D7;
149 /* 0xD8 */ u8 unk_0D8;
150 /* 0xD9 */ u8 textureWidth;
151 /* 0xDA */ u8 textureHeight;
152 /* 0xDB */ u8 unk_0DB;
153 /* 0xDC */ u8 unk_0DC;
154 /* 0xDD */ u8 unk_0DD;
155 /* 0xDE */ s8 unk_0DE;
156 /* 0xDF */ u8 unk_0DF;
157} ItemWindowObjects; // size = 0xE0
158
159// This are other lists of indices in gObjectList.
160
165extern s32 D_80183DA0;
166
168extern s32 gIndexLakituList[];
169
170#define DELETED_OBJECT_ID -1
171#define NULL_OBJECT_ID -1
172
175
176// Used for loop bounds when accessing indexObjectList1
177extern s16 D_80165750;
178
184extern s32 D_8018D1C8;
185extern s32 D_8018D1D0;
186extern s32 D_8018D1D8;
187
189extern s32 D_8018D3C0;
190
191extern Collision D_8018C0B0[];
192
201#define NUM_YV_FLAG_POLES 4
202
203typedef struct {
204 /* 0x0 */ Vec3s pos;
205 /* 0x6 */ u16 rot;
206} YVFlagPoleSpawn; // size = 0x8;
207
209
210#define NUM_CRABS 0xA
211
212typedef struct {
213 /* 0x0 */ s16 startX;
214 /* 0x2 */ s16 patrolX;
215 /* 0x4 */ s16 startZ;
216 /* 0x6 */ s16 patrolZ;
217} CrabSpawn;
218
219extern CrabSpawn gCrabSpawns[];
220
221#define NUM_THWOMPS_50CC 8
222#define NUM_THWOMPS_100CC_EXTRA 11
223#define NUM_THWOMPS_150CC 12
224
225extern Vec3f D_800E6734[];
226
227typedef struct {
228 /* 0x0 */ s16 startX;
229 /* 0x2 */ s16 startZ;
230 /* 0x4 */ s16 unk_4; // Group Id?
231 /* 0x6 */ s16 unk_6; // Starting State?
232} ThwompSpawn; // size = 0x8;
233
238
240
241#define NUM_NEON_SIGNS 10
242#define NUM_CHAIN_CHOMPS 3
243
244#define NUM_PENGUINS 15
245
255extern s32 indexObjectList1[];
256
257#define NUM_SEAGULLS 10
258#define NUM_SNOWMEN 19
259#define NUM_HEDGEHOGS 15
260
261typedef struct {
262 /* 0x0 */ Vec3s pos;
263 /* 0x6 */ s16 unk_6; // Group Id?
264} SnowmanSpawn; // size = 0x8;
265
267
268typedef struct {
269 /* 0x0 */ Vec3s pos;
270 /* 0x6 */ s16 unk_06; // Group Id?
271} HegdehogSpawn; // size = 0x8;
272
275
284extern s32 indexObjectList2[];
285
286#define NUM_BOOS 0xA
287#define NUM_FIRE_BREATHS 4
288
290
291// These should really, really be Vec3s arrays, but that doesn't match
292extern s16 D_800E5740[];
293extern s16 D_800E579C[];
294extern s16 D_800E57F8[];
295
300extern s32 indexObjectList3[];
301
305extern s32 indexObjectList4[];
306
307#define gObjectParticle1_SIZE 128
308#define NUM_MAX_MOLES 0x1F
309#define NUM_GROUP1_MOLES 8
310#define NUM_GROUP2_MOLES 11
311#define NUM_GROUP3_MOLES 12
312#define NUM_SNOWFLAKES 0x32
313
314extern Vec3s gMoleSpawns[];
315
320extern s8 D_8018D198[];
321extern s8 D_8018D1A8[];
322extern s8 D_8018D1B8[];
323
325extern s32 D_8018CF10;
326
334extern s32 gObjectParticle1[];
335
338
340extern s16 D_8018D174;
341
342#define gObjectParticle2_SIZE 128
343
348extern s32 gObjectParticle2[];
349
352
354extern s32 D_8018D3BC;
355
356#define gObjectParticle3_SIZE 128
357extern s32 gObjectParticle3[];
360extern s16 D_80165730;
361
363extern s16 D_80165738;
364
365#define gObjectParticle4_SIZE 0x40
366
367#define NUM_TORCHES 8
368
369// This should really be `extern Vec3s gTorchSpawns[];`
371extern s16 gTorchSpawns[];
372
378extern s32 gObjectParticle4[];
379
382
383// Maximum number of leaves that can be falling?
384#define gLeafParticle_SIZE 0x40
385// Number of leaves to spawn each bonk?
386#define gLeafParticle_SPAWN_SIZE 0x14
387
392extern s32 gLeafParticle[];
393
396
397#define D_8018CC80_SIZE 0x64
398
403extern s32 D_8018CC80[];
404
406extern s32 D_8018D1F0;
407
409extern s32 D_8018D1F8;
410
412extern s16 D_8018D17C;
413
415extern s8 D_8018D230;
416
418extern s32 D_8018D3C4;
419
420#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[]
s16 D_800E579C[]
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:314
s32 gItemWindowObjectByPlayerId[]
Appears to be a list of object list indices for the Item Window part of the HUD.
Definition code_80057C60.c:258
s32 indexObjectList3[]
Definition code_80057C60.c:292
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:329
s16 gNumActiveThwomps
Definition code_80057C60.c:110
s32 D_8018CC80[]
Definition code_80057C60.c:335
s32 gObjectParticle1[]
Definition code_80057C60.c:308
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:252
s32 indexObjectList2[]
Definition code_80057C60.c:279
s32 gIndexLakituList[]
Lakitu?
Definition code_80057C60.c:237
Collision D_8018C0B0[]
Array of (4) Collisions?
Definition code_80057C60.c:300
s8 D_8018D198[]
Definition code_80057C60_var.c:63
s32 indexObjectList1[]
Definition code_80057C60.c:269
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:255
s32 gObjectParticle4[]
Definition code_80057C60.c:324
s16 D_800E5740[]
Objects gObjectList[]
Definition code_80057C60.c:226
s32 gNextFreeObjectParticle2
Next free spot in gObjectParticle2? Wraps back around to 0 if it gets bigger than gObjectParticle2_SI...
Definition code_80057C60.c:246
ThwompSpawn * gThowmpSpawnList
Definition code_80057C60.c:112
s32 gNextFreeObjectParticle3
Next free spot in gObjectParticle3?
Definition code_80057C60.c:249
s32 D_80183DA0
Definition code_80057C60.c:234
s32 gObjectParticle3[]
Definition code_80057C60.c:317
s32 D_8018D3BC
Controls number of come object type placed into gObjectParticle2 on Frappe Snowland....
Definition code_80057C60_var.c:145
CrabSpawn gCrabSpawns[]
s8 D_8018D1A8[]
Definition code_80057C60_var.c:65
Vec3s gMoleSpawns[]
YVFlagPoleSpawn D_800E5DF4[]
s32 D_8018CF10
Unknown object index, only set for Kalimari Desert, never read.
Definition code_80057C60.c:338
Vec3s gHedgehogPatrolPoints[]
s32 D_8018D1F8
Next free spot in D_8018CC80?
Definition code_80057C60_var.c:88
ThwompSpawn gThomwpSpawns50CC[]
s16 D_80165730
Definition code_80057C60.c:100
s16 D_800E57F8[]
Vec3s gFireBreathsSpawns[]
ThwompSpawn gThwompSpawns100CCExtra[]
SnowmanSpawn gSnowmanSpawns[]
s32 gNextFreeObjectParticle1
Next free spot in gObjectParticle1? Wraps back around to 0 if it gets bigger than gObjectParticle1_SI...
Definition code_80057C60.c:243
s32 D_8018D1F0
Number of used spots in D_8018CC80?
Definition code_80057C60_var.c:85
HegdehogSpawn gHedgehogSpawns[]
s32 D_8018D3C0
Limit on some object type (ice chips?) in Sherbet Land.
Definition code_80057C60_var.c:147
Vec3f D_800E6734[]
s16 D_80165738
Tracking a count of some object type, don't know what object type yet.
Definition code_80057C60.c:103
s16 gTorchSpawns[]
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:298
Definition common_structs.h:114
Definition objects.h:212
s16 startX
Definition objects.h:213
s16 patrolZ
Definition objects.h:216
s16 startZ
Definition objects.h:215
s16 patrolX
Definition objects.h:214
Definition objects.h:268
s16 unk_06
Definition objects.h:270
Vec3s pos
Definition objects.h:269
Definition objects.h:86
u8 unk_0DB
Definition objects.h:152
s16 itemDisplayState
Definition objects.h:123
u16 unk_0C8
Definition objects.h:134
s16 unk_0AA
Definition objects.h:125
u8 * textureList
Definition objects.h:109
s8 unk_0D1
Definition objects.h:142
s8 unk_0D0
Definition objects.h:141
f32 sizeScaling
Definition objects.h:87
s32 unk_04C
Definition objects.h:96
s16 unk_0AC
Definition objects.h:126
u8 unk_0DF
Definition objects.h:156
u8 unk_0D7
Definition objects.h:148
s16 unk_0A0
Definition objects.h:120
s8 unk_0CF
Definition objects.h:140
Gfx * model
Definition objects.h:110
s8 unk_0CD
Definition objects.h:138
s8 unk_0CB
Definition objects.h:136
s8 unk_0CE
Definition objects.h:139
Vec4s * unk_07C
Definition objects.h:113
u8 unk_0D8
Definition objects.h:149
s8 unk_0DE
Definition objects.h:155
s32 unk_05C
Definition objects.h:100
u8 unk_0D6
Definition objects.h:147
s16 currentItem
Definition objects.h:122
s8 unk_0D3
Definition objects.h:144
Vec4s * unk_080
Definition objects.h:114
s16 unk_0B0
Definition objects.h:128
s16 unk_09E
Definition objects.h:119
Vtx * vertex
Definition objects.h:111
s32 unk_058
Definition objects.h:99
s16 unk_0AE
Definition objects.h:127
Vec3su direction_angle
Definition objects.h:131
u16 unk_0C6
Definition objects.h:133
f32 unk_044
Definition objects.h:94
s16 unk_09C
Definition objects.h:118
s8 unk_0CC
Definition objects.h:137
Vec3f origin_pos
Definition objects.h:89
Vec3f velocity
Definition objects.h:93
Vec3f unk_01C
Definition objects.h:90
s32 unk_048
Definition objects.h:95
s8 itemDisplay
Definition objects.h:143
Vec3f unk_028
Definition objects.h:91
s8 unk_0CA
Definition objects.h:135
s32 unk_050
Definition objects.h:97
u8 * tlutList
Definition objects.h:108
u8 unk_0D5
Definition objects.h:146
u8 unk_0DD
Definition objects.h:154
u8 unk_0DC
Definition objects.h:153
Vec3su orientation
Definition objects.h:129
s16 unk_0A2
Definition objects.h:121
u8 * activeTexture
Definition objects.h:102
s8 unk_0D4
Definition objects.h:145
Vec3f pos
Definition objects.h:88
u8 textureHeight
Definition objects.h:151
u8 textureWidth
Definition objects.h:150
u16 unk_09A
Definition objects.h:117
u16 unk_0C4
Definition objects.h:132
u8 * activeTLUT
Definition objects.h:101
s16 unk_0A8
Definition objects.h:124
u16 goldenMushroomTimer
Definition objects.h:116
s32 unk_054
Definition objects.h:98
Vec3su unk_0B8
Definition objects.h:130
f32 unk_034
Definition objects.h:92
Definition objects.h:10
s8 unk_0CD
Definition objects.h:62
u8 unk_0D8
Definition objects.h:73
Gfx * model
Definition objects.h:34
Vec4s * unk_080
Definition objects.h:38
s8 unk_0D1
Definition objects.h:66
f32 sizeScaling
Definition objects.h:11
s16 unk_0A0
Definition objects.h:44
u8 unk_0DC
Definition objects.h:77
u8 * textureList
Definition objects.h:33
u8 unk_0D7
Definition objects.h:72
u8 unk_0DD
Definition objects.h:78
f32 unk_034
Definition objects.h:16
Vec3f pos
Definition objects.h:12
s32 unk_04C
Definition objects.h:20
s8 unk_0CF
Definition objects.h:64
s8 itemDisplay
Definition objects.h:67
s8 unk_0DE
Definition objects.h:79
s16 unk_0A2
Definition objects.h:45
Vec3f velocity
Definition objects.h:17
u16 boundingBoxSize
Definition objects.h:58
u16 unk_0C6
Definition objects.h:57
Vec3f unk_01C
Definition objects.h:14
u8 textureHeight
Definition objects.h:75
Vec3su unk_0B8
Definition objects.h:54
s16 state
Definition objects.h:47
s16 unk_0AE
Definition objects.h:51
s32 unk_058
Definition objects.h:23
u8 * activeTexture
Definition objects.h:26
f32 unk_044
Definition objects.h:18
u8 unk_0D5
Definition objects.h:70
s32 unk_050
Definition objects.h:21
u8 * tlutList
Definition objects.h:32
s32 unk_054
Definition objects.h:22
s8 unk_0D0
Definition objects.h:65
s16 unk_0AA
Definition objects.h:49
u8 unk_0DF
Definition objects.h:80
s8 unk_0CC
Definition objects.h:61
s16 unk_0AC
Definition objects.h:50
s8 unk_0CA
Definition objects.h:59
s16 type
Definition objects.h:46
s32 unk_048
Definition objects.h:19
Vtx * vertex
Definition objects.h:35
Vec3f origin_pos
Definition objects.h:13
Vec3su orientation
Definition objects.h:53
u8 unk_0DB
Definition objects.h:76
s16 unk_09C
Definition objects.h:42
s8 unk_0CE
Definition objects.h:63
u8 textureWidth
Definition objects.h:74
s8 unk_0D3
Definition objects.h:68
Vec4s * unk_07C
Definition objects.h:37
s16 unk_09E
Definition objects.h:43
u16 unk_0C4
Definition objects.h:56
s8 unk_0CB
Definition objects.h:60
u8 * activeTLUT
Definition objects.h:25
u16 unk_09A
Definition objects.h:41
s16 unk_0B0
Definition objects.h:52
s16 unk_0A8
Definition objects.h:48
u8 unk_0D6
Definition objects.h:71
Vec3su direction_angle
Definition objects.h:55
s8 unk_0D4
Definition objects.h:69
u16 timer
Definition objects.h:40
s32 unk_05C
Definition objects.h:24
Vec3f unk_028
Definition objects.h:15
Definition objects.h:261
s16 unk_6
Definition objects.h:263
Vec3s pos
Definition objects.h:262
Definition objects.h:227
s16 startX
Definition objects.h:228
s16 unk_4
Definition objects.h:230
s16 startZ
Definition objects.h:229
s16 unk_6
Definition objects.h:231
Definition objects.h:203
Vec3s pos
Definition objects.h:204
u16 rot
Definition objects.h:205
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