Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
common_structs.h
Go to the documentation of this file.
1#ifndef _COMMON_STRUCTS_H_
2#define _COMMON_STRUCTS_H_
3
4#include "macros.h"
5#include "ultra64.h"
6#include "types.h"
7#include "evt.h"
8#include "enums.h"
9
10struct Evt;
11
12typedef ApiStatus(*ApiFunc)(struct Evt*, s32);
13
15
16typedef void NoArgCallback(void*);
17
18#define MSG_PTR u8*
19#define IMG_PTR u8*
20#define PAL_PTR u16*
21
22#define MSG_BIN u8
23#define IMG_BIN u8
24#define PAL_BIN u16
25
26typedef s32 b32;
27typedef s16 b16;
28typedef s8 b8;
29
30typedef s32 HitID;
31typedef u32 AnimID;
32
33typedef struct {
34 u8 r, g, b, a;
36
37typedef struct {
38 u8 r, g, b;
40
41typedef struct Vec2b {
42 /* 0x00 */ s8 x;
43 /* 0x01 */ s8 y;
44} Vec2b; // size = 0x02
45
46typedef struct Vec2bu {
47 /* 0x00 */ u8 x;
48 /* 0x01 */ u8 y;
49} Vec2bu; // size = 0x02
50
51typedef struct Vec3b {
52 /* 0x00 */ s8 x;
53 /* 0x01 */ s8 y;
54 /* 0x02 */ s8 z;
55} Vec3b; // size = 0x03
56
57typedef struct Vec2s {
58 /* 0x00 */ s16 x;
59 /* 0x02 */ s16 y;
60} Vec2s; // size = 0x04
61
62typedef struct Vec2su {
63 /* 0x00 */ u16 x;
64 /* 0x02 */ u16 y;
65} Vec2su; // size = 0x04
66
67typedef struct Vec3s {
68 /* 0x00 */ s16 x;
69 /* 0x02 */ s16 y;
70 /* 0x04 */ s16 z;
71} Vec3s; // size = 0x06
72
73typedef struct Vec2i {
74 /* 0x00 */ s32 x;
75 /* 0x04 */ s32 y;
76} Vec2i; // size = 0x08
77
78typedef struct VecXZi {
79 /* 0x00 */ s32 x;
80 /* 0x04 */ s32 z;
81} VecXZi; // size = 0x08
82
83typedef struct Vec3i {
84 /* 0x00 */ s32 x;
85 /* 0x04 */ s32 y;
86 /* 0x08 */ s32 z;
87} Vec3i; // size = 0x0C
88
89typedef struct Vec2f {
90 /* 0x00 */ f32 x;
91 /* 0x04 */ f32 y;
92} Vec2f; // size = 0x08
93
94typedef struct VecXZf {
95 /* 0x00 */ f32 x;
96 /* 0x04 */ f32 z;
97} VecXZf; // size = 0x08
98
99typedef struct Vec3f {
100 /* 0x00 */ f32 x;
101 /* 0x04 */ f32 y;
102 /* 0x08 */ f32 z;
103} Vec3f; // size = 0x0C
104
105typedef struct Vec4f {
106 /* 0x00 */ f32 x;
107 /* 0x04 */ f32 y;
108 /* 0x08 */ f32 z;
109 /* 0x0C */ f32 yaw;
110} Vec4f; // size = 0x10
111
112typedef struct Color4f {
113 /* 0x00 */ f32 r;
114 /* 0x04 */ f32 g;
115 /* 0x08 */ f32 b;
116 /* 0x0C */ f32 a;
117} Color4f; // size = 0x10
118
119typedef struct Color3i {
120 /* 0x00 */ s32 r;
121 /* 0x04 */ s32 g;
122 /* 0x08 */ s32 b;
123} Color3i; // size = 0xC
124
125typedef struct Color4i {
126 /* 0x00 */ s32 r;
127 /* 0x04 */ s32 g;
128 /* 0x08 */ s32 b;
129 /* 0x0C */ s32 a;
130} Color4i; // size = 0x10
131
132typedef f32 Matrix4f[4][4]; // size = 0x40
133
134typedef struct Matrix4s {
135 /* 0x00 */ s16 whole[4][4];
136 /* 0x20 */ s16 frac[4][4];
137} Matrix4s; // size = 0x40
138
139typedef struct CameraRig {
140 /* 0x00 */ f32 boomYaw;
141 /* 0x04 */ f32 boomLength;
142 /* 0x08 */ f32 boomPitch;
143 /* 0x0C */ f32 viewPitch;
144 /* 0x10 */ Vec3f targetPos;
145} CameraRig; // size = 0x1C
146
147typedef struct DmaTable {
148 /* 0x00 */ u8* start;
149 /* 0x04 */ u8* end;
150 /* 0x08 */ u8* dest;
151} DmaTable;
152
153typedef struct HeapNode {
154 /* 0x00 */ struct HeapNode* next;
155 /* 0x04 */ u32 length;
156 /* 0x08 */ u16 allocated;
157 /* 0x0A */ u16 entryID;
158 /* 0x0C */ u32 capacity;
159} HeapNode; // size = 0x10
160
161#define NPC_BLUR_FRAMES 20
162
164typedef struct NpcMotionBlur {
165 /* 0x00 */ s8 unused;
166 /* 0x01 */ s8 index;
167 /* 0x02 */ char unk_02[2]; // padding?
168 /* 0x04 */ f32 posX[NPC_BLUR_FRAMES];
169 /* 0x54 */ f32 posY[NPC_BLUR_FRAMES];
170 /* 0xA4 */ f32 posZ[NPC_BLUR_FRAMES];
171} NpcMotionBlur; // size = 0xF4
172
173typedef struct NpcChompBlur {
174 /* 0x00 */ struct Npc* npc;
175 /* 0x04 */ Vec3f offset;
176} NpcChompBlur; // size = 0x10;
177
178typedef struct NpcQuizmoBlur {
179 /* 0x00 */ s32 flags;
180 /* 0x04 */ char unk_04[0x4];
181} NpcQuizmoBlur; // size = 0x8;
182
183typedef struct NpcHistoryPoint {
184 /* 0x00 */ b8 isAirborne;
185 /* 0x01 */ char unk_01[0x3];
186 /* 0x04 */ Vec3f pos;
187} NpcHistoryPoint; // size = 0x10
188
189typedef struct FollowAnims {
190 /* 0x00 */ AnimID walk;
191 /* 0x04 */ AnimID jump;
192 /* 0x08 */ AnimID fall;
193 /* 0x0C */ AnimID land;
194 /* 0x10 */ AnimID idle;
195 /* 0x14 */ AnimID run;
196} FollowAnims; // size = 0x18
197
198typedef struct NpcFollowData {
200 /* 0x280 */ s32 lastPointIdx;
201 /* 0x284 */ s32 targetPointIdx;
202 /* 0x288 */ s32 followState;
203 /* 0x28C */ s32 targetNpcID;
204 /* 0x290 */ FollowAnims* anims;
205 /* 0x294 */ f32 walkSpeed;
206 /* 0x298 */ f32 runSpeed;
207 /* 0x29C */ f32 idleRadius;
208 /* 0x2A0 */ f32 walkRadius;
209} NpcFollowData; // size = 0x2A4
210
211#define MAX_NPC_DECORATIONS 2
212
213typedef struct Npc {
214 /* 0x000 */ s32 flags;
215 /* 0x004 */ void (*onUpdate)(struct Npc*);
216 /* 0x008 */ void (*onRender)(struct Npc*);
217 /* 0x00C */ f32 yaw;
218 /* 0x010 */ f32 planarFlyDist; /* also used for speech, temp0? */
219 /* 0x014 */ f32 jumpScale; /* also used for speech, temp1? */
220 /* 0x018 */ f32 moveSpeed;
221 /* 0x01C */ f32 jumpVel;
222 /* 0x020 */ union {
223 void* any;
224 NpcMotionBlur* motion;
225 NpcChompBlur* chomp;
226 NpcQuizmoBlur* quizmo;
227 NpcFollowData* followData;
228 struct Npc* keepAwayNpc;
229 s32* keepAwayStarted;
231 /* 0x024 */ s32 spriteInstanceID;
232 /* 0x028 */ AnimID curAnim;
233 /* 0x02C */ s32 animNotifyValue;
234 /* 0x030 */ f32 animationSpeed;
235 /* 0x034 */ f32 renderYaw;
236 /* 0x038 */ Vec3f pos;
237 /* 0x044 */ Vec3f rot;
238 /* 0x050 */ f32 rotPivotOffsetY;
239 /* 0x054 */ Vec3f scale;
240 /* 0x060 */ Vec3f moveToPos;
241 /* 0x06C */ Vec3f colliderPos; /* used during collision with player */
242 /* 0x078 */ s32 shadowIndex;
243 /* 0x07C */ f32 shadowScale;
244 /* 0x080 */ s32 collisionChannel; /* flags used with collision tracing */
245 /* 0x084 */ s16 curFloor; /* colliderID */
246 /* 0x086 */ s16 curWall; /* colliderID */
247 /* 0x088 */ b16 isFacingAway;
248 /* 0x08A */ s16 yawCamOffset;
249 /* 0x08C */ s16 turnAroundYawAdjustment;
250 /* 0x08E */ s16 duration; // TODO: name less vaguely
251 /* 0x090 */ Vec3s homePos;
252 /* 0x096 */ s16 unk_96;
253 /* 0x098 */ s16 imgfxType;
254 /* 0x09A */ s16 imgfxArg1;
255 /* 0x09C */ s16 imgfxArg2;
256 /* 0x09E */ s16 imgfxArg3;
257 /* 0x0A0 */ s16 imgfxArg4;
258 /* 0x0A2 */ u16 imgfxFlags;
259 /* 0x0A4 */ s8 npcID;
260 /* 0x0A5 */ char unk_A5;
261 /* 0x0A6 */ s16 collisionDiameter;
262 /* 0x0A8 */ s16 collisionHeight;
263 /* 0x0AA */ s8 renderMode;
264 /* 0x0AB */ s8 verticalRenderOffset;
265 /* 0x0AC */ u8 alpha;
266 /* 0x0AD */ u8 hideAlpha;
267 /* 0x0AE */ char unk_AE[2];
268 /* 0x0B0 */ AnimID* extraAnimList;
269 /* 0x0B4 */ s8 palSwapType; // 0..4 inclusive
270 /* 0x0B5 */ s8 palSwapPrevType;
271 /* 0x0B6 */ s8 resetPalAdjust;
272 /* 0x0B7 */ s8 palAnimState;
273 /* 0x0B8 */ char unk_B8[4];
274 /* 0x0BC */ s16 nextPalTime;
275 /* 0x0BE */ s16 palBlendAlpha;
276 /* 0x0C0 */ s8 spriteColorVariations;
277 /* 0x0C1 */ s8 originalPalettesCount;
278 /* 0x0C2 */ char unk_C2[2];
281 /* 0x2C8 */ PAL_PTR adjustedPalettes[16];
282 /* 0x308 */ s16 blendPalA;
283 /* 0x30A */ s16 blendPalB;
284 /* 0x30C */ u16 palswapTimeHoldA;
285 /* 0x30E */ s16 palswapTimeAtoB;
286 /* 0x310 */ s16 palswapTimeHoldB;
287 /* 0x312 */ s16 palswapTimeBtoA;
288 /* 0x314 */ s16 blendPalC;
289 /* 0x316 */ s16 blendPalD;
290 /* 0x318 */ f32 screenSpaceOffset2D[2];
291 /* 0x320 */ f32 verticalStretch;
297 /* 0x336 */ char unk_336[10];
298} Npc; // size = 0x340
299
301
302typedef struct PartnerData {
303 /* 0x00 */ u8 enabled;
304 /* 0x01 */ s8 level;
305 /* 0x02 */ s16 unk_02[3];
306} PartnerData; // size = 0x08
307
308typedef struct PlayerData {
309 /* 0x000 */ s8 bootsLevel;
310 /* 0x001 */ s8 hammerLevel;
311 /* 0x002 */ s8 curHP;
312 /* 0x003 */ s8 curMaxHP;
313 /* 0x004 */ s8 hardMaxHP;
314 /* 0x005 */ s8 curFP;
315 /* 0x006 */ s8 curMaxFP;
316 /* 0x007 */ s8 hardMaxFP;
317 /* 0x008 */ s8 maxBP;
318 /* 0x009 */ s8 level;
320 /* 0x00B */ char pad_00B;
321 /* 0x00C */ s16 coins;
322 /* 0x00E */ char unused_00E;
323 /* 0x00F */ u8 starPieces;
324 /* 0x010 */ s8 starPoints;
325 /* 0x011 */ s8 unused_011;
326 /* 0x012 */ s8 curPartner;
327 /* 0x013 */ char pad_013;
328 /* 0x014 */ PartnerData partners[12];
329 /* 0x074 */ s16 keyItems[32];
330 /* 0x0B4 */ s16 badges[128];
331 /* 0x1B4 */ s16 invItems[10];
332 /* 0x1C8 */ s16 storedItems[32];
333 /* 0x208 */ s16 equippedBadges[64];
334 /* 0x288 */ s8 unused_288;
335 /* 0x289 */ s8 merleeSpellType;
336 /* 0x28A */ s8 merleeCastsLeft;
337 /* 0x28B */ char pad_28B;
338 /* 0x28C */ s16 merleeTurnCount;
339 /* 0x28E */ s8 maxStarPower;
340 /* 0x28F */ char pad_28F;
341 /* 0x290 */ s16 starPower;
342 /* 0x292 */ s8 starBeamLevel;
343 /* 0x293 */ char pad_293;
344 /* 0x294 */ u16 actionCommandAttempts;
345 /* 0x296 */ u16 actionCommandSuccesses;
346 /* 0x298 */ u16 hitsTaken;
347 /* 0x29A */ u16 hitsBlocked;
348 /* 0x29C */ u16 playerFirstStrikes;
349 /* 0x29E */ u16 enemyFirstStrikes;
350 /* 0x2A0 */ u16 powerBounces;
351 /* 0x2A2 */ u16 battlesCount;
352 /* 0x2A4 */ u16 battlesWon;
353 /* 0x2A6 */ u16 fleeAttempts;
354 /* 0x2A8 */ u16 battlesFled;
355 /* 0x2AA */ u16 trainingsDone;
356 /* 0x2AC */ s32 walkingStepsTaken;
357 /* 0x2B0 */ s32 runningStepsTaken;
358 /* 0x2B4 */ u32 totalCoinsEarned;
359 /* 0x2B8 */ s16 idleFrameCounter; /* frames with no inputs, overflows ever ~36 minutes of idling */
360 /* 0x2BA */ char pad_2BA[2];
361 /* 0x2BC */ u32 frameCounter; /* increases by 2 per frame */
362 /* 0x2C0 */ u16 quizzesAnswered;
363 /* 0x2C2 */ u16 quizzesCorrect;
364 /* 0x2C4 */ s32 partnerUnlockedTime[12];
365 /* 0x2F4 */ s32 partnerUsedTime[12];
366 /* 0x324 */ s32 tradeEventStartTime;
367 /* 0x328 */ s32 droTreeHintTime;
368 /* 0x32C */ u16 starPiecesCollected;
369 /* 0x32E */ u16 jumpGamePlays;
370 /* 0x330 */ u32 jumpGameTotal; /* all-time winnings, max = 99999 */
371 /* 0x334 */ u16 jumpGameRecord;
372 /* 0x336 */ u16 smashGamePlays;
373 /* 0x338 */ u32 smashGameTotal; /* all-time winnings, max = 99999 */
374 /* 0x33C */ u16 smashGameRecord;
375 /* 0x33E */ char pad_33E[2];
376 /* 0x340 */ char reserved[0xE8]; // unused
377} PlayerData; // size = 0x428
378
379typedef struct Trigger {
380 /* 0x00 */ s32 flags;
381 /* 0x04 */ s32 varIndex;
382 /* 0x08 */ union {
383 /* */ s32 colliderID;
384 /* */ struct BombTrigger* blast;
385 /* */ } location;
386 /* 0x0C */ s32 (*onActivateFunc)(struct Trigger*);
388 /* 0x14 */ struct Evt* runningScript;
389 /* 0x18 */ s32 priority;
390 /* 0x1C */ union {
391 /* */ s32 varTable[3];
392 /* */ f32 varTableF[3];
393 /* */ void* varTablePtr[3];
394 /* */ };
395 /* 0x28 */ s32* itemList;
396 /* 0x2C */ s32 tattleMsg;
398 /* 0x31 */ char unk_31[3];
399 /* 0x34 */ s32 runningScriptID;
400} Trigger; // size = 0x38
401
403
404typedef struct TriggerBlueprint {
405 /* 0x00 */ s32 flags;
406 /* 0x04 */ s16 varIndex;
407 /* 0x06 */ char unk_06[2];
408 /* 0x08 */ s32 colliderID;
409 /* 0x0C */ s32 (*onActivateFunc)(struct Trigger*);
410 /* 0x10 */ char unk_10[4];
411 /* 0x14 */ s32 tattleMsg;
413 /* 0x1C */ s32* itemList;
414} TriggerBlueprint; // size = 0x20
415
416typedef struct Evt {
417 /* 0x000 */ u8 stateFlags;
418 /* 0x001 */ u8 curArgc;
419 /* 0x002 */ u8 curOpcode;
420 /* 0x003 */ u8 priority;
421 /* 0x004 */ u8 groupFlags;
422 /* 0x005 */ s8 blocked; /* 1 = blocking */
423 /* 0x006 */ s8 loopDepth; /* how many nested loops we are in, >= 8 hangs forever */
424 /* 0x007 */ s8 switchDepth; /* how many nested switches we are in, max = 8 */
425 /* 0x008 */ Bytecode* ptrNextLine;
426 /* 0x00C */ Bytecode* ptrReadPos;
427 /* 0x010 */ s8 labelIndices[16];
428 /* 0x020 */ UNK_PTR labelPositions[16];
429 /* 0x060 */ UNK_PTR userData; /* unknown pointer; allocated on the heap, free'd in kill_script() */
430 /* 0x064 */ struct Evt* blockingParent; /* parent? */
431 /* 0x068 */ struct Evt* childScript;
432 /* 0x06C */ struct Evt* parentScript; /* brother? */
433 /* 0x070 */ union {
434 /* */ s32 functionTemp[4];
435 /* */ f32 functionTempF[4];
436 /* */ void* functionTempPtr[4];
437 /* */ };
439 /* 0x084 */ union {
440 /* */ s32 varTable[16];
441 /* */ f32 varTableF[16];
442 /* */ void* varTablePtr[16];
443 /* */ };
444 /* 0x0C4 */ s32 varFlags[3];
445 /* 0x0D0 */ s32 loopStartTable[8];
446 /* 0x0F0 */ s32 loopCounterTable[8];
447 /* 0x110 */ s8 switchBlockState[8];
448 /* 0x118 */ s32 switchBlockValue[8];
449 /* 0x138 */ s32* buffer;
450 /* 0x13C */ s32* array;
451 /* 0x140 */ s32* flagArray;
452 /* 0x144 */ s32 id;
453 /* 0x148 */ union {
454 s32 enemyID;
455 s32 actorID;
456 struct Enemy* enemy;
457 struct Actor* actor;
459 /* 0x14C */ union {
460 s32 npcID;
461 s32 triggerID;
462 struct Npc* npc;
463 struct Trigger* trigger;
465 /* 0x150 */ f32 timeScale;
466 /* 0x154 */ f32 frameCounter;
467 /* 0x158 */ s32 unk_158;
468 /* 0x15C */ Bytecode* ptrFirstLine;
469 /* 0x160 */ Bytecode* ptrSavedPos;
470 /* 0x164 */ Bytecode* ptrCurLine;
471} Evt; // size = 0x168
472
474
475struct Entity;
476struct SaveBlockData;
477struct SwitchData;
479struct BlockData;
480struct WoodenCrateData;
481struct ChestData;
482struct BlueWarpPipeData;
485struct SimpleSpringData;
486struct HiddenPanelData;
487struct SignpostData;
488struct PadlockData;
489struct BoardedFloorData;
490struct BombableRockData;
491struct TweesterData;
493struct CymbalPlantData;
494struct PinkFlowerData;
495struct SpinningFlowerData;
496struct TrumpetPlantData;
497struct MunchlesiaData;
498struct ArrowSignData;
499
500typedef s32 (*EntityCallback)(struct Entity*);
501
502typedef struct DmaEntry {
503 void* start;
504 void* end;
505} DmaEntry;
506
507typedef struct EntityBlueprint {
508 /* 0x00 */ u16 flags;
509 /* 0x02 */ u16 typeDataSize;
512 /* 0x0C */ void (*fpInit)(struct Entity*);
515 /* 0x18 */ union {
516 DmaEntry dma;
517 DmaEntry* dmaList;
518 };
519 /* 0x20 */ u8 entityType;
520 /* 0x21 */ u8 aabbSize[3];
521} EntityBlueprint; // size = 0x24
522
549
550typedef struct Entity {
551 /* 0x00 */ s32 flags;
552 /* 0x04 */ u8 listIndex;
553 /* 0x05 */ s8 unk_05;
554 /* 0x06 */ u8 collisionFlags;
555 /* 0x07 */ s8 collisionTimer;
556 /* 0x08 */ u8 unk_08;
557 /* 0x09 */ u8 scriptDelay;
558 /* 0x0A */ u8 type;
559 /* 0x0B */ u8 alpha;
560 /* 0x0C */ Vec3s aabb;
561 /* 0x12 */ s16 vertexSegment;
562 /* 0x14 */ s16 virtualModelIndex;
563 /* 0x16 */ s16 shadowIndex;
564 /* 0x18 */ s32* scriptReadPos;
567 /* 0x24 */ Evt* boundScript;
569 /* 0x2C */ s32* savedReadPos[3];
571 /* 0x3C */ void (*renderSetupFunc)(s32);
572 /* 0x40 */ EntityData dataBuf;
573 /* 0x44 */ void* gfxBaseAddr;
574 /* 0x48 */ Vec3f pos;
575 /* 0x54 */ Vec3f scale;
576 /* 0x60 */ Vec3f rot;
577 /* 0x6C */ f32 shadowPosY;
578 /* 0x70 */ Matrix4f inverseTransformMatrix; /* world-to-local */
579 /* 0xB0 */ f32 effectiveSize;
580 /* 0xB4 */ char unk_B4[4];
581 /* 0xB8 */ Mtx transformMatrix;
582} Entity; // size = 0xF8
583
585
586struct Shadow;
587
588typedef void (*ShadowCallback)(struct Shadow*);
589
590// same as EntityBlueprint
591typedef struct ShadowBlueprint {
592 /* 0x00 */ u16 flags;
593 /* 0x02 */ s16 typeDataSize;
596 /* 0x0C */ ShadowCallback(onCreateCallback);
597 /* 0x10 */ char unk_10[0x10];
598 /* 0x20 */ u8 entityType;
599 /* 0x21 */ char aabbSize[3];
600} ShadowBlueprint; // size = 0x24
601
602typedef struct Shadow {
603 /* 0x00 */ s32 flags;
604 /* 0x04 */ u8 listIndex;
605 /* 0x05 */ u8 alpha;
606 /* 0x06 */ u8 unk_06;
607 /* 0x07 */ char unk_07;
608 /* 0x08 */ s16 entityModelID;
609 /* 0x0A */ s16 vertexSegment;
610 /* 0x0C */ Vec3s* vertexArray;
611 /* 0x10 */ Vec3f pos;
612 /* 0x1C */ Vec3f scale;
613 /* 0x28 */ Vec3f rot;
614 /* 0x34 */ char unk_34[0x4];
615 /* 0x38 */ Mtx transformMatrix;
616} Shadow; // size = 0x78
617
619
620typedef struct Worker {
621 /* 0x00 */ s32 flags;
622 /* 0x04 */ void (*update)(void);
623 /* 0x08 */ void (*draw)(void);
624} Worker;
625
627
628typedef struct MusicSettings {
629 /* 0x00 */ u16 flags;
630 /* 0x02 */ s16 state;
631 /* 0x04 */ s32 fadeOutTime;
632 /* 0x08 */ s32 fadeInTime;
633 /* 0x0C */ s16 fadeStartVolume;
634 /* 0x0E */ s16 fadeEndVolume;
635 /* 0x10 */ s32 songID;
636 /* 0x14 */ s32 variation;
637 /* 0x18 */ s32 songName;
638 /* 0x1C */ s32 battleSongID;
639 /* 0x20 */ s32 battleVariation;
640 /* 0x24 */ s32 savedSongID;
641 /* 0x28 */ s32 savedVariation;
642 /* 0x2C */ s32 savedSongName;
643} MusicSettings; // size = 0x30
644
645typedef struct MusicProximityTrigger {
646 /* 0x00 */ VecXZf pos;
647 /* 0x08 */ f32 innerDist;
648 /* 0x0C */ f32 outerDist;
649 /* 0x10 */ s32 unk;
650 /* 0x14 */ s32 manualActivationFlag;
651} MusicProximityTrigger; // size = 0x18
652
653typedef struct StatusBar {
654 /* 0x00 */ s32 hpIconHIDs[2];
655 /* 0x08 */ s32 fpIconHIDs[2];
656 /* 0x10 */ s32 coinIconHID;
657 /* 0x14 */ s32 coinSparkleHID;
658 /* 0x18 */ s32 spIconHID;
659 /* 0x1C */ s32 spShineHID;
660 /* 0x20 */ s32 hpTimesHID;
661 /* 0x24 */ s32 fpTimesHID;
662 /* 0x28 */ s32 spTimesHID;
663 /* 0x2C */ s32 coinTimesHID;
664 /* 0x30 */ s32 starIconHID;
665 /* 0x34 */ s16 drawPosX; // base position of the whole bar
666 /* 0x36 */ s16 drawPosY; // base position of the whole bar, animated when it appears
667 /* 0x38 */ s16 showTimer;
668 /* 0x3A */ b8 hidden;
669 /* 0x3B */ b8 unk_3B;
670 /* 0x3C */ b8 unk_3C;
671 /* 0x3D */ s8 displayHP;
672 /* 0x3E */ s8 displayFP;
673 /* 0x3F */ char unk_3F;
674 /* 0x40 */ s16 displayCoins;
675 /* 0x42 */ s16 displayStarpoints;
676 /* 0x44 */ s8 ignoreChanges; /* set != 0 to prevent automatic opening from HP/FP changes */
678 /* 0x45 */ s8 alwaysShown; // when set, the status bar will always be shown. used while browsing a shop.
679 /* 0x47 */ s8 disabled; /* set != 0 for menu to be disabled completely */
680 /* 0x48 */ s16 displayStarPower;
681 /* 0x4A */ s8 hpBlinking; /* bool */
682 /* 0x4B */ s8 hpBlinkCounter;
683 /* 0x4C */ s8 hpBlinkTimer; /* until stop */
684 /* 0x4D */ s8 fpBlinking; /* bool */
685 /* 0x4E */ s8 fpBlinkCounter;
686 /* 0x4F */ s8 fpBlinkTimer; /* until stop */
687 /* 0x50 */ s8 spBlinking;
688 /* 0x51 */ s8 spBlinkCounter;
689 /* 0x52 */ s8 starpointsBlinking; /* bool */
691 /* 0x54 */ s8 coinsBlinking; /* bool */
692 /* 0x55 */ s8 coinsBlinkCounter;
693 /* 0x56 */ s8 coinsBlinkTimer; /* until stop */
694 /* 0x57 */ s8 unk_57;
695 /* 0x58 */ s8 unk_58;
696 /* 0x59 */ s8 unk_59;
697 /* 0x5A */ s8 spBarsToBlink; /* how many sp bars to blink */
698 /* 0x5B */ char unk_5B;
699 /* 0x5C */ s32 coinCountTimesHID;
700 /* 0x60 */ s32 coinCountIconHID;
701 /* 0x64 */ s32 iconIndex12;
702 /* 0x68 */ s32 iconIndex13;
703 /* 0x6C */ s8 coinCounterHideTime;
704 /* 0x6D */ s8 unk_6D;
705 /* 0x6E */ s8 unk_6E;
706 /* 0x6F */ char unk_6F;
707} StatusBar; // size = 0x70
708
709typedef struct CameraInitData {
710 /* 0x00 */ s16 flags;
711 /* 0x02 */ s8 updateMode;
712 /* 0x03 */ char unk_03;
713 /* 0x04 */ s16 viewWidth;
714 /* 0x06 */ s16 viewHeight;
715 /* 0x08 */ s16 viewStartX;
716 /* 0x0A */ s16 viewStartY;
717 /* 0x0C */ s16 nearClip;
718 /* 0x0E */ s16 farClip;
719 /* 0x10 */ s16 vfov;
720} CameraInitData; // size = 0x12;
721
722typedef struct CameraControlSettings {
723 /* 0x00 */ s32 type;
724 /* 0x04 */ f32 boomLength;
725 /* 0x08 */ f32 boomPitch;
726 union {
727 struct {
728 f32 Ax;
729 f32 Ay;
730 f32 Az;
731 f32 Bx;
732 f32 By;
733 f32 Bz;
734 } two;
735 struct {
736 f32 Ax;
737 f32 Cx;
738 f32 Az;
739 f32 Bx;
740 f32 Cz;
741 f32 Bz;
742 } three;
744 /* 0x24 */ f32 viewPitch;
745 /* 0x28 */ b32 flag;
746} CameraControlSettings; // size = 0x2C
747
748typedef struct Camera {
749 /* 0x000 */ u16 flags;
750 /* 0x002 */ s16 moveFlags;
751 /* 0x004 */ s16 updateMode;
752 /* 0x006 */ b16 needsInit;
753 /* 0x008 */ b16 needsReinit; // used when loading from a save point or calling SetCamPerspective
754 /* 0x00A */ s16 viewportW;
755 /* 0x00C */ s16 viewportH;
756 /* 0x00E */ s16 viewportStartX;
757 /* 0x010 */ s16 viewportStartY;
758 /* 0x012 */ s16 nearClip;
759 /* 0x014 */ s16 farClip;
760 /* 0x018 */ f32 vfov;
761 union {
762 struct {
763 s16 zoomPercent;
764 } world;
765 struct {
766 s16 dist;
767 s16 offsetY;
768 s16 pitch;
769 s16 yaw;
770 s16 fovScale; // 100 --> vfov = 25, scales as 1/x so larger values mean smaller vfov
771 s16 zoomPercent;
772 b16 skipRecalc;
773 } basic;
774 struct {
775 s16 dist;
776 s16 offsetY;
777 s16 pitch;
778 s16 yaw;
779 } interp;
780 struct {
781 s16 dist;
782 s16 offsetY;
783 s16 pitch;
784 s16 minRadius;
785 } radial;
786 struct {
787 s16 dist;
788 s16 offsetY;
789 s16 xLimit;
790 s16 zLimit;
791 } confined;
793 /* 0x02C */ s16 bgColor[3];
794 /* 0x032 */ Vec3s targetScreenCoords; // screen coords corresponding to targetPos
795 /* 0x038 */ u16 perspNorm;
796 /* 0x03C */ Vec3f lookAt_eye; // used to construct the view matrix
797 /* 0x048 */ Vec3f lookAt_obj; // used to construct the view matrix
799 /* 0x060 */ Vec3f targetPos; // target for camera rig, often but not necessarily the player position
800 /* 0x06C */ f32 curYaw;
801 /* 0x070 */ f32 interpYaw; // no camera mode actually uses this for interpolation
802 /* 0x078 */ f32 curBoomLength;
803 /* 0x074 */ f32 curBoomPitch;
804 /* 0x084 */ f32 curBoomYaw;
805 /* 0x07C */ f32 targetOffsetY;
806 /* 0x088 */ f32 targetBoomYaw; // only used by CAM_UPDATE_UNUSED_RADIAL
807 /* 0x090 */ f32 lookAt_yaw;
808 /* 0x094 */ f32 lookAt_pitch;
809 /* 0x0A0 */ Vp vp;
810 /* 0x0B0 */ Vp vpAlt;
812 /* 0x114 */ Matrix4f mtxViewPlayer; // centers on player
813 /* 0x154 */ Matrix4f mtxViewLeading; // leads player slightly
814 /* 0x194 */ Matrix4f mtxViewShaking; // used while ShakeCam is active
815 /* 0x1FC */ void (*fpDoPreRender)(struct Camera*);
816 /* 0x200 */ void (*fpDoPostRender)(struct Camera*);
817 /* 0x204 */ Mtx* mtxBillboard; // rotation matrix created from -curBoomYaw
820 /* 0x44C */ CameraRig prevRig;
821 /* 0x468 */ CameraRig nextRig;
822 /* 0x484 */ f32 interpAlpha;
823 /* 0x488 */ f32 linearInterp;
824 /* 0x48C */ f32 linearInterpRate;
825 /* 0x490 */ f32 moveSpeed;
826 /* 0x494 */ f32 yinterpGoal;
827 /* 0x498 */ f32 yinterpAlpha;
828 /* 0x49C */ f32 yinterpRate; // smaller is faster; not valid for values less than 1.0, unstable below 0.5
829 /* 0x4A0 */ f32 yinterpCur;
830 /* 0x4A4 */ Vec3f prevTargetPos;
831 /* 0x4B0 */ Vec3f movePos;
832 /* 0x4C8 */ Vec3f prevMovePos;
836 /* 0x4D6 */ b16 prevUseOverride;
838 /* 0x506 */ b16 panActive;
839 /* 0x508 */ f32 interpEasingParameter; // controls whether easing for camera rig interpolation is more cosine-like (values near 0) or quadratic (values near 1)
840 /* 0x50C */ f32 leadAmount;
841 /* 0x510 */ f32 targetLeadAmount;
842 /* 0x514 */ f32 leadInterpAlpha;
843 /* 0x518 */ f32 accumulatedStickLead;
844 /* 0x51C */ s32 increasingLeadInterp;
845 /* 0x520 */ f32 leadAmtScale;
846 /* 0x524 */ f32 prevLeadPosX;
847 /* 0x528 */ f32 prevLeadPosZ;
848 /* 0x52C */ s32 leadConstrainDir;
851 /* 0x550 */ f32 unusedLeadAmt;
852 /* 0x554 */ s16 unusedLeadCounter;
853 /* 0x556 */ s16 unusedLeadDir;
854} Camera; // size = 0x558
855
856typedef struct BattleStatus {
857 /* 0x000 */ s32 flags1;
858 /* 0x004 */ s32 flags2;
859 /* 0x008 */ union {
860 /* */ s32 varTable[16];
861 /* */ f32 varTableF[16];
862 /* */ void* varTablePtr[16];
863 /* */ };
864 /* 0x048 */ s8 curSubmenu;
865 /* 0x049 */ s8 unk_49;
866 /* 0x04A */ s8 curPartnerSubmenu;
867 /* 0x04B */ s8 unk_4B;
868 /* 0x04C */ s8 lastPlayerMenuSelection[16];
869 /* 0x05C */ s8 lastPartnerMenuSelection[16];
870 /* 0x06C */ s16 cancelTargetMenuSubstate; // might be more generally for returning from nested 'inner' state
871 /* 0x06E */ s16 acceptTargetMenuSubstate; // might be more generally for returning from nested 'inner' state
872 /* 0x070 */ s16 enabledMenusFlags; // zero'd bits will be unavailable, used only for tutorial battles
873 /* 0x072 */ char unk_72[2];
874 /* 0x074 */ s32 enabledStarPowersFlags; // zero'd bits will be unavailable, used only for tutorial battles
875 /* 0x078 */ s8 totalStarPoints;
876 /* 0x079 */ s8 pendingStarPoints; /* how many to add */
877 /* 0x07A */ s8 incrementStarPointDelay; /* related to star points, set to 0x28 when they are dropped */
878 /* 0x07B */ u8 damageTaken;
879 /* 0x07C */ s8 changePartnerAllowed;
880 /* 0x07D */ s8 menuStatus[4];
881 /* 0x081 */ s8 actionSuccess;
882 /* 0x082 */ char unk_82;
883 /* 0x083 */ s8 actionCommandMode;
884 /* 0x084 */ s8 actionQuality; // actionCommandVar1 ?
885 /* 0x085 */ s8 unk_85; // actionCommandVar2 ?
886 /* 0x086 */ s8 actionResult; // see enum ActionResult
887 /* 0x087 */ s8 blockResult; // see enum BlockResult
888 /* 0x088 */ s8 itemUsesLeft; /* set to 2 for double dip, 3 for triple dip */
889 /* 0x089 */ s8 hpDrainCount;
890 /* 0x08A */ s8 nextMerleeSpellType;
891 /* 0x08B */ s8 hustleTurns; /* numTurns from hustle drink, normally 0 */
892 /* 0x08C */ s8 stateFreezeCount;
893 /* 0x08D */ s8 endBattleFadeOutRate;
894 /* 0x08E */ s8 initialEnemyCount; /* used for SP award bonus */
895 /* 0x08F */ char unk_8F[1];
896 /* 0x090 */ s16 unk_90;
897 /* 0x092 */ s8 reflectFlags;
898 /* 0x093 */ s8 unk_93;
899 /* 0x094 */ s8 unk_94;
900 /* 0x095 */ s8 waitForState;
901 /* 0x096 */ s8 hammerCharge;
902 /* 0x097 */ s8 jumpCharge;
903 /* 0x098 */ char unk_98;
904 /* 0x099 */ u8 rushFlags; /* 1 = mega rush, 2 = power rush */
905 /* 0x09A */ s8 outtaSightActive;
906 /* 0x09B */ s8 turboChargeTurnsLeft;
907 /* 0x09C */ u8 turboChargeAmount; /* unused? */
908 /* 0x09D */ s8 waterBlockTurnsLeft;
909 /* 0x09E */ u8 waterBlockAmount; /* unused? */
910 /* 0x09F */ char unk_9F;
911 /* 0x0A0 */ struct EffectInstance* waterBlockEffect;
912 /* 0x0A4 */ s8 cloudNineTurnsLeft;
913 /* 0x0A5 */ s8 cloudNineDodgeChance; /* = 50/101 ≈ 49.5% */
914 /* 0x0A6 */ char unk_A6[2];
915 /* 0x0A8 */ struct EffectInstance* cloudNineEffect;
916 /* 0x0AC */ s8 merleeAttackBoost;
917 /* 0x0AD */ s8 merleeDefenseBoost;
918 /* 0x0AE */ s8 hammerLossTurns;
919 /* 0x0AF */ s8 jumpLossTurns;
920 /* 0x0B0 */ s8 itemLossTurns;
921 /* 0x0B1 */ char unk_B1[3];
924 /* 0x0BC */ struct Evt* controlScript; /* control handed over to this when changing partners */
925 /* 0x0C0 */ s32 controlScriptID;
926 /* 0x0C4 */ struct Evt* camMovementScript;
927 /* 0x0C8 */ s32 camMovementScriptID;
929 /* 0x0D8 */ struct Actor* playerActor;
930 /* 0x0DC */ struct Actor* partnerActor;
931 /* 0x0E0 */ struct Actor* enemyActors[MAX_ENEMY_ACTORS];
932 /* 0x140 */ s16 enemyIDs[MAX_ENEMY_ACTORS];
933 /* 0x170 */ s8 nextEnemyIndex; /* (during enemy turn) who should go next */
934 /* 0x171 */ s8 numEnemyActors;
935 /* 0x172 */ s16 activeEnemyActorID; /* (during enemy turn) enemy currently using their move */
936 /* 0x174 */ struct Actor* curTurnEnemy;
937 /* 0x178 */ s8 moveCategory;
938 /* 0x179 */ char unk_179;
939 /* 0x17A */ s16 moveArgument; // argument provided for move; can be hammer/boots level, itemID, etc
940 /* 0x17C */ s16 selectedMoveID;
941 /* 0x17E */ s16 curAttackDamage;
942 /* 0x180 */ s16 lastAttackDamage;
943 /* 0x182 */ char unk_182[2];
944 /* 0x184 */ s32 curTargetListFlags; /* set when creating a target list, also obtain from the flags field of moves */
945 /* 0x188 */ s32 curAttackElement;
947 /* 0x190 */ s32 curAttackStatus;
948 /* 0x194 */ u8 statusChance;
949 /* 0x195 */ s8 statusDuration;
950 /* 0x196 */ char unk_196;
951 /* 0x197 */ s8 sampleTargetHomeIndex;
952 /* 0x198 */ s8 powerBounceCounter;
953 /* 0x199 */ s8 wasStatusInflicted; /* during last attack */
954 /* 0x19A */ u8 curDamageSource;
955 /* 0x19B */ char unk_19B[5];
956 /* 0x1A0 */ s16 curTargetID; /* selected? */
957 /* 0x1A2 */ s8 curTargetPart; /* selected? */
958 /* 0x1A3 */ char unk_1A3;
959 /* 0x1A4 */ s16 curTargetID2;
960 /* 0x1A6 */ s8 curTargetPart2;
961 /* 0x1A7 */ s8 battlePhase;
962 /* 0x1A8 */ s16 attackerActorID;
963 /* 0x1AA */ s16 unk_1AA;
964 /* 0x1AC */ s8 unk_1AC;
965 /* 0x1AD */ char unk_1AD;
966 /* 0x1AE */ s16 submenuIcons[24]; /* icon IDs */
967 /* 0x1DE */ u8 submenuMoves[24]; /* move IDs */
968 /* 0x1F6 */ s8 submenuStatus[24];
969 /* 0x20E */ u8 submenuMoveCount;
970 /* 0x20F */ char unk_20F;
971 /* 0x210 */ s32 curButtonsDown;
972 /* 0x214 */ s32 curButtonsPressed;
973 /* 0x218 */ s32 curButtonsHeld;
974 /* 0x21C */ s32 stickX;
975 /* 0x220 */ s32 stickY;
976 /* 0x224 */ s32 inputBitmask;
977 /* 0x228 */ s32 stickAngle; /* 0-360 */
978 /* 0x22C */ s32 stickMagnitude; /* 0-60 */
979 /* 0x230 */ s32 holdInputBuffer[64];
980 /* 0x330 */ s32 pushInputBuffer[64];
981 /* 0x430 */ s8 holdInputBufferPos;
982 /* 0x431 */ s8 inputBufferPos;
983 /* 0x432 */ s8 darknessMode;
984 /* 0x433 */ u8 unk_433;
985 /* 0x434 */ s32* actionCmdDifficultyTable;
986 /* 0x438 */ struct Stage* curStage;
987 /* 0x43C */ struct EffectInstance* buffEffect;
988 /* 0x440 */ u8 tattleFlags[28];
989 /* 0x45C */ char unk_45C[4];
990} BattleStatus; // size = 0x460
991
992typedef struct TextureHeader {
993 /* 0x00 */ s8 name[32];
994 /* 0x20 */ u16 auxW;
995 /* 0x22 */ u16 mainW;
996 /* 0x24 */ u16 auxH;
997 /* 0x26 */ u16 mainH;
998 /* 0x28 */ u8 isVariant;
999 /* 0x29 */ u8 extraTiles; // 0 - none, 1 - mipmap, 2 - ?, 3 - use aux tile
1000 /* 0x2A */ u8 auxCombineType : 6;
1001 /* 0x2A */ u8 auxCombineSubType : 2;
1002 /* 0x2B */ u8 auxFmt : 4;
1003 /* 0x2B */ u8 mainFmt : 4;
1004 /* 0x2C */ u8 auxBitDepth : 4;
1005 /* 0x2C */ u8 mainBitDepth : 4;
1006 /* 0x2D */ u8 auxWrapW : 4;
1007 /* 0x2D */ u8 mainWrapW : 4;
1008 /* 0x2E */ u8 auxWrapH : 4;
1009 /* 0x2E */ u8 mainWrapH : 4;
1010 /* 0x2F */ u8 filtering;
1011} TextureHeader; // size = 0x30
1012
1013typedef struct MoveData {
1014 /* 0x00 */ s32 nameMsg;
1015 /* 0x04 */ s32 flags;
1016 /* 0x08 */ s32 shortDescMsg;
1017 /* 0x0C */ s32 fullDescMsg;
1018 /* 0x10 */ s8 category;
1019 /* 0x11 */ s8 costFP;
1020 /* 0x12 */ s8 costBP;
1021 /* 0x13 */ u8 actionTip;
1022} MoveData; // size = 0x14
1023
1024typedef struct Collider {
1025 /* 0x00 */ s32 flags;
1026 /* 0x04 */ s16 nextSibling;
1027 /* 0x06 */ s16 firstChild;
1028 /* 0x08 */ s16 parentModelIndex;
1029 /* 0x0A */ s16 numTriangles;
1031 /* 0x10 */ union {
1032 struct ColliderBoundingBox* aabb;
1033 struct CameraControlSettings* camSettings;
1034 };
1035 /* 0x14 */ s16 numVertices;
1036 /* 0x16 */ char unk_16[2];
1037 /* 0x18 */ Vec3f* vertexTable; // contains local and global coordinates
1038} Collider; // size = 0x1C
1039
1040typedef struct CollisionData {
1041 /* 0x00 */ Vec3f* vertices;
1043 /* 0x08 */ union {
1044 struct ColliderBoundingBox* aabbs;
1045 struct CameraControlSettings* camSettings;
1046 };
1047 /* 0x0C */ s16 numColliders;
1048 /* 0x0E */ char unk_0E[2];
1049} CollisionData; // size = 0x10
1050
1051typedef struct AnimatorNode {
1052 /* 0x00 */ Gfx* displayList;
1053 /* 0x04 */ struct AnimatorNode* children[32];
1054 /* 0x84 */ Vec3f basePos; // ?
1055 /* 0x90 */ Vec3f pos;
1056 /* 0x9C */ Vec3f rot;
1057 /* 0xA8 */ Vec3f scale;
1058 /* 0xB4 */ Matrix4f mtx;
1059 /* 0xF4 */ s16 flags;
1060 /* 0xF6 */ s16 uniqueIndex;
1061 /* 0xF8 */ s16 vertexStartOffset;
1062 /* 0xFA */ char unk_FA[2];
1063 /* 0xFC */ union {
1064 /* */ s32 modelID;
1065 /* */ Vtx* vtxList;
1066 /* */ } fcData;
1067} AnimatorNode; // size = 0x100
1068
1070 /* 0x00 */ void* displayList;
1071 /* 0x04 */ Vec3f basePos;
1072 /* 0x10 */ Vec3f rot;
1073 /* 0x1C */ char unk_1C[0x4];
1074} AnimatorNodeBlueprint; // size = 0x20
1075
1076typedef struct StaticAnimatorNode {
1077 /* 0x00 */ void* displayList; // sometimes StaticAnimatorNode*, sometimes Gfx*???
1078 /* 0x04 */ Vec3s rot; /* range = -180,180 */
1079 /* 0x0A */ char unk_0A[0x2];
1080 /* 0x0C */ Vec3f pos;
1081 /* 0x18 */ struct StaticAnimatorNode* sibling;
1082 /* 0x1C */ struct StaticAnimatorNode* child;
1083 /* 0x20 */ s16 vertexStartOffset;
1084 /* 0x22 */ char unk_22[0x2];
1085 /* 0x24 */ Vtx* vtxList;
1086 /* 0x28 */ s16 modelID;
1087 /* 0x2A */ char unk_2A[0x2];
1088} StaticAnimatorNode; // size = 0x2C
1089
1090typedef struct ModelAnimator {
1091 /* 0x000 */ u32 flags;
1092 /* 0x004 */ s8 renderMode;
1093 /* 0x005 */ char unk_05[3];
1094 /* 0x008 */ s16* animReadPos;
1095 /* 0x00C */ s16* savedReadPos;
1097 /* 0x014 */ AnimatorNode* nodeCache[0x7A];
1098 /* 0x08E */ u8 nextUniqueID;
1099 /* 0x08F */ u8 staticNodeIDs[0x7A]; // ?
1100 /* 0x109 */ char unk_08F[0x1];
1101 /* 0x10A */ f32 nextUpdateTime;
1102 /* 0x10E */ f32 timeScale;
1103 /* 0x112 */ Mtx mtx;
1104 /* 0x152 */ void* baseAddr;
1105 /* 0x156 */ s16* animationBuffer;
1108 /* 0x346 */ s32 treeIndexPos;
1109 /* 0x34A */ s32 savedTreePos;
1110 /* 0x34E */ void (*fpRenderCallback)(void*);
1111 /* 0x352 */ void* renderCallbackArg;
1112 /* 0x356 */ char unk_2DC[4];
1113} ModelAnimator; // size = 0x35A
1114
1116
1117typedef struct ColliderBoundingBox {
1118 /* 0x00 */ Vec3f min;
1119 /* 0x0C */ Vec3f max;
1120 /* 0x18 */ s32 flagsForCollider;
1121} ColliderBoundingBox; // size = 0x1C
1122
1123typedef struct ItemData {
1124 /* 0x00 */ s32 nameMsg;
1125 /* 0x04 */ s16 hudElemID;
1126 /* 0x06 */ s16 sortValue;
1127 /* 0x08 */ s32 targetFlags;
1128 /* 0x0C */ s16 sellValue;
1129 /* 0x0E */ char unk_0E[2];
1130 /* 0x10 */ s32 fullDescMsg;
1131 /* 0x14 */ s32 shortDescMsg;
1132 /* 0x18 */ s16 typeFlags;
1133 /* 0x1A */ u8 moveID;
1134 /* 0x1B */ s8 potencyA;
1135 /* 0x1C */ s8 potencyB;
1136 /* 0x1D */ char unk_1D[3];
1137} ItemData; // size = 0x20
1138
1139typedef struct ItemEntity {
1140 /* 0x00 */ s32 flags;
1141 /* 0x04 */ s16 boundVar;
1142 /* 0x06 */ s16 pickupMsgFlags;
1143 /* 0x08 */ Vec3f pos;
1145 /* 0x18 */ s16 itemID;
1146 /* 0x1A */ s8 state;
1147 /* 0x1B */ s8 spawnType;
1148 /* 0x1C */ u8 pickupDelay; /* num frames before item can be picked up */
1149 /* 0x1D */ s8 renderGroup;
1150 /* 0x1E */ s16 spawnAngle; /* if < 0, a random screen-relative angle is chosen: left or right */
1151 /* 0x20 */ s16 shadowIndex;
1152 /* 0x22 */ char unk_22[2];
1153 /* 0x24 */ s32* readPos;
1154 /* 0x28 */ s32* savedReadPos;
1155 /* 0x2C */ u8 lookupRasterIndex;
1156 /* 0x2D */ u8 lookupPaletteIndex;
1157 /* 0x2E */ u8 nextUpdate;
1158 /* 0x2F */ u8 alpha;
1159 /* 0x30 */ f32 scale;
1160 /* 0x34 */ Vec3s lastPos;
1161 /* 0x3A */ char unk_3A[2];
1162 /* 0x3C */ s32 sparkleNextUpdate;
1163 /* 0x40 */ s32* sparkleReadPos;
1164 /* 0x44 */ s32 sparkleUnk44;
1165 /* 0x48 */ s32* sparkleSavedPos;
1168 /* 0x54 */ s32 sparkleWidth;
1169 /* 0x58 */ s32 sparkleHeight;
1170} ItemEntity; // size = 0x5C
1171
1172#if VERSION_JP
1173#define PRINT_BUFFER_SIZE 1024
1174#else
1175#define PRINT_BUFFER_SIZE 1088 // slightly larger than source buffer
1176#endif
1177
1178typedef struct MessagePrintState {
1179 /* 0x000 */ u8* srcBuffer;
1180 /* 0x004 */ u16 printBufferPos;
1181 /* 0x006 */ char unk_06[2];
1182 /* 0x008 */ s32 msgID;
1183 /* 0x00C */ u16 srcBufferPos;
1184 /* 0x00E */ u16 curPrintDelay;
1186 /* 0x450 */ s16 printBufferSize;
1187 /* 0x452 */ u16 effectFrameCounter;
1188 /* 0x454 */ u8 font;
1189 /* 0x455 */ u8 fontVariant;
1190 /* 0x456 */ Vec2s windowOffsetPos; // offset from baseWindowPos. used to animated window pos?
1191 /* 0x45A */ Vec2s windowBasePos; // ex: set by the parameters for choice style
1192 /* 0x45E */ u8 printDelayTime; // delay to print each chunk
1193 /* 0x45F */ u8 charsPerChunk; // how many chars to print at once
1194 /* 0x460 */ s32 curLinePos; // position along current line
1195 /* 0x464 */ u8 windowScrollRate;
1196 /* 0x465 */ char unk_465;
1197 /* 0x466 */ u16 nextLinePos; // ?
1198 /* 0x468 */ u8 lineCount;
1199 /* 0x469 */ char unk_469[0x3];
1200 /* 0x46C */ s32 unk_46C;
1201 /* 0x470 */ u8 curAnimFrame[4];
1202 /* 0x474 */ s16 animTimers[4];
1203 /* 0x47C */ u8 rewindArrowAnimState;
1204 /* 0x47D */ char unk_47D[0x1];
1205 /* 0x47E */ s16 rewindArrowCounter;
1206 /* 0x480 */ s16 rewindArrowSwingPhase;
1208 /* 0x486 */ u8 curLine;
1209 /* 0x487 */ u8 unkArraySize;
1210 /* 0x488 */ u16 lineEndPos[4];
1211 /* 0x490 */ char unk_490[0x38];
1212 /* 0x4C8 */ u16 unk_4C8;
1213 /* 0x4CA */ s16 unk_4CA;
1214 /* 0x4CC */ u16 unk_4CC;
1215 /* 0x4CE */ u8 maxOption;
1216 /* 0x4CF */ char unk_4CF[0x1];
1217 /* 0x4D0 */ u16 cursorPosX[6];
1218 /* 0x4DC */ u16 cursorPosY[6];
1219 /* 0x4E8 */ u8 curOption;
1220 /* 0x4E9 */ s8 madeChoice;
1221 /* 0x4EA */ u8 cancelOption;
1222 /* 0x4EB */ char unk_4EB[0x1];
1223 /* 0x4EC */ u8 targetOption;
1224 /* 0x4ED */ u8 scrollingTime;
1225 /* 0x4EE */ u8 selectedOption;
1226 /* 0x4EF */ char unk_4EF[0x9];
1227 /* 0x4F8 */ u8 windowState;
1228 /* 0x4F9 */ char unk_4F9[0x3];
1229 /* 0x4FC */ s32 stateFlags;
1230 /* 0x500 */ s16 delayFlags; // ?
1231 /* 0x502 */ char unk_502[0x2];
1232 /* 0x504 */ s32* closedWritebackBool; // if not null, writes 1 here when message closes
1233 /* 0x508 */ u8 style;
1234 /* 0x509 */ u8 fadeInCounter;
1235 /* 0x50A */ Vec2s initOpenPos; // where the message originates from, in screen-space coords
1237 /* 0x512 */ u8 fadeOutCounter;
1238 /* 0x513 */ char unk_513[0x1];
1239 /* 0x514 */ Vec2su windowSize;
1240 /* 0x518 */ s8 speechSoundType;
1241 /* 0x519 */ u8 volume;
1242 /* 0x51A */ u8 speechPan; // just pan?
1243 /* 0x51B */ char unk_51B[0x1];
1244 /* 0x51C */ u16 speechPitchShift;
1245 /* 0x51E */ char unk_51E[0x2];
1246 /* 0x520 */ s32 speechSoundIDA;
1247 /* 0x524 */ s32 speechSoundIDB;
1248 /* 0x528 */ u16 varBufferReadPos;
1249 /* 0x52A */ s8 unk_52A;
1250 /* 0x52B */ u8 curImageIndex;
1251 /* 0x52C */ Vec2su varImageScreenPos; // in addition, posX=0 is taken as 'dont draw'
1252 /* 0x530 */ u8 varImgHasBorder;
1253 /* 0x531 */ u8 varImgFinalAlpha;
1254 /* 0x532 */ u8 varImgAlphaFadeStep; // how much to fade in per frame
1255 /* 0x533 */ u8 varImageDisplayState; // 0 = fade in, 1 = fully visible, 2 = fade out
1256 /* 0x534 */ s16 varImageFadeTimer; // frames faded in
1257 /* 0x536 */ s16 msgHeight;
1258 /* 0x538 */ u16 msgWidth;
1259 /* 0x53A */ s8 maxLineChars;
1260 /* 0x53B */ s8 numLines;
1261 /* 0x53C */ u8 maxLinesPerPage;
1262 /* 0x53D */ char unk_53D[0x3];
1263 /* 0x540 */ f32 sizeScale;
1268#if !VERSION_JP
1269 /* 0x554 */ char unk_554[0x4];
1270#endif
1271} MessagePrintState; // size = 0x558, JP size = 0x514
1272
1273typedef struct MessageDrawState {
1274 /* 0x00 */ s32 clipX[2]; // characters beyond this pos get skipped
1275 /* 0x08 */ s32 clipY[2]; // characters beyond this pos get skipped
1276 /* 0x10 */ Vec2f msgScale;
1277 /* 0x18 */ Vec2f charScale;
1278 /* 0x20 */ s32 drawBufferPos; // msg gets printed here and read for display
1279 /* 0x24 */ s16 savedPos[2];
1280 /* 0x28 */ u8 savedColor;
1281 /* 0x29 */ u8 unk_29;
1282 /* 0x2A */ char unk_2A[0x1];
1283 /* 0x2B */ u8 framePalette;
1284 /* 0x2C */ s8 unk_2C;
1285 /* 0x2D */ u8 unk_2D;
1286 /* 0x2E */ u8 centerPos;
1287 /* 0x2F */ char unk_2F[0x1];
1288 /* 0x30 */ s32 visiblePrintedCount;
1289 /* 0x34 */ u16 printModeFlags; // C0 = center, 10 = drawing image
1290 /* 0x36 */ char unk_36[0x2];
1291 /* 0x38 */ u32 effectFlags;
1292 /* 0x3C */ u16 font; // 0 or 1
1293 /* 0x3E */ u16 fontVariant;
1294 /* 0x40 */ u8 curPosX;
1295 /* 0x41 */ char unk_41;
1296 /* 0x42 */ s16 nextPos[2];
1297 /* 0x46 */ s16 textStartPos[2]; // relative to textbox
1298 /* 0x4A */ s16 textColor;
1299 /* 0x4C */ u8* printBuffer;
1300 /* 0x50 */ u8 nextCounter; // related to closing mssages and cmd FA
1301 /* 0x51 */ char unk_51[0x3];
1302} MessageDrawState; // size = 0x54
1303
1304typedef struct MessageCharData {
1305 /* 0x0 */ IMG_PTR raster;
1306 /* 0x4 */ u8* charWidthTable;
1307 /* 0x8 */ u8 monospaceWidth;
1308 /* 0x9 */ u8 baseHeightOffset;
1309 /* 0xA */ char unk_0A[0x2];
1310} MessageCharData; // size = 0xC
1311
1312typedef struct MessageCharset {
1313 /* 0x0 */ Vec2bu texSize;
1314 /* 0x2 */ s8 unk_02;
1315 /* 0x3 */ u8 newLineY;
1316 /* 0x4 */ u16 charRasterSize; // in bytes
1317 /* 0x6 */ char unk_06[0x2];
1319} MessageCharset; // size = 0xA;
1320
1321typedef struct MesasgeFontGlyphData {
1322 /* 0x0 */ IMG_PTR raster;
1323 /* 0x4 */ PAL_PTR palette;
1324 /* 0x8 */ Vec2bu texSize;
1325 /* 0xA */ u8 charWidth;
1326 /* 0xB */ u8 charHeight;
1327} MesasgeFontGlyphData; // size = 0xC
1328
1329typedef struct MessageImageData {
1330 /* 0x00 */ IMG_PTR raster;
1331 /* 0x04 */ PAL_PTR palette;
1332 /* 0x08 */ u16 width;
1333 /* 0x0A */ u16 height;
1334 /* 0x0C */ s32 format;
1335 /* 0x10 */ s32 bitDepth;
1336} MessageImageData; // size = 0x14
1337
1338typedef struct MessageNumber {
1339 /* 0x00 */ IMG_PTR rasters;
1340 /* 0x04 */ u8 texSize;
1341 /* 0x05 */ u8 texWidth;
1342 /* 0x06 */ u8 texHeight;
1343 /* 0x07 */ u8 digitWidth[10];
1344 /* 0x11 */ u8 fixedWidth;
1345 /* 0x12 */ char unk_12[0x2];
1346} MessageNumber; // size = 0x14
1347
1348typedef struct ShopItemEntity {
1349 /* 0x00 */ s32 index;
1350 /* 0x04 */ Vec3f pos;
1351} ShopItemEntity; // size = 0x10
1352
1353typedef struct ShopOwner {
1354 /* 0x00 */ s32 npcID;
1355 /* 0x04 */ s32 idleAnim;
1356 /* 0x08 */ s32 talkAnim;
1357 /* 0x0C */ EvtScript* onBuyEvt;
1360 /* 0x18 */ s32* shopMsgIDs;
1361} ShopOwner;
1362
1363typedef struct ShopItemLocation {
1364 /* 0x0 */ u16 posModelID;
1365 /* 0x2 */ u16 triggerColliderID;
1366} ShopItemLocation; // size = 0x4
1367
1368typedef struct ShopItemData {
1369 /* 0x0 */ u32 itemID;
1370 /* 0x4 */ s32 price;
1371 /* 0x8 */ s32 descMsg;
1372} ShopItemData; // size = 0xC
1373
1374typedef struct ShopSellPriceData {
1375 /* 0x0 */ s32 itemID;
1376 /* 0x4 */ s32 sellPrice;
1377 /* 0x8 */ char unk_08[0x4];
1378} ShopSellPriceData; // size = 0xC
1379
1380typedef struct GameStatus {
1381 /* 0x000 */ u32 curButtons[4];
1382 /* 0x010 */ u32 pressedButtons[4]; /* bits = 1 for frame of button press */
1383 /* 0x020 */ u32 heldButtons[4]; /* bits = 1 every 4th frame during hold */
1384 /* 0x030 */ u32 prevButtons[4]; /* from previous frame */
1385 /* 0x040 */ s8 stickX[4]; /* with deadzone */
1386 /* 0x044 */ s8 stickY[4]; /* with deadzone */
1387 /* 0x048 */ s16 unk_48[4];
1388 /* 0x050 */ s16 unk_50[4];
1389 /* 0x058 */ s16 unk_58;
1390 /* 0x05A */ char unk_5A[6];
1391 /* 0x060 */ s16 unk_60;
1392 /* 0x062 */ char unk_62[6];
1393 /* 0x068 */ s16 demoButtonInput;
1394 /* 0x06A */ s8 demoStickX;
1395 /* 0x06B */ s8 demoStickY;
1396 /* 0x06C */ s32 mainScriptID;
1397 /* 0x070 */ s8 context;
1398 /* 0x071 */ s8 demoState; // see DemoState enum
1399 /* 0x072 */ s8 nextDemoScene; /* which part of the demo to play next */
1400 /* 0x073 */ u8 contBitPattern;
1401 /* 0x074 */ s8 debugEnemyContact;
1402 /* 0x075 */ s8 debugQuizmo;
1403 /* 0x076 */ b8 debugUnused1;
1404 /* 0x077 */ b8 debugUnused2;
1405 /* 0x078 */ s8 debugScripts;
1406 /* 0x079 */ char unk_79;
1407 /* 0x07A */ b8 musicEnabled;
1408 /* 0x07B */ char unk_7B;
1411 /* 0x07E */ u8 peachFlags; // see PeachFlags enum
1412 /* 0x07F */ s8 peachDisguise; // see PeachDisguises enum
1413 /* 0x080 */ u8 peachBakingIngredient;
1416 /* 0x084 */ s8 playerSpriteSet;
1417 /* 0x085 */ char unk_85;
1418 /* 0x086 */ s16 areaID;
1419 /* 0x088 */ s16 prevArea;
1420 /* 0x08A */ b16 didAreaChange;
1421 /* 0x08C */ s16 mapID;
1422 /* 0x08E */ s16 entryID;
1423 /* 0x090 */ u16 unk_90;
1424 /* 0x092 */ u16 unk_92;
1425 /* 0x094 */ f32 exitTangent;
1426 /* 0x098 */ Vec3f playerPos;
1427 /* 0x0A4 */ f32 playerYaw;
1428 /* 0x0A8 */ s8 introPart;
1429 /* 0x0A9 */ s8 unk_A9;
1430 /* 0x0AA */ s8 demoBattleFlags;
1431 /* 0x0AB */ u8 soundOutputMode;
1432 /* 0x0AC */ s8 startupState; // used for various startup states like logos, title screen, intro, and demo
1433 /* 0x0AD */ s8 logoTime;
1434 /* 0x0AE */ b8 skipLogos;
1435 /* 0x0AF */ s8 titleScreenTimer;
1437 /* 0x0B1 */ char unk_B1[0x5];
1438 /* 0x0B6 */ s16 screenColorA;
1439 /* 0x0B8 */ s16 screenColorR;
1440 /* 0x0BA */ s16 screenColorG;
1441 /* 0x0BC */ s16 screenColorB;
1442 /* 0x0BE */ char unk_BE[94];
1445 /* 0x134 */ u16 frameCounter;
1446 /* 0x136 */ char unk_136[2];
1447 /* 0x138 */ u32 nextRNG;
1448 /* 0x13C */ s16 unk_13C;
1449 /* 0x13E */ char unk_13E[2];
1451 /* 0x144 */ struct Shop* mapShop;
1452 /* 0x148 */ s16 backgroundFlags;
1453 /* 0x14A */ s16 backgroundMinX;
1454 /* 0x14C */ s16 backgroundMinY;
1455 /* 0x14E */ s16 backgroundMaxX;
1456 /* 0x150 */ s16 backgroundMaxY;
1457 /* 0x152 */ s16 backgroundXOffset; /* (used for parallax scroll) */
1460 /* 0x15C */ u16 backgroundDarkness; // 255 = fully black
1461 /* 0x15E */ s16 savedBackgroundDarkness; // used during pause/unpause
1462 /* 0x160 */ Vec3s savedPos;
1463 /* 0x166 */ u8 saveSlot;
1464 /* 0x167 */ u8 loadType; /* (0 = from map, 1 = from main menu) */
1465 /* 0x168 */ u32 saveCount;
1466 /* 0x16C */ char unk_16C[12];
1467} GameStatus; // size = 0x178
1468
1469typedef union PartnerAnimations {
1470 /* 0x00 */ s32 anims[9]; // see enum PartnerAnimIndices
1471 struct {
1472 /* 0x00 */ s32 still;
1473 /* 0x04 */ s32 walk;
1474 /* 0x08 */ s32 jump;
1475 /* 0x0C */ s32 fall;
1476 /* 0x10 */ s32 fly;
1477 /* 0x14 */ s32 idle;
1478 /* 0x18 */ s32 run;
1479 /* 0x1C */ s32 talk;
1480 /* 0x20 */ s32 hurt;
1481 };
1482} PartnerAnimations; // size = 0x24
1483
1484typedef s32 (*PushBlockFallCallback)(Entity* block, Evt* script);
1485typedef struct PushBlockGrid {
1486 /* 0x00 */ u8* cells;
1487 /* 0x04 */ u8 numCellsX;
1488 /* 0x05 */ u8 numCellsZ;
1489 /* 0x06 */ char unk_06[2];
1490 /* 0x08 */ Vec3i centerPos;
1491 /* 0x14 */ PushBlockFallCallback(dropCallback);
1492 /* 0x18 */ char unk_18[4];
1493} PushBlockGrid; // size = 0x1C
1494
1496 /* 0x00 */ f32 verticalVel;
1497 /* 0x04 */ f32 gravity; /* 2 = normal, 1 = low gravity, higher values never 'settle' */
1498 /* 0x08 */ f32 collisionRadius;
1499 /* 0x0C */ f32 constVel;
1500 /* 0x10 */ f32 velX;
1501 /* 0x14 */ f32 velZ;
1502 /* 0x18 */ f32 moveAngle;
1503 /* 0x1C */ s32 timeLeft;
1505} ItemEntityPhysicsData; // size = 0x24
1506
1507typedef struct RenderTask {
1508 /* 0x00 */ s32 renderMode;
1509 /* 0x04 */ s32 dist; /* value between 0 and -10k */
1510 /* 0x08 */ void* appendGfxArg;
1511 /* 0x0C */ void (*appendGfx)(void*);
1512} RenderTask; // size = 0x10
1513
1514typedef struct SelectableTarget {
1515 /* 0x00 */ s16 actorID;
1516 /* 0x02 */ s16 partID;
1517 /* 0x04 */ Vec3s truePos; // position where the cursor will be drawn
1518 /* 0x0A */ Vec3s sortPos; // effective position used for sorting, includes priority-based x offsets
1519 /* 0x10 */ s8 priorityOffset;
1520 /* 0x11 */ s8 column; // from xpos --> 0-3
1521 /* 0x12 */ s8 row; // from ypos --> 0-3
1522 /* 0x13 */ s8 layer; // from zpos --> 0-1
1523} SelectableTarget; // size = 0x14
1524
1525typedef struct ActorPartMovement {
1526 /* 0x00 */ Vec3f absolutePos;
1527 /* 0x0C */ Vec3f goalPos;
1528 /* 0x18 */ Vec3f unk_18;
1529 /* 0x24 */ f32 jumpScale;
1530 /* 0x28 */ f32 moveSpeed;
1531 /* 0x2C */ f32 unk_2C;
1532 /* 0x30 */ f32 angle;
1533 /* 0x34 */ f32 dist;
1534 /* 0x38 */ s16 moveTime;
1535 /* 0x3A */ s16 unk_3A;
1536 /* 0x3C */ s32 unk_3C;
1537 /* 0x40 */ char unk_40[0xC];
1538 /* 0x4C */ union {
1539 /* */ s32 varTable[16];
1540 /* */ f32 varTableF[16];
1541 /* */ void* varTablePtr[16];
1542 /* */ };
1543
1544} ActorPartMovement; // size = 0x8C
1545
1546typedef struct ActorPartBlueprint {
1547 /* 0x00 */ s32 flags;
1548 /* 0x04 */ s8 index;
1549 /* 0x05 */ Vec3b posOffset;
1551 /* 0x0A */ s16 opacity;
1552 /* 0x0C */ s32* idleAnimations;
1553 /* 0x10 */ s32* defenseTable;
1554 /* 0x14 */ s32 eventFlags;
1555 /* 0x18 */ s32 elementImmunityFlags;
1557 /* 0x1E */ char unk_1E[2];
1558 /* 0x20 */ s32 overrideNameMsg; // name when this part is targeted; overrides name from actor type
1559} ActorPartBlueprint; // size = 0x24
1560
1561typedef struct ActorPart {
1562 /* 0x00 */ s32 flags;
1563 /* 0x04 */ s32 targetFlags; /* initialized to 0 */
1565 /* 0x0C */ struct ActorPart* nextPart;
1566 /* 0x10 */ struct ActorPartMovement* movement;
1567 /* 0x14 */ Vec3s partOffset;
1570 /* 0x2C */ Vec3f absolutePos;
1571 /* 0x38 */ Vec3f rot;
1573 /* 0x4A */ char unk_4A[2];
1574 /* 0x4C */ Vec3f scale;
1575 /* 0x58 */ Vec3f curPos;
1576 /* 0x64 */ f32 yaw;
1577 /* 0x68 */ s16 palAnimPosOffset[2]; // used by some palette animations to slightly adjust the screen position
1579 /* 0x70 */ s16 targetPriorityOffset;
1580 /* 0x72 */ Vec2bu size;
1581 /* 0x74 */ s8 verticalStretch;
1583 /* 0x77 */ char unk_77[1];
1584 /* 0x78 */ u32* defenseTable;
1585 /* 0x7C */ s32 eventFlags;
1586 /* 0x80 */ s32 elementalImmunities; // bits from Elements, i.e., ELEMENT_FIRE | ELEMENT_QUAKE
1587 /* 0x84 */ s32 spriteInstanceID;
1588 /* 0x88 */ u32 curAnimation;
1589 /* 0x8C */ s32 animNotifyValue;
1590 /* 0x90 */ f32 animationRate;
1591 /* 0x94 */ u32* idleAnimations;
1592 /* 0x98 */ s16 opacity;
1593 /* 0x9A */ char unk_9A[2];
1594 /* 0x9C */ s32 shadowIndex;
1595 /* 0xA0 */ f32 shadowScale;
1596 /* 0xA4 */ s32 partTypeData[6];
1597 /* 0xBC */ s16 actorTypeData2b[2];
1598 /* 0xC0 */ struct DecorationTable* decorationTable; /* initialized to 0 */
1599} ActorPart; // size = 0xC4
1600
1601typedef struct ColliderTriangle {
1602 /* 0x00 */ Vec3f* v1; /* note: the order of v1,2,3 is reversed from the ijk in the hit file */
1603 /* 0x04 */ Vec3f* v2;
1604 /* 0x08 */ Vec3f* v3;
1605 /* 0x0C */ Vec3f e13; /* = v3 - v1 */
1606 /* 0x18 */ Vec3f e21; /* = v1 - v2 */
1607 /* 0x24 */ Vec3f e32; /* = v2 - v3 */
1608 /* 0x30 */ Vec3f normal;
1609 /* 0x3C */ s16 oneSided; /* 1 = yes, 0 = no */
1610 /* 0x3E */ char unk_3E[2];
1611} ColliderTriangle; // size = 0x40
1612
1613typedef struct FontRasterSet {
1614 /* 0x00 */ u8 sizeX;
1615 /* 0x01 */ u8 sizeY;
1616 /* 0x02 */ char unk_02[10];
1617} FontRasterSet; // size = 0x0C
1618
1619typedef struct CollisionStatus {
1620 /* 0x00 */ s16 pushingAgainstWall; /* FFFF = none for all below VVV */
1621 /* 0x02 */ s16 curFloor; /* valid on touch */
1622 /* 0x04 */ s16 lastTouchedFloor; /* valid after jump */
1623 /* 0x06 */ s16 floorBelow;
1624 /* 0x08 */ s16 curCeiling; /* valid on touching with head */
1625 /* 0x0A */ s16 curInspect; /* associated with TRIGGER_WALL_PRESS_A */
1626 /* 0x0C */ s16 unk_0C; /* associated with TRIGGER_FLAG_2000 */
1627 /* 0x0E */ s16 unk_0E; /* associated with TRIGGER_FLAG_4000 */
1628 /* 0x10 */ s16 unk_10; /* associated with TRIGGER_FLAG_8000 */
1629 /* 0x12 */ s16 curWall;
1630 /* 0x14 */ s16 lastWallHammered; /* valid when smashing */
1631 /* 0x16 */ s16 touchingWallTrigger; /* 0/1 */
1632 /* 0x18 */ s16 bombetteExploded; /* 0 = yes, FFFF = no */
1633 /* 0x1A */ char unk_1A[2];
1635} CollisionStatus; // size = 0x28
1636
1637typedef struct DecorFireTrail {
1638 /* 0x00 */ s16 scale;
1640
1641typedef struct DecorGoldenFlames {
1642 /* 0x00 */ s16 scaleX;
1643 /* 0x02 */ s16 scaleY;
1644 /* 0x04 */ s16 offsetX;
1646
1647typedef struct DecorRedFlames {
1648 /* 0x00 */ s16 scaleX;
1649 /* 0x02 */ s16 scaleY;
1650 /* 0x04 */ s16 alpha;
1651 /* 0x06 */ s16 offsetZ;
1652 /* 0x08 */ s16 unused1;
1653 /* 0x0A */ s16 unused2;
1654 /* 0x0C */ s16 unused3;
1656
1657typedef struct DecorBowserAura {
1658 /* 0x00 */ s16 scaleX;
1659 /* 0x02 */ s16 scaleY;
1660 /* 0x04 */ s16 alpha;
1661 /* 0x06 */ s16 offsetZ;
1663
1664typedef struct DecorDataSparkles {
1665 /* 0x00 */ s16 spawnInterval;
1667
1668typedef struct DecorDataStars {
1669 /* 0x00 */ s16 scalePct;
1670 /* 0x02 */ s16 offsetY;
1672
1673// data for any type of decoration can be stored here
1683
1684#define MAX_ACTOR_DECORATIONS 2
1685#define ACTOR_BLUR_FRAMES 16
1686
1687typedef struct DecorationTable {
1689 /* 0x6C0 */ s8 paletteAdjustment;
1690 /* 0x6C1 */ b8 resetPalAdjust;
1691 /* 0x6C2 */ s8 palAnimState;
1692 /* 0x6C3 */ char unk_6C3[5];
1693 /* 0x6C8 */ s16 nextPalTime;
1694 /* 0x6CA */ s16 palBlendAlpha;
1697 /* 0x6CE */ char unk_6CE[2];
1699 /* 0x6D4 */ PAL_PTR adjustedPalettes[27];
1700 /* 0x740 */ s16 blendPalA; // can be either palette or palset index
1701 /* 0x742 */ s16 blendPalB; // can be either palette or palset index
1702 /* 0x744 */ s16 palswapTimeHoldA;
1703 /* 0x746 */ s16 palswapTimeAtoB;
1704 /* 0x748 */ s16 palswapTimeHoldB;
1705 /* 0x74A */ s16 palswapTimeBtoA;
1706 /* 0x74C */ s16 palswapUnused1; // presumably palswapTimeHoldC for unimplemented triple cycling (A->B->C->A)
1707 /* 0x74E */ s16 palswapUnused2; // presumably palswapTimeCtoA for unimplemented triple cycling (A->B->C->A)
1708 /* 0x750 */ s8 glowState;
1710 /* 0x752 */ s8 glowUnk1;
1711 /* 0x753 */ char pad753[5];
1712 /* 0x758 */ s16 glowUnk2;
1713 /* 0x75A */ s16 glowUnk3;
1714 /* 0x75C */ s16 glowPhase;
1715 /* 0x75E */ char pad75E[6];
1716 /* 0x764 */ s8 flashState;
1717 /* 0x765 */ s8 flashStateChanged;
1718 /* 0x766 */ s8 flashMode;
1719 /* 0x767 */ s8 flashFramesLeft;
1720 /* 0x768 */ u8 flashEnabled;
1721 /* 0x769 */ char unk_769[3];
1722 /* 0x76C */ PAL_PTR flashPalettes[16];
1723 /* 0x78C */ char unk_7AC[0x2C];
1724 /* 0x7D8 */ s8 blurUnused;
1725 /* 0x7D9 */ s8 blurBufferPos;
1726 /* 0x7DA */ s8 blurDrawCount;
1727 /* 0x7DB */ s8 blurEnableCount;
1728 /* 0x7DC */ s16 yaw[ACTOR_BLUR_FRAMES];
1729 /* 0x7FC */ s16 posX[ACTOR_BLUR_FRAMES];
1730 /* 0x81C */ s16 posY[ACTOR_BLUR_FRAMES];
1731 /* 0x83C */ s16 posZ[ACTOR_BLUR_FRAMES];
1734 /* 0x87C */ u8 rotX[ACTOR_BLUR_FRAMES];
1735 /* 0x88C */ u8 rotY[ACTOR_BLUR_FRAMES];
1736 /* 0x89C */ u8 rotZ[ACTOR_BLUR_FRAMES];
1737 /* 0x8AC */ s8 blurDisableDelay; // infinite when zero
1738 /* 0x8AD */ char unk_8AD[3];
1739 /* substruct for decorations? */
1745 /* 0x8C2 */ char unk_8C0[4];
1747} DecorationTable; // size = 0x8E8
1748
1749typedef struct PlayerPathElement {
1750 /* 0x00 */ b8 isJumping;
1751 /* 0x03 */ char unk_01[3];
1752 /* 0x04 */ Vec3f pos;
1753} PlayerPathElement; // size = 0x10
1754
1755typedef struct LavaReset {
1756 /* 0x00 */ s32 colliderID;
1757 /* 0x04 */ Vec3f pos;
1758} LavaReset; // size = 0x10;
1759
1760typedef struct BombTrigger {
1761 /* 0x00 */ Vec3f pos;
1762 /* 0x0C */ f32 diameter; // effective 'size' of the object, usually set to zero because bombettes explosion radius is large enough
1763} BombTrigger; // size = 0x10;
1764
1765typedef struct AnimatedModel {
1766 /* 0x00 */ s32 animModelID;
1767 /* 0x04 */ Vec3f pos;
1768 /* 0x10 */ Vec3f rot;
1769 /* 0x1C */ Vec3f scale;
1770 /* 0x28 */ Mtx mtx;
1771 /* 0x68 */ s16* curAnimData;
1772 /* 0x6C */ char unk_6C[4];
1773} AnimatedModel; // size = 0x70
1774
1776
1777typedef struct CollisionHeader {
1778 /* 0x00 */ s16 numColliders;
1779 /* 0x02 */ char unk_02[2];
1780 /* 0x04 */ s32 treeOffset;
1781 /* 0x08 */ s16 numVerts;
1782 /* 0x0A */ char unk_0A[2];
1783 /* 0x0C */ s32 triangleTableOffset;
1784 /* 0x10 */ s16 bbTableSize;
1785 /* 0x12 */ char unk_12[2];
1786 /* 0x14 */ s32 bbTableOffset;
1787 /* 0x18 */ char unk_18[8];
1788} CollisionHeader; // size = 0x20
1789
1790typedef struct ActorMovement {
1791 /* 0x00 */ Vec3f curPos;
1792 /* 0x0C */ Vec3f goalPos;
1793 /* 0x18 */ Vec3f unk_18;
1794 /* 0x24 */ char unk_24[0x18];
1795 /* 0x3C */ f32 acceleration;
1796 /* 0x40 */ f32 speed;
1797 /* 0x44 */ f32 vel;
1798 /* 0x48 */ f32 angle;
1799 /* 0x4C */ f32 dist;
1800 /* 0x50 */ f32 flyElapsed;
1801 /* 0x54 */ char unk_11C[4];
1802 /* 0x58 */ s16 flyTime;
1803 /* 0x5A */ s16 flyArcAmplitude;
1804} ActorMovement; // size = 0x5C;
1805
1806// a single link of a chain chomp's chain
1807typedef struct ChompChain {
1808 /* 0x00 */ Vec3f curPos;
1809 /* 0x0C */ f32 unk_0C;
1810 /* 0x10 */ f32 unk_10;
1811 /* 0x14 */ f32 gravAccel;
1812 /* 0x18 */ f32 velY;
1813 /* 0x1C */ f32 settleAmt;
1814 /* 0x20 */ f32 settleRate;
1815 /* 0x24 */ f32 outerLinkLen;
1816 /* 0x28 */ f32 innerLinkLen;
1817 /* 0x2C */ f32 linkLengthZ;
1818} ChompChain; // size = 0x30
1819
1820typedef struct ActorState { // TODO: Make the first field of this an ActorMovement
1821 /* 0x00 */ Vec3f curPos;
1822 /* 0x0C */ Vec3f goalPos;
1823 /* 0x18 */ Vec3f unk_18;
1824 /* 0x24 */ f32 unk_24;
1825 /* 0x28 */ f32 unk_28;
1826 /* 0x2C */ f32 unk_2C;
1827 /* 0x30 */ Vec3f velStep;
1828 /* 0x3C */ f32 acceleration;
1829 /* 0x40 */ f32 speed;
1830 /* 0x44 */ f32 vel;
1831 /* 0x48 */ f32 angle;
1832 /* 0x4C */ f32 dist;
1833 /* 0x50 */ f32 bounceDivisor;
1834 /* 0x54 */ char unk_54[0x4];
1835 /* 0x58 */ s32 animJumpRise;
1836 /* 0x5C */ s32 animJumpFall;
1837 /* 0x60 */ s32 animJumpLand;
1838 /* 0x64 */ s16 moveTime;
1839 /* 0x66 */ s16 moveArcAmplitude;
1840 /* 0x68 */ char unk_68[3];
1841 /* 0x6B */ u8 jumpPartIndex;
1842 /* 0x6C */ union {
1843 /* */ s32 functionTemp[4];
1844 /* */ f32 functionTempF[4];
1845 /* */ void* functionTempPtr[4];
1846 /* */ };
1847 /* 0x7C */ union {
1848 /* */ s32 varTable[16];
1849 /* */ f32 varTableF[16];
1850 /* */ void* varTablePtr[16];
1851 /* */ };
1852} ActorState; // size = 0xBC;
1853
1854typedef struct Actor {
1855 /* 0x000 */ s32 flags;
1856 /* 0x004 */ s32 flags2;
1857 /* 0x008 */ struct ActorBlueprint* actorBlueprint;
1858 /* 0x00C */ ActorState state;
1859 /* 0x0C8 */ ActorMovement fly;
1860 /* 0x124 */ char unk_124[16];
1861 /* 0x134 */ u8 unk_134;
1862 /* 0x135 */ u8 footStepCounter;
1863 /* 0x136 */ u8 actorType;
1864 /* 0x137 */ char unk_137;
1865 /* 0x138 */ Vec3f homePos;
1866 /* 0x144 */ Vec3f curPos;
1867 /* 0x150 */ Vec3s headOffset;
1868 /* 0x156 */ Vec3s healthBarPos;
1869 /* 0x15C */ Vec3f rot;
1871 /* 0x16E */ char unk_16E[2];
1872 /* 0x170 */ Vec3f scale;
1873 /* 0x17C */ Vec3f scaleModifier; /* multiplies normal scale factors componentwise */
1874 /* 0x188 */ f32 scalingFactor;
1875 /* 0x18C */ f32 yaw;
1876 /* 0x190 */ Vec2bu size;
1877 /* 0x192 */ s16 actorID;
1881 /* 0x19A */ s8 verticalRenderOffset; // visual only, does not affect target position
1882 /* 0x19B */ char unk_19B[1];
1883 /* 0x19C */ s32 actorTypeData1[6]; /* 4 = jump sound, 5 = attack sound */ // TODO: struct
1884 /* 0x1B4 */ s16 actorTypeData1b[2];
1885 /* 0x1B8 */ s16 curHP;
1886 /* 0x1BA */ s16 maxHP;
1887 /* 0x1BC */ s8 healthFraction; /* used to render HP bar */
1888 /* 0x1BD */ char unk_1BD[3];
1889 /* 0x1C0 */ EvtScript* idleSource;
1893 /* 0x1D0 */ struct Evt* idleScript;
1894 /* 0x1D4 */ struct Evt* takeTurnScript;
1895 /* 0x1D8 */ struct Evt* handleEventScript;
1896 /* 0x1DC */ struct Evt* handlePhaseScript;
1897 /* 0x1E0 */ s32 idleScriptID;
1898 /* 0x1E4 */ s32 takeTurnScriptID;
1899 /* 0x1E8 */ s32 handleEventScriptID;
1901 /* 0x1F0 */ s8 lastEventType;
1902 /* 0x1F1 */ s8 turnPriority;
1903 /* 0x1F2 */ s8 enemyIndex; /* actorID = this | 200 */
1904 /* 0x1F3 */ s8 numParts;
1905 /* 0x1F4 */ struct ActorPart* partsTable;
1906 /* 0x1F8 */ s16 lastDamageTaken;
1907 /* 0x1FA */ s16 hpChangeCounter;
1908 /* 0x1FC */ s16 damageCounter;
1909 /* 0x1FE */ char unk_1FE[2];
1911 /* 0x204 */ s8 actionRatingCombo;
1912 /* 0x205 */ s8 actionRatingTime;
1913 /* 0x206 */ s8 healthBarHideTime;
1914 /* 0x207 */ s8 extraCoinBonus;
1915 /* 0x208 */ s8 instigatorValue; // from the enemy which initiated the encounter if this actor is first in the formation. allows that enemy to pass information to its actor.
1916 /* 0x209 */ char unk_209[3];
1917 /* 0x20C */ s32* statusTable;
1918 /* 0x210 */ s8 debuff;
1919 /* 0x211 */ s8 debuffDuration;
1920 /* 0x212 */ s8 staticStatus; /* 0B = yes */
1921 /* 0x213 */ s8 staticDuration;
1922 /* 0x214 */ s8 stoneStatus; /* 0C = yes */
1923 /* 0x215 */ s8 stoneDuration;
1924 /* 0x216 */ s8 koStatus; /* 0D = yes */
1925 /* 0x217 */ s8 koDuration;
1926 /* 0x218 */ s8 transparentStatus; /* 0E = yes */
1927 /* 0x219 */ s8 transparentDuration;
1928 /* 0x21A */ char unk_21A[2];
1929 /* 0x21C */ s8 statusAfflicted;
1930 /* 0x21D */ s8 disableDismissTimer;
1931 /* 0x21E */ s16 unk_21E;
1932 /* 0x220 */ b8 isGlowing; // also used for goombario charge amount
1933 /* 0x221 */ s8 attackBoost;
1934 /* 0x222 */ s8 defenseBoost;
1935 /* 0x223 */ s8 chillOutAmount; /* attack reduction */
1936 /* 0x224 */ s8 chillOutTurns;
1937 /* 0x225 */ char unk_225[3];
1938 /* 0x228 */ struct EffectInstance* icePillarEffect;
1940 /* 0x40C */ s8 targetListLength;
1941 /* 0x40D */ s8 targetIndexList[MAX_ENEMY_ACTORS]; /* into targetData */
1942 /* 0x425 */ s8 selectedTargetIndex; /* into target index list */
1943 /* 0x426 */ s8 targetPartID;
1944 /* 0x427 */ char unk_427[1];
1945 /* 0x428 */ s16 targetActorID;
1946 /* 0x42A */ char unk_42A[2];
1947 /* 0x42C */ union {
1948 /* */ struct Shadow* ptr;
1949 /* */ s32 id;
1950 /* 0x42C */ } shadow;
1951 /* 0x430 */ f32 shadowScale; /* = actor size / 24.0 */
1952 /* 0x434 */ s16 renderMode; /* initially 0xD, set to 0x22 if any part is transparent */
1953 /* 0x436 */ s16 hudElementDataIndex;
1954 /* 0x438 */ s32 loopingSoundID[2];
1955 /* 0x440 */ struct EffectInstance* disableEffect;
1956} Actor; // size = 0x444
1957
1958typedef struct BackgroundHeader {
1959 /* 0x00 */ IMG_PTR raster;
1960 /* 0x04 */ PAL_PTR palette;
1961 /* 0x08 */ u16 startX;
1962 /* 0x0A */ u16 startY;
1963 /* 0x0C */ u16 width;
1964 /* 0x0E */ u16 height;
1965} BackgroundHeader; // size = 0x10
1966
1967typedef struct FontData {
1968 /* 0x00 */ char unk_00[24];
1969} FontData; // size = 0x18
1970
1971typedef struct SlideParams {
1972 /* 0x00 */ f32 heading;
1973 /* 0x04 */ f32 maxDescendAccel;
1974 /* 0x08 */ f32 launchVel;
1975 /* 0x0C */ f32 maxDescendVel;
1976 /* 0x10 */ f32 integrator[4];
1977} SlideParams; // size = 0x14
1978
1979typedef struct PlayerStatus {
1980 /* 0x000 */ s32 flags; // PlayerStatusFlags
1981 /* 0x004 */ u32 animFlags;
1982 /* 0x008 */ s16 curStateTime;
1983 /* 0x00A */ s8 shiverTime;
1984 /* 0x00B */ char unk_0B;
1985 /* 0x00C */ s8 peachDisguise;
1986 /* 0x00D */ s8 availableDisguiseType;
1987 /* 0x00E */ u8 curAlpha;
1988 /* 0x00F */ u8 prevAlpha;
1989 /* 0x010 */ s16 blinkTimer;
1990 /* 0x012 */ s16 moveFrames;
1992 /* 0x015 */ s8 inputDisabledCount; /* whether the C-up menu can appear */
1993 /* 0x016 */ Vec3s lastGoodPos;
1994 /* 0x01C */ Vec3f pushVel;
1995 /* 0x028 */ Vec3f pos;
1996 /* 0x034 */ Vec2f groundAnglesXZ; /* angles along X/Z axes of ground beneath player */
1997 /* 0x03C */ VecXZf jumpFromPos;
1998 /* 0x044 */ VecXZf landPos;
1999 /* 0x04C */ f32 jumpFromHeight;
2000 /* 0x050 */ f32 jumpApexHeight;
2001 /* 0x054 */ f32 curSpeed;
2002 /* 0x058 */ f32 walkSpeed;
2003 /* 0x05C */ f32 runSpeed;
2004 /* 0x060 */ s32 unk_60;
2005 /* 0x064 */ f32 overlapPushAmount;
2006 /* 0x068 */ f32 groundNormalPitch;
2007 /* 0x06C */ f32 maxJumpSpeed;
2008 /* 0x070 */ f32 gravityIntegrator[4]; // derivatives of y; 0 = velocity, 1 = accel, etc
2009 /* 0x080 */ f32 targetYaw;
2010 /* 0x084 */ f32 curYaw; // the direction of player input in world-space (not camera-relative)
2011 /* 0x088 */ f32 overlapPushYaw;
2012 /* 0x08C */ f32 pitch;
2013 /* 0x090 */ f32 flipYaw[4];
2014 /* 0x0A0 */ f32 heading;
2015 /* 0x0A4 */ AnimID trueAnimation;
2016 /* 0x0A8 */ f32 spriteFacingAngle; /* angle of sprite, relative to camera, from 0 to 180 */
2017 /* 0x0AC */ char unk_AC[4];
2018 /* 0x0B0 */ s16 colliderHeight;
2019 /* 0x0B2 */ s16 colliderDiameter;
2020 /* 0x0B4 */ s8 actionState;
2021 /* 0x0B5 */ s8 prevActionState;
2022 /* 0x0B6 */ s8 actionSubstate;
2023 /* 0x0B7 */ char unk_B7;
2024 /* 0x0B8 */ AnimID anim;
2025 /* 0x0BC */ u16 animNotifyValue;
2026 /* 0x0BE */ s8 renderMode;
2027 /* 0x0BF */ s8 hazardType;
2028 /* 0x0C0 */ s16 timeInAir;
2029 /* 0x0C2 */ s16 peakJumpTime; // frame of current jump when player Y velocity went from position to negative
2030 /* 0x0C4 */ s8 peachItemHeld;
2031 /* 0x0C5 */ s8 camResetDelay;
2032 /* 0x0C6 */ s16 interactingWithID;
2033 /* 0x0C8 */ Npc* encounteredNPC;
2034 /* 0x0CC */ s32 shadowID;
2036 /* 0x0D4 */ f32 spinRate;
2038 /* 0x0DC */ s32 curButtons;
2039 /* 0x0E0 */ s32 pressedButtons;
2040 /* 0x0E4 */ s32 heldButtons;
2041 /* 0x0E8 */ s32 stickAxis[2];
2042 /* 0x0F0 */ s32 curButtonsBuffer[10];
2043 /* 0x118 */ s32 pressedButtonsBuffer[10];
2044 /* 0x140 */ s32 heldButtonsBuffer[10];
2045 /* 0x168 */ s32 stickXBuffer[10];
2046 /* 0x190 */ s32 stickYBuffer[10];
2047 /* 0x1B8 */ s32 inputBufPos;
2048 /* 0x1BC */ char unk_1BC[196];
2049 /* 0x280 */ s8 poundImpactDelay; // governs period of immobility after landing a ground pound
2050 /* 0x281 */ char unk_281[7];
2051} PlayerStatus; // size = 0x288
2052
2053typedef struct Path {
2054 /* 0x00 */ s32 numVectors;
2055 /* 0x04 */ f32* lengths;
2057 /* 0x0C */ Vec3f* vectors;
2058 /* 0x10 */ s32 timeElapsed;
2059 /* 0x14 */ s32 timeLeft;
2060 /* 0x18 */ s32 easingType;
2061} Path; // size = 0x1C
2062
2063typedef struct {
2064 /* 0x00 */ u8 enabled;
2065 /* 0x01 */ u8 listStart;
2066 /* 0x02 */ u8 numCols;
2067 /* 0x03 */ u8 numRows;
2068 /* 0x04 */ s32 startIndex;
2069 /* 0x08 */ s32 count;
2070} PauseItemPage; // size = 0xC
2071
2072typedef struct PauseMapSpace {
2073 /* 0x00 */ Vec2s pos;
2074 /* 0x04 */ u8 parent;
2075 /* 0x05 */ u8 pathLength;
2076 /* 0x08 */ Vec2b* path;
2077 /* 0x0C */ s32 afterRequirement;
2078 /* 0x10 */ s32 id;
2079} PauseMapSpace; // size = 0x14
2080
2081typedef struct MenuPanel {
2082 /* 0x00 */ b8 initialized;
2083 /* 0x01 */ s8 col;
2084 /* 0x02 */ s8 row;
2085 /* 0x03 */ u8 selected; // usually set to the current value from gridData
2086 /* 0x04 */ s8 state; // filemenu: 0 = select, 1 = delete, 3 = copy from, 4 = copy to, all else = save
2087 /* 0x05 */ s8 numCols;
2088 /* 0x06 */ s8 numRows;
2089 /* 0x07 */ s8 numPages; // unsure
2090 /* 0x08 */ u8* gridData; // user value at each 3D grid point (page, row, col)
2091 /* 0x0C */ void (*fpInit)(struct MenuPanel*);
2092 /* 0x10 */ void (*fpHandleInput)(struct MenuPanel*);
2093 /* 0x14 */ void (*fpUpdate)(struct MenuPanel*);
2094 /* 0x18 */ void (*fpCleanup)(struct MenuPanel*);
2095} MenuPanel; // size = 0x1C
2096
2097typedef struct WindowBackground {
2098 /* 0x00 */ IMG_PTR imgData;
2099 /* 0x04 */ u8 fmt : 4;
2100 /* 0x04 */ u8 bitDepth : 4;
2101 /* 0x05 */ u8 width;
2102 /* 0x06 */ u8 height;
2103 /* 0x07 */ char unk_07[4];
2104 /* 0x0B */ s8 size;
2105} WindowBackground; // size = 0xC
2106
2107typedef struct WindowCorners {
2108 /* 0x00 */ IMG_PTR imgData;
2109 /* 0x04 */ u8 fmt : 4;
2110 /* 0x04 */ u8 bitDepth : 4;
2111 /* 0x05 */ Vec2bu size1;
2112 /* 0x07 */ Vec2bu size2;
2113 /* 0x09 */ Vec2bu size3;
2114 /* 0x0B */ Vec2bu size4;
2115 /* 0x0D */ char unk_0D[3];
2116} WindowCorners; // size = 0x10
2117
2118typedef struct WindowStyleCustom {
2121 /* 0x1C */ char unk_1C[0x4];
2122 /* 0x20 */ Gfx opaqueCombineMode; // used when alpha == 255
2123 /* 0x28 */ Gfx transparentCombineMode; // used when alpha < 255
2126} WindowStyleCustom; // size = 0x38;
2127
2132
2133typedef union {
2134 int i;
2135 void (*func)(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, f32* scaleX, f32* scaleY,
2136 f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity);
2138
2139typedef struct MenuWindowBP {
2140 /* 0x00 */ s8 windowID;
2141 /* 0x01 */ char unk_01;
2142 /* 0x02 */ Vec2s pos;
2143 /* 0x06 */ s16 width;
2144 /* 0x08 */ s16 height;
2145 /* 0x0A */ u8 priority;
2146 /* 0x0B */ char unk_0B;
2147 /* 0x0C */ void (*fpDrawContents)(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening);
2148 /* 0x10 */ MenuPanel* tab;
2149 /* 0x14 */ s8 parentID;
2150 /* 0x15 */ char unk_15[3];
2152 /* 0x1C */ u8 extraFlags;
2153 /* 0x1D */ char unk_1D[3];
2154 /* 0x20 */ WindowStyle style;
2155} MenuWindowBP; // size = 0x24;
2156
2157typedef struct {
2158 /* 0x00 */ u8 flags;
2159 /* 0x01 */ u8 priority; // lower priority rendered first
2160 /* 0x02 */ u8 originalPriority;
2161 /* 0x03 */ s8 parent;
2164 /* 0x0C */ Vec2s pos;
2165 /* 0x10 */ s16 width;
2166 /* 0x12 */ s16 height;
2167 /* 0x14 */ UNK_FUN_PTR(fpDrawContents);
2168 /* 0x18 */ void* drawContentsArg0;
2169 /* 0x1C */ u8 updateCounter;
2170 /* 0x1D */ char unk_1D[3];
2171} Window; // size = 0x20
2172
2173#if VERSION_JP
2174#define DISPLAYCONTEXT_GFX_COUNT 0x2000
2175#elif VERSION_IQUE
2176#define DISPLAYCONTEXT_GFX_COUNT 0x2200
2177#else
2178#define DISPLAYCONTEXT_GFX_COUNT 0x2080
2179#endif
2180
2181typedef struct {
2182 /* 0x00000 */ LookAt lookAt;
2183 /* 0x00020 */ Hilite hilite;
2184 /* 0x00030 */ Mtx camPerspMatrix[8]; // could only be length 4, unsure
2185 /* 0x00230 */ Gfx mainGfx[DISPLAYCONTEXT_GFX_COUNT];
2186 /* 0x10630 */ Gfx backgroundGfx[0x200]; // used by gfx_task_background
2187#if VERSION_PAL
2188 // TODO: find where this space belongs to
2189 s32 pad[0x300];
2190#endif
2191 /* 0x11630 */ Mtx matrixStack[0x200];
2192} DisplayContext; // size = 0x19630
2193
2194typedef struct PlayerSpinState {
2195 /* 0x00 */ s8 stopSoundTimer;
2196 /* 0x01 */ s8 hasBufferedSpin;
2197 /* 0x02 */ s8 hitWallTime; // incremented while blocked by a wall
2198 /* 0x03 */ s8 spinCountdown;
2199 /* 0x04 */ s32 prevActionState;
2203 /* 0x1C */ f32 inputMagnitude;
2204 /* 0x20 */ f32 spinRate;
2205 /* 0x24 */ f32 speedScale;
2206 /* 0x28 */ f32 frictionScale;
2207 /* 0x2C */ s16 initialSpinTime;
2208 /* 0x2E */ s16 fullSpeedSpinTime;
2209 /* 0x30 */ s32 spinSoundID;
2210} PlayerSpinState; // size = 0x34
2211
2212typedef struct TweesterPhysics {
2213 /* 0x00 */ s32 countdown;
2214 /* 0x04 */ s32 state;
2215 /* 0x08 */ s32 prevFlags;
2216 /* 0x0C */ f32 radius;
2217 /* 0x10 */ f32 angle;
2218 /* 0x14 */ f32 angularVel;
2219 /* 0x18 */ f32 liftoffVelPhase;
2220} TweesterPhysics; // size = 0x1C
2221
2222typedef struct PartnerStatus {
2223 /* 0x000 */ s8 partnerActionState;
2226 /* 0x003 */ s8 actingPartner;
2227 /* 0x004 */ s16 stickX;
2228 /* 0x006 */ s16 stickY;
2229 /* 0x008 */ s32 curButtons;
2230 /* 0x00C */ s32 pressedButtons;
2231 /* 0x010 */ s32 heldButtons;
2232 /* 0x014 */ s8 inputDisabledCount;
2233 /* 0x015 */ char unk_15[3];
2234 /* 0x018 */ Npc npc;
2235 /* 0x358 */ s32 unk_358;
2236 /* 0x35C */ char unk_35C[0x4];
2237} PartnerStatus; // size = 0x360
2238
2239typedef struct SpriteRasterInfo {
2240 /* 0x00 */ IMG_PTR raster;
2242 /* 0x08 */ s32 width;
2243 /* 0x0C */ s32 height;
2244} SpriteRasterInfo; // size = 0x10
2245
2246typedef struct KnockdownData {
2247 /* 0x00 */ s32 imgfxIdx;
2248 /* 0x04 */ s32 workerID;
2249 /* 0x08 */ s32 spriteIndex;
2250 /* 0x0C */ s32 rasterIndex;
2251 /* 0x10 */ Vec3f pos;
2252 /* 0x1C */ Vec3f rot;
2253 /* 0x28 */ Vec3f scale;
2254 /* 0x34 */ f32 width;
2255 /* 0x38 */ f32 height;
2256} KnockdownData; // size = 0x3C
2257
2258typedef struct VirtualEntity {
2259 /* 0x00 */ s32 entityModelIndex;
2260 /* 0x04 */ Vec3f pos;
2261 /* 0x10 */ Vec3f rot;
2262 /* 0x1C */ Vec3f scale;
2263 /* 0x28 */ Vec3f goalPos;
2264 /* 0x34 */ f32 moveDist;
2265 /* 0x38 */ f32 moveAngle;
2266 /* 0x3C */ f32 moveSpeed;
2267 /* 0x40 */ f32 jumpGravity;
2268 /* 0x44 */ f32 jumpVel;
2269 /* 0x48 */ f32 moveTime;
2270} VirtualEntity; // size = 0x4C
2271
2273
2274typedef void (*PopupMessageCallback)(void* popup);
2275
2276typedef struct PopupMessage {
2277 /* 0x00 */ s32 unk_00;
2281 /* 0x10 */ s16 active;
2282 /* 0x12 */ s16 messageIndex;
2283 /* 0x14 */ s16 duration;
2284 /* 0x16 */ s8 showMsgState;
2285 /* 0x17 */ s8 needsInit;
2286 /* 0x18 */ union {
2287 struct BonkData* bonk;
2288 struct HudStatusIcon* icons;
2290} PopupMessage; // size = 0x1C
2291
2292typedef struct HiddenPanelsData {
2293 /* 0x00 */ s8 tryFlipTrigger;
2294 /* 0x01 */ u8 panelsCount;
2295 /* 0x02 */ s8 activateISpy;
2296 /* 0x03 */ char unk_03[0x5];
2297 /* 0x08 */ f32 flipTriggerPosY;
2298 /* 0x0C */ char unk_0C[0x4];
2299} HiddenPanelsData; // size = 0x10
2300
2302 /* 0x00 */ s8 flags;
2303 /* 0x01 */ Color_RGB8 rgb;
2304 /* 0x04 */ Vec3f pos;
2305 /* 0x10 */ f32 falloff;
2306 /* 0x14 */ s8 unk_14;
2307 /* 0x15 */ char unk_15[0x3];
2308} SpriteShadingLightSource; // size = 0x18
2309
2310typedef struct SpriteShadingProfile {
2311 /* 0x00 */ u16 flags;
2312 /* 0x02 */ char unk_02[0x2];
2315 /* 0xAF */ u8 ambientPower; // ?
2316} SpriteShadingProfile; // size = 0xB0
2317
2318typedef struct ImgFXOverlayTexture {
2319 /* 0x00 */ IMG_PTR raster;
2320 /* 0x04 */ PAL_PTR palette;
2321 /* 0x08 */ u16 width;
2322 /* 0x0A */ u16 height;
2323 /* 0x0C */ s32 offsetX;
2324 /* 0x10 */ s32 offsetY;
2325 /* 0x14 */ Gfx* displayList;
2326} ImgFXOverlayTexture; // size = 0x18
2327
2328typedef struct ImgFXTexture {
2329 /* 0x00 */ IMG_PTR raster;
2330 /* 0x04 */ PAL_PTR palette;
2331 /* 0x08 */ u16 width;
2332 /* 0x0A */ u16 height;
2333 /* 0x0C */ s16 xOffset;
2334 /* 0x0E */ s16 yOffset;
2335 /* 0x10 */ u8 alpha;
2336 /* 0x11 */ char unk_11[3];
2337 /* 0x14 */ Gfx* dlist;
2338} ImgFXTexture; // size = 0x18
2339
2340typedef struct ImgFXWorkingTexture {
2341 /* 0x00 */ ImgFXTexture tex;
2342 /* 0x18 */ s16 unk_18;
2343 /* 0x1A */ char unk_1A[0x4];
2344 /* 0x1E */ s16 unk_1E;
2345 /* 0x20 */ char unk_20[0x4];
2346 /* 0x24 */ u8 alphaMultiplier;
2347} ImgFXWorkingTexture; // size = 0x25
2348
2349typedef struct SongUpdateEvent {
2350 /* 0x00 */ s32 songName;
2351 /* 0x04 */ s32 duration;
2352 /* 0x08 */ s32 startVolume;
2353 /* 0x0C */ s32 finalVolume;
2354 /* 0x10 */ s32 variation;
2355 /* 0x14 */ s32 unk14;
2356 /* 0x18 */ s32 unk18;
2357 /* 0x1C */ s32 unk1C; // may be fake
2358} SongUpdateEvent; // size = 0x1C or 0x20
2359
2360// unfortunately, cant use bitfield for this
2361// format: ABCC00DD
2362// A = playerID
2363// B = trackIndex
2364// C = musicEventID
2365// D = scriptSelector
2367
2368// allows Evt scripts to be triggered by BGM commands
2369typedef struct MusicEvent {
2370 s32 musicEventID; // user-defined, events will respond to BGM Trigger commands with matching ID
2372} MusicEvent;
2373
2374typedef struct ParadeNpcInfo {
2375 /* 0x00 */ u32 initialAnim;
2376 /* 0x04 */ AnimID* animList;
2377 /* 0x08 */ Vec3f pos;
2378 /* 0x14 */ f32 yaw;
2379} ParadeNpcInfo; // size = 0x18
2380
2381typedef struct CreditsEntry {
2382 /* 0x00 */ s32 msgID;
2383 /* 0x04 */ s32 posX;
2384 /* 0x08 */ s32 posY;
2385 /* 0x0C */ s32 palette;
2386 /* 0x10 */ s32 appearMode;
2387 /* 0x14 */ s32 appearTime;
2388 /* 0x18 */ s32 perCharDelayIn;
2389 /* 0x1C */ s32 holdMode;
2390 /* 0x20 */ s32 holdTime;
2391 /* 0x24 */ s32 vanishMode;
2392 /* 0x28 */ s32 vanishTime;
2393 /* 0x2C */ s32 perCharDelayOut;
2394 /* 0x30 */ s32 next;
2395 /* 0x34 */ s16 flags;
2396 /* 0x36 */ char pad_36[2];
2397} CreditsEntry; // size = 0x38
2398
2399typedef struct CreditsLine {
2400 /* 0x00 */ u8* message;
2401 /* 0x04 */ char unk_04[0x4];
2402 /* 0x08 */ s32 time;
2403 /* 0x0C */ s32 state;
2404 /* 0x10 */ s32 palette;
2405 /* 0x14 */ s32 msgWidth;
2406 /* 0x18 */ s32 appearMode;
2407 /* 0x1C */ s32 appearTime;
2408 /* 0x20 */ s32 perCharDelayIn;
2409 /* 0x24 */ char unk_24[0x10];
2410 /* 0x34 */ s32 holdMode;
2411 /* 0x38 */ s32 holdTime;
2412 /* 0x3C */ char unk_3C[0x10];
2413 /* 0x4C */ s32 vanishMode;
2414 /* 0x50 */ s32 vanishTime;
2415 /* 0x54 */ s32 perCharDelayOut;
2416 /* 0x58 */ char unk_58[0x10];
2417 /* 0x68 */ s32 posX;
2418 /* 0x6C */ s32 posY;
2419 /* 0x70 */ s16 flags;
2420 /* 0x72 */ char unk_72[2];
2421} CreditsLine; // size = 0x74
2422
2423typedef struct CreditsChar {
2424 /* 0x00 */ s32 charIndex;
2425 /* 0x04 */ s32 font;
2426 /* 0x08 */ s32 variation;
2427 /* 0x0C */ s32 palette;
2428 /* 0x10 */ s32 posX;
2429 /* 0x14 */ s32 posY;
2430 /* 0x18 */ s32 fadeInTime;
2431} CreditsChar; // size = unk
2432
2433typedef struct CreditsData {
2434 /* 0x00 */ u32 workerID;
2435 /* 0x04 */ CreditsLine lines[32];
2436} CreditsData; // size = 0x74
2437
2438typedef struct CreditsPairOffset {
2439 /* 0x00 */ u8 firstChar;
2440 /* 0x01 */ u8 secondChar;
2441 /* 0x02 */ s16 offset;
2442} CreditsPairOffset; // size = 0x4
2443
2444typedef struct PartnerDMAData {
2445 /* 0x00 */ u32 dmaStart;
2446 /* 0x04 */ u32 dmaEnd;
2447 /* 0x08 */ void* dmaDest;
2448 /* 0x0C */ struct ActorBlueprint* ActorBlueprint;
2449 /* 0x10 */ s32 y;
2450} PartnerDMAData; // size = 0x14
2451
2452typedef struct MsgVoice {
2453 /* 0x00 */ s32 voiceA;
2454 /* 0x04 */ s32 voiceB;
2455 /* 0x08 */ s32 pitchShift;
2456} MsgVoice; // size = 0x0C
2457
2458typedef struct Rect {
2459 /* 0x00 */ s32 ulx;
2460 /* 0x04 */ s32 uly;
2461 /* 0x08 */ s32 lrx;
2462 /* 0x0C */ s32 lry;
2463} Rect; // size = 0x10
2464
2465typedef struct LavaPiranhaVine {
2466 /* 0x000 */ Vec3f bonePos[9];
2467 /* 0x06C */ f32 boneRot[9];
2468 /* 0x090 */ s32 boneCount;
2469 /* 0x094 */ f32 boneLength;
2470 /* 0x098 */ Vec3f points[27];
2471 /* 0x1DC */ s32 numPoints;
2473
2474typedef struct SpeechBubbleData {
2475 /* 0x00 */ Npc* encounteredNPC;
2476 /* 0x04 */ Vec3f pos;
2477 /* 0x10 */ f32 yaw;
2478 /* 0x14 */ f32 scale;
2479 /* 0x18 */ s32 unk_18;
2480 /* 0x1C */ f32 unk_1C; //lastPosY?
2481 /* 0x20 */ s32 holdTime;
2482 /* 0x24 */ char unk_24[6];
2483 /* 0x2A */ u8 state;
2484 /* 0x2B */ u8 brightness;
2485} SpeechBubbleData; /* size = 0x2C */
2486
2487#endif
s16 equippedBadges[64]
s16 badges[128]
WindowCorners corners
char unk_209[3]
NpcHistoryPoint moveHistory[40]
struct PadlockData * padlock
Vec2b statusIconOffset
struct EffectInstance * disableEffect
struct Evt * handlePhaseScript
Bytecode * ptrNextLine
b8 keepUsingPartnerOnMapChange
Entity * EntityList[30]
s8 enableCollisionOverlapsCheck
struct StarBoxLauncherData * starBoxLauncher
struct StaticAnimatorNode * child
u8 stateFlags
struct Evt * parentScript
void(* ShadowCallback)(struct Shadow *)
u8 curOpcode
struct WoodenCrateData * crate
s8 availableDisguiseType
set in main map scripts
s16 savedBackgroundDarkness
struct StaticAnimatorNode * sibling
s32 * sparkleSavedPos
char unk_1BD[3]
EvtScript * scripts[4]
s32 * buffer
struct EffectInstance * attackResultEffect
Vec2b altViewportOffset
ActorPartBlueprint * staticData
char unk_21A[2]
struct Evt * takeTurnScript
char unk_58[0x10]
s32 coinCountTimesHID
char unk_16E[2]
char unk_19B[1]
Npc * NpcList[64]
DecorDataStars stars
s16 palAnimPosOffset[2]
struct EffectInstance * effect[2]
s8 actionRatingCombo
s32(* PushBlockFallCallback)(Entity *block, Evt *script)
s32 idleScriptID
#define MAX_NPC_DECORATIONS
u32 * idleAnimations
u16 * flashPalettes[16]
struct Evt * childScript
Mtx transformMatrix
s8 transparentStatus
char pad_33E[2]
u32 pressedButtons[4]
struct ActorPartMovement * movement
EvtScript * handleEventSource
EvtScript * onBuyEvt
#define NPC_BLUR_FRAMES
struct CymbalPlantData * cymbalPlant
s32 loopStartTable[8]
MessageCharData * rasters
struct BoardedFloorData * boardedFloor
Vec2b statusTextOffset
struct Shop * mapShop
s16 storedItems[32]
s16 whole[4][4]
PartnerData partners[12]
u8 groupFlags
s32 pressedButtonsBuffer[10]
EvtScript * idleSource
s16 displayStarpoints
Vec2b healthBarOffset
Evt * ScriptList[128]
char reserved[0xE8]
CreditsLine lines[32]
#define MAX_ACTOR_DECORATIONS
s8 disableDismissTimer
char unk_3C[0x10]
f32 shadowScale
s16 lastDamageTaken
char unk_1D[3]
struct BombableRockData * bombableRock
#define ACTOR_BLUR_FRAMES
struct ActorBlueprint * actorBlueprint
s32 elementalImmunities
s8 labelIndices[16]
s32 actorTypeData1[6]
s32 tradeEventStartTime
s16 targetPriorityOffset
s8 healthFraction
Vec2b projectileTargetOffset
void * labelPositions[16]
s8 selectedTargetIndex
s8 verticalRenderOffset
#define PRINT_BUFFER_SIZE
Vec3f playerGroundTraceNormal
Vec3f * vectors
Collider * colliderList
struct SwitchData * swtch
#define DISPLAYCONTEXT_GFX_COUNT
char unk_42A[2]
char unk_54[0x4]
u8 footStepCounter
Vec3s headOffset
WindowBackground background
Bytecode * ptrReadPos
u32 MusicEventTrigger
PopupMessageCallback updateFunc
struct Evt * blockingParent
s32 numVectors
struct Npc * npc
SpriteShadingLightSource sources[7]
f32 scalingFactor
s16 entityModelID
PopupMessageCallback renderUIFunc
s32 * flagArray
s32 loopCounterTable[8]
s32 switchBlockValue[8]
s8 switchDepth
struct Evt * idleScript
union Actor::@38 shadow
s8 extraCoinBonus
char unk_00[24]
s8 starpointsBlinkCounter
char unk_24[0x18]
ActorState state
struct EffectInstance * specialDecorationEffect
s32 partTypeData[6]
s16 damageCounter
struct Evt * handleEventScript
Vec3f partOffsetFloat
struct ActorPart * partsTable
union AnimatorNode::@29 fcData
s8 loopDepth
s32 takeTurnScriptID
Shadow * ShadowList[60]
s16 actorTypeData1b[2]
struct SelectableTarget targetData[24]
char unk_16C[12]
s32 partnerUsedTime[12]
Vec3s rotPivotOffset
char unk_B1[0x5]
EvtScript * handlePhaseSource
s32 timeElapsed
char unk_225[3]
s16 targetActorID
u16 actionCommandSuccesses
struct SuperBlockContentData * superBlockContent
Vec3f scaleModifier
s32(* EntityCallback)(struct Entity *)
struct SaveBlockData * saveBlock
s32 * array
#define PAL_PTR
struct EffectInstance * icePillarEffect
Vec3s healthBarPos
s32 loopingSoundID[2]
#define IMG_PTR
s8 chillOutAmount
AnimatedModel * AnimatedModelList[16]
char unk_427[1]
struct BlockData * block
struct HiddenPanelData * hiddenPanel
char unk_16[2]
s32 b32
Vec3f homePos
AnimID trueAnimation
Encoding back-facing sprite.
DecorFireTrail fireTrail
u16 copiedPalettes[2][27][16]
Vec2bu size
Worker * WorkerList[16]
s32 hpIconHIDs[2]
struct ItemEntityPhysicsData * physicsData
struct HeartBlockContentData * heartBlockContent
s32 handleEventScriptID
f32 Matrix4f[4][4]
struct SignpostData * signPost
s32 heldButtonsBuffer[10]
char unk_0E[2]
ShopItemEntity * shopItemEntities
SlideParams * slideParams
s32 unk_158
struct ActorBlueprint * ActorBlueprint
u16 * backgroundPalette
union Evt::@8 owner1
Initially -1.
s16 hudElementDataIndex
ActorMovement fly
Trigger * TriggerList[64]
#define PAL_BIN
struct SpinningFlowerData * spinningFlower
Bytecode * ptrSavedPos
EvtScript * unk_10Evt
EvtScript * takeTurnSource
struct AnimatorNode * children[32]
s32 varFlags[3]
s16 b16
Vec3f curPos
char unk_1FE[2]
Vec3s * vertexArray
PopupMessageCallback renderWorldFunc
Bytecode * ptrCurLine
Vec3f scale
u16 starPiecesCollected
DecorRedFlames redFlames
struct TrumpetPlantData * trumpetPlant
s8 targetIndexList[24]
s16 actorTypeData2b[2]
s8 instigatorValue
u16 * adjustedPalettes[27]
EvtScript * onTalkEvt
s16 hpChangeCounter
VirtualEntity * VirtualEntityList[0x40]
Vec3f * vertexTable
struct ColliderTriangle * triangleTable
DecorDataSparkles sparkles
s32 curButtonsBuffer[10]
union Evt::@9 owner2
Initially -1.
void(* PopupMessageCallback)(void *popup)
ApiStatus(* ApiFunc)(struct Evt *, s32)
void * userData
struct ArrowSignData * arrowSign
char unk_34[0x4]
char unk_124[16]
WindowStyleCustom * customStyle
s32 HitID
s8 switchBlockState[8]
Bytecode EvtScript[]
struct TweesterData * tweester
s8 b8
s32 easingType
f32 frameCounter
ModelAnimator * AnimatedMeshList[16]
s8 healthBarHideTime
Bytecode * ptrFirstLine
s8 targetListLength
f32 gravityIntegrator[4]
FollowAnims * anims
f32 timeScale
struct PinkFlowerData * pinkFlower
s8 statusAfflicted
char unk_04[0x4]
s32 partnerUnlockedTime[12]
struct ActorPart * nextPart
struct DecorationTable * decorationTable
char unk_24[0x10]
u16 actionCommandAttempts
struct ChestData * chest
s32 prevFlags
Partner npc flags before contact with Tweester.
s8 staticDuration
struct HeapNode * next
s16 keyItems[32]
s32 * statusTable
char unk_1BC[196]
char unk_BE[94]
ApiFunc callFunction
Vec3f * staticVectorList
s8 debuffDuration
s32 fpIconHIDs[2]
Vec3s rotPivotOffset
void NoArgCallback(void *)
struct MunchlesiaData * munchlesia
struct SimpleSpringData * simpleSpring
DecorationData decorData[2]
struct ShatteringBlockData * shatteringBlock
s16 frac[4][4]
char pad_2BA[2]
u32 AnimID
union CameraControlSettings::@14 points
s8 transparentDuration
s16 vertexSegment
s16 invItems[10]
s32 handleBatttlePhaseScriptID
s8 index
Current blur ring buffer index.
Vec3f playerGroundTraceAngles
DecorGoldenFlames goldenFlames
union PopupMessage::@39 data
f32 * lengths
DecorBowserAura bowserAura
struct BlueWarpPipeData * bluePipe
s8 actionRatingTime
Vec3f scale
u8 priority
Ring buffer of an NPC's position over the past 20 frames.
s8 flags
Definition demo_api.c:15
s32 ApiStatus
Definition evt.h:115
s32 Bytecode
Definition evt.h:7
Definition npc.h:294
#define MAX_ENEMY_ACTORS
Definition macros.h:83
#define MAX_ANIMATED_MODELS
Definition macros.h:85
#define MAX_ENTITIES
Definition macros.h:94
#define MAX_SCRIPTS
Definition macros.h:90
#define SPR_PAL_SIZE
Definition macros.h:142
#define TRANSPARENT_UNION
Definition macros.h:8
#define MAX_WORKERS
Definition macros.h:95
#define MAX_TRIGGERS
Definition macros.h:92
#define MAX_SHADOWS
Definition macros.h:93
#define MAX_ANIMATED_MESHES
Definition macros.h:86
#define MAX_NPCS
Definition macros.h:91
void(* initBattleCallback)(void)
struct Stage * curStage
struct Evt * camMovementScript
s8 moveCategory
0 = jump, 1 = hammer, 5 = partner, ...
s32 holdInputBuffer[64]
s8 lastPlayerMenuSelection[16]
struct EffectInstance * waterBlockEffect
void(* preUpdateCallback)(void)
struct EffectInstance * cloudNineEffect
struct Actor * curTurnEnemy
struct Actor * partnerActor
s32 * actionCmdDifficultyTable
s16 cancelTargetMenuSubstate
s16 submenuIcons[24]
struct Evt * controlScript
s32 pushInputBuffer[64]
s32 curAttackEventSuppression
struct Actor * playerActor
s8 lastPartnerMenuSelection[16]
struct Actor * enemyActors[24]
struct EffectInstance * buffEffect
s8 menuStatus[4]
-1 = automatically pick the first move, 0 = disabled, 1 = enabled
s16 acceptTargetMenuSubstate
CameraRig nextRig
Vec3f lookAt_obj
f32 linearInterpRate
s16 bgColor[3]
Vec3f movePos
f32 yinterpRate
b16 needsReinit
f32 targetOffsetY
Vec3f lookAt_obj_target
f32 curBoomPitch
s32 increasingLeadInterp
Vec3f prevTargetPos
b16 prevUseOverride
f32 leadInterpAlpha
CameraControlSettings * curSettings
f32 prevLeadPosX
b32 needsInitialConstrainDir
f32 yinterpGoal
Mtx * mtxBillboard
f32 targetBoomYaw
CameraControlSettings * prevLeadSettings
f32 yinterpAlpha
Vec3f prevPrevMovePos
f32 unusedLeadAmt
f32 interpEasingParameter
s32 leadConstrainDir
CameraControlSettings * prevSettings
s16 viewportStartX
b16 useOverrideSettings
f32 lookAt_pitch
Vec3s targetScreenCoords
void(* fpDoPreRender)(struct Camera *)
union Camera::@17 params
Matrix4f mtxViewLeading
s16 unusedLeadCounter
f32 targetLeadAmount
CameraRig prevRig
s16 viewportStartY
CameraControlSettings overrideSettings
s16 unusedLeadDir
void(* fpDoPostRender)(struct Camera *)
Vec3f targetPos
f32 linearInterp
Matrix4f mtxViewShaking
f32 curBoomLength
Matrix4f mtxPerspective
b16 prevPrevUseOverride
Vec3f prevMovePos
Vec3f lookAt_eye
f32 interpAlpha
Matrix4f mtxViewPlayer
f32 accumulatedStickLead
f32 leadAmtScale
f32 prevLeadPosZ
EntityCallback fpHandleCollision
void(* fpInit)(struct Entity *)
EntityCallback updateMatrixOverride
Matrix4f inverseTransformMatrix
s16 virtualModelIndex
f32 effectiveSize
char unk_B4[4]
s8 collisionTimer
EntityCallback updateScriptCallback
void(* renderSetupFunc)(s32)
Evt * boundScript
EntityData dataBuf
EntityBlueprint * blueprint
EvtScript * boundScriptBytecode
s32 * scriptReadPos
s16 vertexSegment
void * gfxBaseAddr
Mtx transformMatrix
Vec3f scale
s32 * savedReadPos[3]
u8 collisionFlags
s16 shadowIndex
void(* fpHandleInput)(struct MenuPanel *)
void(* fpUpdate)(struct MenuPanel *)
void(* fpCleanup)(struct MenuPanel *)
void(* fpInit)(struct MenuPanel *)
MenuPanel * tab
void(* fpDrawContents)(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
WindowUpdateFunc fpUpdate
WindowStyle style
u8 staticNodeIDs[0x7A]
void(* fpRenderCallback)(void *)
AnimatorNode * rootNode
StaticAnimatorNode * staticNodes[0x7A]
AnimatorNode * nodeCache[0x7A]
StaticAnimatorNode ** staticRoot
struct EffectInstance * decorations[2]
s8 palAnimState
s16 palswapTimeBtoA
s16 collisionDiameter
void(* onUpdate)(struct Npc *)
Run before anything else for this NPC in update_npcs()
s16 imgfxArg2
f32 jumpScale
char unk_A5
Vec3f scale
s16 blendPalB
char unk_C2[2]
s16 imgfxArg3
s16 nextPalTime
f32 jumpVel
f32 animationSpeed
s16 palswapTimeAtoB
s8 renderMode
s16 unk_96
s16 imgfxType
s32 flags
f32 renderYaw
s16 blendPalC
s8 changedDecoration[2]
s8 decorationType[2]
s32 spriteInstanceID
AnimID curAnim
Vec3f moveToPos
s8 palSwapType
f32 planarFlyDist
f32 shadowScale
s16 palBlendAlpha
u8 hideAlpha
Used when hiding NPCs; Multiplied with Npc::alpha.
f32 screenSpaceOffset2D[2]
s8 originalPalettesCount
char unk_B8[4]
s16 blendPalA
s32 collisionChannel
b16 isFacingAway
u16 ** originalPalettesList
u16 * adjustedPalettes[16]
Vec3f colliderPos
s16 collisionHeight
s8 resetPalAdjust
s16 turnAroundYawAdjustment
char unk_AE[2]
Vec3f rot
s8 verticalRenderOffset
s16 yawCamOffset
u16 imgfxFlags
s8 palSwapPrevType
s16 decorationGlowPhase[2]
s32 animNotifyValue
Vec3f pos
f32 verticalStretch
AnimID * extraAnimList
s16 curFloor
f32 rotPivotOffsetY
s16 imgfxArg4
f32 moveSpeed
Vec3s homePos
s16 imgfxArg1
s8 decorationInitialized[2]
u16 palswapTimeHoldA
s16 blendPalD
char unk_336[10]
union Npc::@0 blur
s16 curWall
s8 spriteColorVariations
s32 shadowIndex
s16 palswapTimeHoldB
void(* onRender)(struct Npc *)
Run after the display list for this NPC is built.
s16 duration
u16 copiedPalettes[16][16]
PushBlockFallCallback(dropCallback)
void * appendGfxArg
void(* appendGfx)(void *)
struct StaticAnimatorNode ** animModelNode
ShadowCallback(onCreateCallback)
s32(* onActivateFunc)(struct Trigger *)
union Trigger::@1 location
s32(* onActivateFunc)(struct Trigger *)
s32 * itemList
char unk_31[3]
u8 hasPlayerInteractPrompt
s32 runningScriptID
EvtScript * onTriggerEvt
struct Evt * runningScript
void * drawContentsArg0
WindowUpdateFunc fpPending
WindowUpdateFunc fpUpdate
u8 originalPriority
void(* draw)(void)
void(* update)(void)
#define UNK_PTR
Definition types.h:7
#define UNK_FUN_PTR(name)
Definition types.h:10