forked from CTR-tools/CTR-ModSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathovr_231.h
655 lines (481 loc) · 7.83 KB
/
ovr_231.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
// used all over 231,
// Plant, FlameJet, etc
struct HitboxDesc
{
// check collision
struct Instance* inst;
struct Thread* thread;
struct Thread* bucket;
struct BoundingBox bbox;
// post collision
struct Thread* threadHit; // from bucket
void* funcThCollide;
};
struct MaskHeadScratch
{
// 0x1f800108
MATRIX m;
// 0x1f800128
short rot[4];
// 0x1f800130
short posOffset[4];
};
struct MaskHeadWeapon
{
// 0x0
short rot[3];
// 0x6
short duration;
// 0x8
struct Instance* maskBeamInst;
// 0xC
short pos[3];
// 0x12
short scale;
// 0x14 bytes large
};
// bomb, missile, warpball
// yes, the bomb chases you and steers towards targets
struct TrackerWeapon
{
// 0x0
struct Driver* driverTarget; // being chased
// 0x4
struct Driver* driverParent; // who shot me
// 0x8
struct Instance* instParent; // of driver who shot me
// 0xC
struct Particle* ptrParticle;
// 0x10
short vel[3];
// 0x16
// & 1 - used 10 wumpa fruit
// & 0x20 - bomb backwards
u_short flags;
// 0x18
short dir[3];
// 0x1e
short rotY;
// 0x20
short frameCount_DontHurtParent;
short frameCount_Blind;
// 0x24
int audioPtr;
// 0x28
unsigned int distanceToTarget;
// === This point and beyond is Warpball ===
// 0x2c
// lev->0x14c + "this" * 0xC
int respawnPointIndex;
// 0x30
int fadeAway_frameCount5;
// 0x34
// bitshift with driver->driverID
// one bit for every driver hit
u_int driversHit;
// 0x38
// distY from track floor
int distFromGround;
// 0x3C
struct CheckpointNode* ptrNodeCurr;
// 0x40
struct CheckpointNode* ptrNodeNext;
// 0x44
u_char nodeCurrIndex;
// 0x45
u_char nodeNextIndex;
// 0x46
short padding;
// 0x48
int timeAlive;
// 0x4c
int unk4c;
// 0x50
short unk50;
// 0x52
short turnAround;
// 0x54
int framesSeekMine;
// 0x58 bytes large
};
struct RainLocal
{
// 0x0
struct RainLocal* next;
struct RainLocal* prev;
// 0x8
int frameCount;
// 0xC
short unk1[4];
// 0x14
short vel[4];
// 0x1c
short pos[4];
// 0x24
struct instance* cloudInst;
// 0x28 -- size
};
struct RainCloud
{
// 0x0
struct RainLocal* rainLocal;
// 0x4
short timeMS;
// 0x6
// I guess this is used for randomizing the items?
short boolScrollItem;
// size - 0x8
};
struct Shield
{
// 0x0
int animFrame;
// 0x4
short duration;
// 0x6
// & 1 - popped by VehPickState_NewState
// & 2 - shooting
// & 4 - blue shield
// & ??? - shooting
short flags;
// 0x8
struct Instance* instColor;
// 0xC
struct Instance* instHighlight;
// 0x10
short highlightRot[3];
short highlightTimer;
// 0x18
};
struct MineWeapon;
struct WeaponSlot231
{
// 0x0
struct WeaponSlot231* next;
struct WeaponSlot231* prev;
// 0x8
struct MineWeapon* mineWeapon;
};
// Tnt, Nitro, Beaker
struct MineWeapon
{
// 0x0
struct Driver* driverTarget; // who hit me
// 0x4
struct Instance* instParent; // of driver who placed me
// 0x8
struct Instance* crateInst; // if colliding with one
// 0xc
short velocity[3];
// 0x12
// used by tnt, and potion_inAir
short stopFallAtY;
// 0x14
// causes explosion if != 0,
// this is how mine pool destroys oldest mine
short boolDestroyed;
// 0x16
// animation frame (on head)
short numFramesOnHead;
// 0x18
struct WeaponSlot231* weaponSlot231;
// 0x1C
// relative to driver
short deltaPos[3];
// 0x22
// how many more jumps until
// the tnt flies off your head
short jumpsRemaining;
// 0x24
// number of frames that mine can't hurt parent
short frameCount_DontHurtParent;
// 0x26
short tntSpinY;
// 0x28
// 1 - red beaker
// 2 - thrown (papu or komodo joe) (tnt/potion)
u_short extraFlags;
// 0x2a
short cooldown;
};
struct Baron
{
// 0x0
// for the baron plane
char unused[0x24];
// 0x24
u_int soundID_flags;
// 0x28
// unused, for baron
struct Instance* otherInst;
// 0x2c
short pointIndex;
short footerPaddingUnused;
// 0x30 bytes large
};
struct Blade
{
int angle;
// 0x4 bytes large
};
struct Crate
{
int cooldown;
int boolPauseCooldown;
// 0x8 bytes large
};
struct Crystal
{
short rot[3];
short padding;
// 0x8 bytes large
};
struct CtrLetter
{
short rot[3];
short padding;
// 0x8 bytes large
};
struct StartBanner
{
short unk0;
short unk1;
// 0x4 bytes large
};
struct Armadillo
{
// 0x0
short rotCurr[3];
// 0x6
short velX;
// 0x8
short rotDesired[3];
// 0xe
short velZ;
// 0x10
// at 0x500, it stops, and turns around
short timeRolling;
// 0x12
// unused
short numFramesSpinning;
// 0x14
// starts at zero, rolls, gets to high number,
// then rolls back, and number goes back to zero
short distFromSpawn;
// 0x16
short spawnPosX;
// 0x18
short spawnPosZ;
// 0 for one direction, 1 for the other
// 0x1a
short direction;
// frames at edge, waiting to roll again
// 0x1c
short timeAtEdge;
// 0x20 bytes large
};
struct Fireball
{
// 0x0
short cycleTimer;
// 0x2
short fireballID;
// 0x4
// puts fireballs on different cycles,
// just like spiders
short cooldown;
// 0x6 (maybe a rot[3]?)
short unused[3];
// 0xC
short velY;
// 0xE
// unused
short direction;
// 0x10 bytes large
};
struct FlameJet
{
// 0x0
int cycleTimer;
// 0x4
int dirX;
// 0x8
int dirZ;
// 0xC
// adds 0x100 per frame
int unk;
// 0xe
int cooldown;
// 0x10
void* audioPtr;
// 0x14 bytes large
};
struct Follower
{
int frameCount;
struct Driver* driver;
struct Thread* mineTh;
int backupTimesDestroyed;
short realPos[4];
};
#if 0
struct Fruit
{
// 0x4 bytes large
};
#endif
struct Minecart
{
// 0x0
// removed in decomp optimizations
short posStart[3];
// 0x6
short betweenPoints_currFrame;
// 0x8
// removed in decomp optimizations
short posEnd[3];
// 0xe
short dir[3];
// 0x14
int posIndex;
// 0x18
short rotCurr[3];
// 0x1e
short betweenPoints_numFrames;
// 0x20
short rotDesired[3];
// 0x26
short rotSpeed;
// 0x28
int audioPtr;
// 0x2c bytes large
};
struct Orca
{
// 0x0
short startPos[3];
// 0x6
short orcaID;
// 0x8
short endPos[3];
// 0xE
short cooldown;
// 0x10
short instDefRot[3];
// 0x16
short animIndex;
// 0x26
short numFrames;
// 0x28
short midpoint[3]; // ?
// 0x2e
short direction;
// 0x30 bytes large
};
struct Plant
{
// 0x0
short cycleCount;
// 0x2
short cooldown;
// 0x4
// 0: left side of track
// 1: right side of track
short LeftOrRight;
// 0x6
short boolEatingPlayer;
// 0x8 bytes large
};
struct Seal
{
// 0x0
short spawnPos[3];
// 0x6
short sealID;
// 0x8
// unused, should erase
short endPos[3];
// 0xe
short distFromSpawn;
// 0x10
short rotCurr[3];
short padding16;
// 0x18
short rotDesired[3];
// 0x1e
short direction;
// 0x20
// unused, should erase
short rotDesiredAlt[3];
// 0x26
short numFramesSpinning;
// 0x28
short vel[3];
short padding2e;
// 0x30 bytes large
};
struct Snowball
{
// 0x0
short rot_unused[3];
// 0x6
short pointIndex;
// 0x8
short numPoints;
// 0xA
short snowID;
// 0xC
int audioPtr;
// 0x10 bytes large
};
struct Spider
{
// 0x0
// counts five times
short animLoopCount;
// 0x2
short spiderID;
// 0x4
// unused, use t->cooldownFrameCount instead
short delay;
// 0x6
short boolNearRoof; // 0 on ground, 1 near roof
// 0x8
short unused;
short padding;
// 0xC
struct Instance* shadowInst;
// end of struct, 8 bytes large
};
struct Teeth
{
// 0x0
// -1: closing
// 0: not moving
// 1: opening
int direction;
// 0x4
// countdown starts when door
// is fully open, door starts
// closing when it is done
int timeOpen;
// 0x8 bytes large
};
struct Turtle
{
// 0x0
short timer;
// 0x2
// 0 from moment it hits top to moment it hits bottom
// 1 from moment it hits bottom to moment it hits top
short direction;
// 0x4
short unk4;
// 0x6
short turtleID;
// 0x8
// 0 - fully up (big jump)
// 1 - not fully up (small jump)
short state;
// 0xC bytes large
};