2020-07-01 01:50:12 -05:00
#ifndef _STRUCTS_H_
#define _STRUCTS_H_
/* Note: Structs are not complete, take them with a grain of salt. */
#include "types.h"
2022-11-06 12:34:04 -08:00
#include "level_object_entries.h"
2023-05-14 22:48:05 +01:00
#include "object_properties.h"
2025-04-09 15:17:50 -04:00
#include "gbi.h"
2025-05-05 15:47:26 +03:00
#include "audio.h"
2020-07-01 01:50:12 -05:00
2025-05-01 16:35:49 +02:00
typedef struct Vec4f {
union {
struct {
f32 x ;
f32 y ;
f32 z ;
f32 w ;
};
f32 f [ 4 ];
};
} Vec4f ;
2022-09-20 09:42:30 -04:00
// Stolen from PD
// This hacky structure allows coords to be accessed using
// coord->x, coord->y and coord->z, but also as
// coord->f[0], coord->f[1] and coord->f[2].
// In some places code only matches when using the float array.
2022-08-28 07:02:05 -04:00
typedef struct Vec3f {
2022-09-20 09:42:30 -04:00
union {
struct {
f32 x ;
f32 y ;
f32 z ;
};
f32 f [ 3 ];
};
2022-08-28 07:02:05 -04:00
} Vec3f ;
2025-03-29 18:05:09 +00:00
typedef struct Vec2f {
union {
struct {
f32 x ;
f32 y ;
};
f32 f [ 2 ];
};
} Vec2f ;
2022-12-22 13:55:08 +00:00
typedef struct Vec3s {
union {
struct {
s16 y_rotation ;
s16 x_rotation ;
s16 z_rotation ;
};
struct {
s16 x ;
s16 y ;
s16 z ;
};
s16 s [ 3 ];
};
} Vec3s ;
2025-03-29 18:05:09 +00:00
typedef struct Vec2s {
union {
struct {
s16 y_rotation ;
s16 x_rotation ;
};
struct {
s16 x ;
s16 y ;
};
s16 s [ 2 ];
};
} Vec2s ;
2023-01-06 19:39:37 +00:00
typedef struct Vec3i {
union {
struct {
s32 x ;
s32 y ;
s32 z ;
};
s32 i [ 3 ];
};
} Vec3i ;
2025-05-01 16:35:49 +02:00
typedef struct Vec2i {
2023-03-07 14:30:24 -05:00
union {
2025-05-01 16:35:49 +02:00
struct {
s32 x ;
s32 y ;
};
s32 i [ 2 ];
2023-03-07 14:30:24 -05:00
};
2025-05-01 16:35:49 +02:00
} Vec2i ;
2023-03-07 14:30:24 -05:00
2021-06-19 12:44:27 -05:00
/* Size: 0x20 bytes */
typedef struct TextureHeader {
/* 0x00 */ u8 width ;
/* 0x01 */ u8 height ;
2021-07-19 16:36:12 -05:00
/* 0x02 */ u8 format ; // Lower 4 bits determines image format.
2021-12-01 20:32:55 +00:00
// 0 = RGBA32
// 1 = RGBA16
2021-06-19 12:44:27 -05:00
// 2 = I8
// 3 = I4
// 4 = IA16
// 5 = IA8
// 6 = IA4
2021-07-19 16:36:12 -05:00
// 7 = CI4 (16 colors)
// 8 = CI8 (64 colors)
2025-06-11 15:36:25 +03:00
/* 0x03 */ s8 posX ; // X coordinate of the texture in the sprite's 2D space
/* 0x04 */ s8 posY ; // Y coordinate of the texture in the sprite's 2D space
2021-07-19 16:36:12 -05:00
/* 0x05 */ u8 numberOfInstances ; // Always 1 in the ROM.
2021-08-18 20:36:56 -05:00
/* 0x06 */ s16 flags ;
2021-06-19 12:44:27 -05:00
// 0x04 = Interlaced texture
// 0x40 = U clamp flag. 0 = Wrap, 1 = Clamp
// 0x80 = V clamp flag. 0 = Wrap, 1 = Clamp
2021-07-19 16:36:12 -05:00
/* 0x08 */ s16 ciPaletteOffset ;
2021-07-20 16:15:30 -05:00
/* 0x0A */ s16 numberOfCommands ; // initialized in RAM; Number of commands in the texture display list. (Usually 0x07)
2025-04-09 15:17:50 -04:00
/* 0x0C */ Gfx * cmd ; // initialized in RAM; Pointer to texture display list.
2021-06-19 12:44:27 -05:00
/* 0x10 */ u8 unk10 ;
/* 0x11 */ u8 unk11 ;
2021-07-19 16:36:12 -05:00
/* 0x12 */ u16 numOfTextures ; // For animated textures, static textures are just 0x01. Each texture has it's own header.
2021-06-19 12:44:27 -05:00
/* 0x14 */ u16 frameAdvanceDelay ; // How many frames to delay before moving to the next texture.
2021-12-01 20:32:55 +00:00
/* 0x16 */ s16 textureSize ; // Size in number of bytes, including the header
2021-06-19 12:44:27 -05:00
/* 0x18 */ u8 unk18 ;
/* 0x19 */ u8 unk19 ;
/* 0x1A */ u8 unk1A ;
/* 0x1B */ u8 unk1B ;
/* 0x1C */ u8 unk1C ;
/* 0x1D */ u8 isCompressed ;
/* 0x1E */ u8 unk1E ;
/* 0x1F */ u8 unk1F ;
} TextureHeader ;
2022-02-07 08:55:50 -05:00
// Probably not unique to the boot menu.
2021-07-20 16:15:30 -05:00
typedef struct DrawTexture {
TextureHeader * texture ; // Pointer to texture to draw.
s16 xOffset ; // Offset from the center of the screen.
s16 yOffset ; // Offset from the center of the screen.
} DrawTexture ;
2025-04-16 18:09:08 +01:00
// Probably not unique to the boot menu.
typedef struct ShadowHeapProperties {
TextureHeader * texture ; // Pointer to texture to draw.
s16 triCount ; // Offset from the center of the screen.
s16 vtxCount ; // Offset from the center of the screen.
} ShadowHeapProperties ;
2025-06-11 15:36:25 +03:00
typedef struct SpriteAsset {
/* 0x00 */ s16 baseTextureId ;
/* 0x02 */ s16 numberOfFrames ; // 1 means static texture
/* 0x04 */ Vec2s anchor ; // 2D coordinates on the sprite used as the anchor point for positioning in 3D space
/* 0x08 */ s32 unused_field ;
/* 0x0C */ u8 frameTexOffsets [ 1 ]; // actual size is numberOfFrames + 1
} SpriteAsset ;
2023-01-07 14:40:25 +00:00
typedef struct Sprite {
2025-06-11 15:36:25 +03:00
/* 0x00 */ s16 numberOfFrames ; // 1 means static texture
/* 0x02 */ s16 numberOfTextures ;
/* 0x04 */ s16 numberOfInstances ;
/* 0x06 */ s16 drawFlags ;
/* 0x08 */ TextureHeader ** textures ;
/* 0x0C */ Gfx * frames [ 1 ]; // Actual size varies.
2023-01-07 14:40:25 +00:00
} Sprite ;
2022-11-14 10:49:35 -05:00
/* Size: 0x20 bytes */
typedef struct MenuElement {
// Element Position
/* 0x00 */ s16 left ; // Where the element spawns on entry.
/* 0x02 */ s16 top ;
/* 0x04 */ s16 center ; // Value of where the element moves to after entry
/* 0x06 */ s16 middle ;
/* 0x08 */ s16 right ; // Value of where the element moves to after exit
/* 0x0A */ s16 bottom ;
// Element Color/Transparency
/* 0x0C */ u8 filterRed ;
/* 0x0D */ u8 filterGreen ;
/* 0x0E */ u8 filterBlue ;
2023-10-31 16:09:58 -04:00
/* 0x0F */ u8 filterBlendFactor ; // 0 = no filter color, 0xFF = full color.
2022-11-14 10:49:35 -05:00
/* 0x10 */ u8 opacity ;
// Element Properties
/* 0x11 */ u8 textFont ;
/* 0x12 */ u8 textAlignFlags ;
// Element Type
/* 0x13 */ u8 elementType ; // Source type? 0 = ascii text, 2 = number, 7 = texture
union {
/* 0x14 */ void * element ; // Generic pointer
/* 0x14 */ char * asciiText ; // Pointer to ascii text to be displayed on the screen.
/* 0x14 */ TextureHeader * texture ; // Pointer to texture to be displayed on the screen.
2023-10-31 16:09:58 -04:00
/* 0x14 */ DrawTexture * drawTexture ; // Pointer to texture to be displayed on the screen.
2022-11-14 10:49:35 -05:00
/* 0x14 */ s32 * number ; // Pointer to a number to be displayed on the screen.
/* 0x14 */ u16 * numberU16 ; // Pointer to a number to be displayed on the screen.
2024-05-25 20:29:41 +01:00
/* 0x14 */ s32 assetID ; // Some value for elementType == 5
} t ;
2023-10-06 10:34:59 -04:00
union {
struct {
// Element Background Color/Transparency
/* 0x18 */ s16 backgroundRed ;
/* 0x1A */ s16 backgroundGreen ;
/* 0x1C */ s16 backgroundBlue ;
/* 0x1E */ s16 backgroundAlpha ; // 0x0000 = No background, 0x00FF = full background color.
} background ;
struct {
// Texture Size
/* 0x18 */ s16 width ;
/* 0x1A */ s16 height ;
/* 0x1C */ s16 borderWidth ;
/* 0x1E */ s16 borderHeight ;
} texture ;
} details ;
2022-11-14 10:49:35 -05:00
} MenuElement ;
#define TEX_FORMAT_RGBA32 0
#define TEX_FORMAT_RGBA16 1
#define TEX_FORMAT_I8 2
#define TEX_FORMAT_I4 3
#define TEX_FORMAT_IA16 4
#define TEX_FORMAT_IA8 5
#define TEX_FORMAT_IA4 6
#define TEX_FORMAT_CI4 7
#define TEX_FORMAT_CI8 8
2020-07-16 02:52:53 -05:00
/* Size: 0x18 bytes */
2020-07-22 00:02:59 -05:00
typedef struct Racer {
2020-07-01 01:50:12 -05:00
/* 0x00 */ u32 trophy_points ;
2020-12-06 20:45:52 -06:00
/* 0x04 */ s8 best_times ;
2021-10-25 22:23:02 -04:00
/* 0x05 */ s8 character ;
2020-08-07 17:11:45 -05:00
/* 0x06 */ s8 starting_position ;
2021-10-25 22:23:02 -04:00
/* 0x07 */ s8 unk7 ;
2020-07-01 01:50:12 -05:00
/* 0x08 */ u16 placements [ 4 ];
/* 0x10 */ u16 course_time ;
/* 0x12 */ u16 lap_times [ 3 ];
2020-07-22 00:02:59 -05:00
} Racer ;
2020-07-01 01:50:12 -05:00
2020-07-13 14:42:42 -05:00
/* Unknown Size */
typedef struct Settings4C {
2024-05-25 20:29:41 +01:00
u8 courseID ; //courseId?
2023-10-08 15:41:12 +01:00
u8 unk1 ; // This value + 8 is cutsceneId index? gGameCurrentCutscene = gLevelSettings[gLevelSettings[1] + 8];
2024-05-25 20:29:41 +01:00
s8 mapID ; //mapId?
2020-08-11 21:23:42 -05:00
u8 pad3 [ 0xC ];
2024-05-25 20:29:41 +01:00
u8 entranceID ; //entranceId?
2020-07-13 14:42:42 -05:00
} Settings4C ;
2021-08-14 16:55:32 -05:00
#define TAJ_FLAGS_CAR_CHAL_UNLOCKED 0x01
#define TAJ_FLAGS_HOVER_CHAL_UNLOCKED 0x02
#define TAJ_FLAGS_PLANE_CHAL_UNLOCKED 0x04
#define TAJ_FLAGS_UNLOCKED_A_CHALLENGE (TAJ_FLAGS_CAR_CHAL_UNLOCKED | TAJ_FLAGS_HOVER_CHAL_UNLOCKED | TAJ_FLAGS_PLANE_CHAL_UNLOCKED)
#define TAJ_FLAGS_CAR_CHAL_COMPLETED 0x08
#define TAJ_FLAGS_HOVER_CHAL_COMPLETED 0x10
#define TAJ_FLAGS_PLANE_CHAL_COMPLETED 0x20
2022-12-18 12:39:40 +00:00
#define CUTSCENE_NONE 0x0
2022-10-03 08:07:23 -04:00
#define CUTSCENE_LIGHTHOUSE_ROCKET 0x1
#define CUTSCENE_TT_HELP 0x2
#define CUTSCENE_ADVENTURE_TWO 0x4
#define CUTSCENE_DINO_DOMAIN_BOSS 0x8
#define CUTSCENE_SHERBET_ISLAND_BOSS 0x10
#define CUTSCENE_SNOWFLAKE_MOUNTAIN_BOSS 0x20
#define CUTSCENE_DRAGON_FOREST_BOSS 0x40
#define CUTSCENE_FUTURE_FUN_LAND_BOSS 0x80
#define CUTSCENE_DINO_DOMAIN_BOSS_2 0x100
#define CUTSCENE_SHERBET_ISLAND_BOSS_2 0x200
#define CUTSCENE_SNOWFLAKE_MOUNTAIN_BOSS_2 0x400
#define CUTSCENE_DRAGON_FOREST_BOSS_2 0x800
#define CUTSCENE_WIZPIG_FACE 0x2000
#define CUTSCENE_DINO_DOMAIN_KEY 0x4000
#define CUTSCENE_SHERBET_ISLAND_KEY 0x8000
#define CUTSCENE_SNOWFLAKE_MOUNTAIN_KEY 0x10000
#define CUTSCENE_DRAGON_FOREST_KEY 0x20000
2021-08-03 19:59:08 -05:00
/* Size: 0x118 bytes */
2020-07-13 14:42:42 -05:00
typedef struct Settings {
2022-11-06 11:35:14 -08:00
// Balloon indices:
// 0 = Total balloons
// 1 = Dino Domain balloons
// 2 = Sherbet Island balloons
// 3 = Snowflake Mountain balloons
// 4 = Dragon Forest balloons
// 5 = Future Fun Land balloons
2021-07-31 19:53:09 -05:00
/* 0x0000 */ s16 * balloonsPtr ;
2022-11-06 11:35:14 -08:00
// Course flag bits:
// 0x1 = Map has been visited.
// 0x2 = Map has been completed.
// 0x4 = Map's silver coin challenge has been completed.
// 0x00000000-0xFFFF0000 = Used as bit fields for hub worlds to indicate whether or not a door can open when the player gets near it.
2020-07-19 02:41:07 -05:00
/* 0x0004 */ s32 * courseFlagsPtr ;
2022-11-06 11:35:14 -08:00
// Key bits:
// 0x02 = Dino Domain key
// 0x04 = Sherbet Island key
// 0x08 = Snowflake Mountain key
// 0x10 = Dragon Forest key
2020-07-01 01:50:12 -05:00
/* 0x0008 */ u16 keys ;
2022-11-06 11:35:14 -08:00
2020-07-24 05:30:03 -05:00
/* 0x000A */ u16 unkA ;
2022-11-06 11:35:14 -08:00
// Boss bits:
// 0x001 = Wizpig 1
// 0x002 = Tricky 1
// 0x004 = Bubbler 1
// 0x008 = Bluey 1
// 0x010 = Smokey 1
// 0x020 = Wizpig 2
// 0x080 = Tricky 2
// 0x100 = Bubbler 2
// 0x200 = Bluey 2
// 0x400 = Smokey 2
2020-07-01 01:50:12 -05:00
/* 0x000C */ u16 bosses ;
2022-11-06 11:35:14 -08:00
// Trophy bits:
// Bit field 0b00-0b11 = Empty, 3rd, 2nd, and 1st place trophies.
// `trophies` consists of 5 of these bit fields, from LSB to MSB, Dino, Sherbet, Snowflake, Dragon, and FFL.
2020-07-01 01:50:12 -05:00
/* 0x000E */ u16 trophies ;
2022-11-06 11:35:14 -08:00
// Cutscene flags:
// 0x1 = Lighthouse rocket cutscene
// 0x2 = T.T. help prompt
// 0x4 = Adventure 2 flag?
// 0x8 = Dino domain boss cutscene
// 0x10 = Sherbet island boss cutscene
// 0x20 = Snowflake mountain boss cutscene
// 0x40 = Dragon forest boss cutscene
// 0x80 = Future Fun Land boss cutscene
// 0x100 = Dino domain boss cutscene 2
// 0x200 = Shertbet island boss cutscene 2
// 0x400 = Snowflake mountain boss cutscene 2
// 0x800 = Dragon forest boss cutscene 2
// 0x2000 = Wizpig face cutscene
// 0x4000 = Dino domain key cutscene
// 0x8000 = Sherbet Island key cutscene
// 0x10000 = Snowflake mountain key cutscene
// 0x20000 = Dragon forest key cutscene
2020-07-13 14:42:42 -05:00
/* 0x0010 */ u32 cutsceneFlags ;
2022-11-06 11:35:14 -08:00
// Taj flags:
// 0x1 = Car challenge unlocked
// 0x2 = Hover challenge unlocked
// 0x4 = Plane challenge unlocked
// 0x8 = Car challenge completed
// 0x10 = Hover challenge completed
// 0x20 = Plane challenge completed
2020-07-13 14:42:42 -05:00
/* 0x0014 */ u16 tajFlags ;
2022-11-06 11:35:14 -08:00
// Not a bitfield, just a counter from 0-4.
2020-07-13 14:42:42 -05:00
/* 0x0016 */ u8 ttAmulet ;
2022-11-06 11:35:14 -08:00
// Not a bitfield, just a counter from 0-4.
2020-07-13 14:42:42 -05:00
/* 0x0017 */ u8 wizpigAmulet ;
2022-11-06 11:35:14 -08:00
2021-08-03 19:59:08 -05:00
/* 0x0018 */ u16 * flapInitialsPtr [ 3 ];
/* 0x0024 */ u16 * flapTimesPtr [ 3 ];
/* 0x0030 */ u16 * courseInitialsPtr [ 3 ];
/* 0x003C */ u16 * courseTimesPtr [ 3 ];
2020-07-13 14:42:42 -05:00
/* 0x0048 */ u8 worldId ;
/* 0x0049 */ u8 courseId ;
2022-11-06 10:20:40 -08:00
/* 0x004A */ u8 gNumRacers ;
2020-07-13 14:42:42 -05:00
/* 0x004B */ u8 newGame ;
/* 0x004C */ Settings4C * unk4C ;
2020-07-01 01:50:12 -05:00
/* 0x0050 */ u32 filename ;
2020-07-22 00:02:59 -05:00
/* 0x0054 */ Racer racers [ 8 ];
2023-09-29 18:50:06 -04:00
/* 0x0114 */ s8 timeTrialRacer ;
2023-10-20 08:12:50 -04:00
/* 0x0115 */ s8 unk115 [ 2 ];
2023-10-27 10:20:12 -04:00
/* 0x0117 */ s8 display_times ;
2020-07-13 14:42:42 -05:00
} Settings ;
2020-07-01 01:50:12 -05:00
2023-09-14 16:37:32 -04:00
/* Size: 8 bytes */
typedef struct LevelHeader_70_18 {
s32 unk0 ; //0x0000001E
u8 red ; //0xFF
u8 green ; //0x70
u8 blue ; //0x00
u8 alpha ; //0xFF
} LevelHeader_70_18 ;
2025-05-18 00:10:34 +02:00
typedef struct {
union {
struct {
u8 r ;
u8 g ;
u8 b ;
u8 a ;
};
u32 word ;
};
} ColourRGBA ;
2021-08-18 20:36:56 -05:00
/* Unknown size */
typedef struct LevelHeader_70 {
2023-09-14 16:37:32 -04:00
/* 0x00 */ s32 unk0 ; //0x00000004
/* 0x04 */ s32 unk4 ; //0x00000000
/* 0x08 */ s32 unk8 ; //0x00000000
/* 0x0C */ s32 unkC ; //0x00000000
2025-05-18 00:10:34 +02:00
/* 0x10 */ ColourRGBA rgba ;
/* 0x14 */ ColourRGBA rgba2 ;
2023-09-14 16:37:32 -04:00
/* 0x18 */ LevelHeader_70_18 unk18 [ 1 ]; // Actual length depends on unk0
2021-08-18 20:36:56 -05:00
} LevelHeader_70 ;
// Used to update the pulsating lights in Spaceport Alpha
typedef struct PulsatingLightDataFrame {
u16 value ;
u16 time ;
} PulsatingLightDataFrame ;
typedef struct PulsatingLightData {
u16 numberFrames ;
u16 currentFrame ;
u16 time ;
u16 totalTime ;
s32 outColorValue ;
PulsatingLightDataFrame frames [ 1 ]; // Length varies based on numberFrames.
} PulsatingLightData ;
2025-05-13 13:37:58 +02:00
typedef struct ByteColour {
u8 red ;
u8 green ;
u8 blue ;
} ByteColour ;
2021-07-22 02:23:31 -05:00
/* Size: 0xC4 bytes */
2020-08-07 17:11:45 -05:00
typedef struct LevelHeader {
2022-12-18 12:39:40 +00:00
/* 0x00 */ s8 world ;
2020-07-01 01:50:12 -05:00
/* 0x01 */ u8 unk1 ;
2022-05-20 20:37:55 +01:00
/* 0x02 */ s8 unk2 ;
2022-12-18 12:39:40 +00:00
/* 0x03 */ s8 unk3 ;
2022-09-20 09:42:30 -04:00
/* 0x04 */ s8 unk4 [ 4 ];
2020-07-01 01:50:12 -05:00
/* 0x08 */ f32 course_height ;
2022-12-10 22:42:50 +00:00
/* 0x0C */ u8 unkC [ 10 ];
/* 0x16 */ u8 unk16 [ 10 ];
2023-10-31 16:39:28 +00:00
/* 0x20 */ s8 * AILevelTable ;
2022-05-20 20:37:55 +01:00
/* 0x24 */ u8 pad24 [ 6 ];
2025-05-30 17:06:44 -04:00
/* 0x2A */ s8 unk2A [ 10 ];
2020-08-07 17:11:45 -05:00
/* 0x34 */ s16 geometry ;
/* 0x36 */ s16 collectables ; // Objects such as bananas, balloons, etc.
/* 0x38 */ s16 skybox ;
2021-02-07 14:30:31 -06:00
2020-08-07 17:11:45 -05:00
// Fog related?
2021-12-09 21:48:51 +00:00
/* 0x3A */ s16 fogNear ;
/* 0x3C */ s16 fogFar ;
2021-02-07 14:30:31 -06:00
/* 0x3E */ s16 fogR ;
2020-08-07 17:11:45 -05:00
/* 0x40 */ s16 fogG ;
/* 0x42 */ s16 fogB ;
2021-02-07 14:30:31 -06:00
2020-08-07 17:11:45 -05:00
/* 0x44 */ u8 unk44 [ 0x5 ];
2020-07-01 01:50:12 -05:00
2023-05-01 14:32:25 +01:00
/* 0x49 */ s8 skyDome ;
2022-05-28 23:41:26 +01:00
/* 0x4A */ s8 playerIndex ;
2020-12-06 20:45:52 -06:00
/* 0x4B */ s8 laps ;
2020-08-07 17:11:45 -05:00
/* 0x4C */ s8 race_type ;
2021-07-22 02:23:31 -05:00
/* 0x4D */ s8 vehicle ;
/* 0x4E */ s8 available_vehicles ;
2020-07-01 01:50:12 -05:00
2021-07-31 19:53:09 -05:00
/* 0x4F */ s8 unk4F [ 3 ];
2021-02-07 14:30:31 -06:00
2020-07-01 01:50:12 -05:00
/* 0x52 */ u8 music ;
/* 0x53 */ u8 unk53 ;
/* 0x54 */ u16 instruments ;
2025-06-01 19:33:07 +01:00
// Waves
2025-05-27 22:20:50 +01:00
/* 0x56 */ u8 waveSubdivisons ; // values between 2 and 8 (except 5 and 7), used to determine waves count?
2025-04-23 19:23:53 +02:00
/* 0x57 */ u8 unk57 ; // possible values: 2,4,8,16,20, related to waves
2025-05-27 22:20:50 +01:00
/* 0x58 */ u8 waveSineStep0 ; // possible values: 1,2,4
/* 0x59 */ u8 waveSineBase0 ; // always 0?
/* 0x5A */ s16 waveSineHeight0 ; // values between 512 and 4608
/* 0x5C */ u8 waveSineStep1 ; // possible values: 1,2,4
/* 0x5D */ u8 waveSineBase1 ; // always 0?
/* 0x5E */ s16 waveSineHeight1 ; // values between 512 and 4963
/* 0x60 */ s16 waveSeedSize ; // possible values: 120, 130, 157, 178, 187
2025-04-23 19:23:53 +02:00
/* 0x62 */ s16 wavePower ; // always 256
/* 0x64 */ s16 unk64 ; // Always 153 except in Smokey Castle where it's 0 and the title screen where it's 256 (Some form of secondary power)
/* 0x66 */ s16 unk66 ; // values between 908 and 2560
2025-05-27 22:20:50 +01:00
/* 0x68 */ s16 waveTexID ; // always 62 except in the trophy race where it's 205
/* 0x6A */ u8 waveUVScaleX ; // values between 1 and 6
/* 0x6B */ u8 waveUVScaleY ; // values between 1 and 6
/* 0x6C */ s8 waveUVScrollX ; // values between 0 and 4
/* 0x6D */ s8 waveUVScrollY ; // values between 0 and 2 except in Hot Top Volcano where it's -2
/* 0x6E */ s16 waveViewDist ; // possible values: 3,5
2021-02-07 14:30:31 -06:00
2025-05-27 22:20:50 +01:00
//waves_init_header Seems to use this struct, and it differs on unk70 only.
2025-04-23 19:23:53 +02:00
union {
/* 0x70 */ LevelHeader_70 * unk70 [ 1 ]; // unknown size, however only size of 1 matches
struct {
2025-05-27 22:20:50 +01:00
/* 0x70 */ u8 wavesXlu ; // always 1 except in Hot Top Volcano where it's 0
/* 0x71 */ u8 waveDoubleDensity ; // possible values: 0,1
2025-04-23 19:23:53 +02:00
};
};
2023-11-10 08:47:30 -05:00
2023-09-14 22:50:44 +01:00
/* 0x74 */ LevelHeader_70 * unk74 [ 7 ];
2020-07-01 01:50:12 -05:00
// Weather related?
2024-07-05 14:02:23 +01:00
/* 0x90 */ s16 weatherEnable ; // This affects snow density, but for rain, it simply needs to be nonzero.
2022-05-23 23:11:46 +01:00
/* 0x92 */ s16 weatherType ;
/* 0x94 */ u8 weatherIntensity ;
/* 0x95 */ u8 weatherOpacity ;
/* 0x96 */ s16 weatherVelX ;
/* 0x98 */ s16 weatherVelY ;
/* 0x9A */ s16 weatherVelZ ;
2021-02-07 14:30:31 -06:00
2021-07-05 14:00:21 -05:00
/* 0x9C */ s8 cameraFOV ; // Must be a value within [0, 90]
/* 0x9D */ u8 bgColorRed ;
/* 0x9E */ u8 bgColorGreen ;
/* 0x9F */ u8 bgColorBlue ;
2025-05-09 09:37:13 -04:00
/* 0xA0 */ u8 unkA0 ;
/* 0xA1 */ u8 unkA1 ;
2022-10-30 19:58:59 +00:00
/* 0xA2 */ s8 unkA2 ;
/* 0xA3 */ s8 unkA3 ;
2021-09-13 13:48:21 -04:00
/* 0xA4 */ TextureHeader * unkA4 ;
2023-01-06 19:39:37 +00:00
/* 0xA8 */ s16 unkA8 ;
/* 0xAA */ s16 unkAA ;
2021-08-18 20:36:56 -05:00
/* 0xAC */ PulsatingLightData * pulseLightData ;
2021-02-07 14:30:31 -06:00
2021-07-22 02:23:31 -05:00
/* 0xB0 */ s16 unkB0 ;
/* 0xB2 */ u8 unkB2 ;
2021-09-17 20:50:15 -04:00
/* 0xB3 */ u8 voiceLimit ;
2025-06-01 19:33:07 +01:00
/* 0xB4 */ ByteColour voidColour ;
/* 0xB7 */ u8 useVoid ; // Disallow the player from looking through walls by drawing a blank screen behind walls.
2024-04-29 23:15:00 +01:00
/* 0xB8 */ s8 bossRaceID ;
2022-09-20 09:42:30 -04:00
/* 0xB9 */ u8 unkB9 ;
2020-08-07 17:11:45 -05:00
/* 0xBA */ s16 unkBA ;
2022-09-20 09:42:30 -04:00
/* 0xBC */ u8 unkBC ;
2023-01-06 19:39:37 +00:00
/* 0xBD */ s8 unkBD ;
2023-10-31 16:39:28 +00:00
// Multiplayer gradient background
/* 0xBE */ u8 BGColourBottomR ;
/* 0xBF */ u8 BGColourBottomG ;
/* 0xC0 */ u8 BGColourBottomB ;
/* 0xC1 */ u8 BGColourTopR ;
/* 0xC2 */ u8 BGColourTopG ;
/* 0xC3 */ u8 BGColourTopB ;
2020-08-07 17:11:45 -05:00
} LevelHeader ;
2020-07-01 01:50:12 -05:00
2020-07-16 02:52:53 -05:00
/* Size: 0x50 bytes */
2020-07-01 01:50:12 -05:00
typedef struct {
/* 0x00 */ u32 unk00 ;
/* 0x04 */ u32 unk04 ;
/* 0x08 */ u32 unk08 ;
/* 0x0C */ f32 unk0C ;
/* 0x10 */ u32 unk10 ;
/* 0x14 */ u32 unk14 ;
/* 0x18 */ f32 unk18 ;
/* 0x1C */ u32 unk1C ;
/* 0x20 */ u32 unk20 ;
/* 0x24 */ u32 unk24 ;
/* 0x28 */ u32 unk28 ;
/* 0x2C */ u32 unk2C ;
/* 0x30 */ u32 unk30 ;
/* 0x34 */ u32 unk34 ;
/* 0x38 */ u32 unk38 ;
/* 0x3C */ u32 unk3C ;
/* 0x40 */ f32 unk40 ;
/* 0x44 */ f32 unk44 ;
/* 0x48 */ f32 unk48 ;
/* 0x4C */ u32 unk4C ;
} dkr_wave_t ;
2021-07-10 14:50:50 -05:00
/* Size: 8 bytes */
typedef struct TextureInfo {
/* 0x00 */ TextureHeader * texture ;
/* 0x04 */ u8 width ;
/* 0x05 */ u8 height ;
/* 0x06 */ u8 format ;
2025-04-28 15:07:18 +03:00
/* 0x07 */ s8 unk7 ;
2021-07-10 14:50:50 -05:00
} TextureInfo ;
/* Size: 10 bytes */
typedef struct Vertex {
/* 0x00 */ s16 x ;
/* 0x02 */ s16 y ;
/* 0x04 */ s16 z ;
/* 0x06 */ u8 r ;
/* 0x07 */ u8 g ;
/* 0x08 */ u8 b ;
/* 0x09 */ u8 a ;
} Vertex ;
/* Size: 4 bytes */
typedef struct TexCoords {
2023-03-07 14:30:24 -05:00
union {
struct {
s16 u , v ;
};
u32 texCoords ; // For convenience?
};
2021-07-10 14:50:50 -05:00
} TexCoords ;
2024-01-26 11:00:11 -05:00
#define BACKFACE_CULL 0x00
#define BACKFACE_DRAW 0x40
2025-06-17 16:14:28 +03:00
#define TRI_FLAG_80 0x80
2024-01-26 11:00:11 -05:00
2025-05-30 16:50:19 +03:00
#define DKR_TRIANGLE(flags, ind0, ind1, ind2) (((flags) << 24) | ((ind0) << 16) | ((ind1) << 8) | ((ind2) << 0))
2025-04-10 19:22:34 +03:00
2023-09-01 08:17:01 -04:00
/* Size: 0x10 bytes */
2021-07-10 14:50:50 -05:00
typedef struct Triangle {
2022-02-07 08:55:50 -05:00
union {
struct {
2022-11-20 23:37:50 +00:00
/* 0x00 */ u8 flags ; // 0x40 = Draw backface, 0x00 = Cull backface
2022-02-07 08:55:50 -05:00
/* 0x01 */ u8 vi0 ; // First vertex index
/* 0x02 */ u8 vi1 ; // Second vertex index
/* 0x03 */ u8 vi2 ; // Third vertex index
};
/* 0x00 */ u32 vertices ; // For convenience?
2022-11-20 23:37:50 +00:00
u8 verticesArray [ 4 ];
2022-02-07 08:55:50 -05:00
};
2021-07-10 14:50:50 -05:00
/* 0x04 */ TexCoords uv0 ; // Texture coordinates for the first vertex
/* 0x08 */ TexCoords uv1 ; // Texture coordinates for the second vertex
/* 0x0C */ TexCoords uv2 ; // Texture coordinates for the third vertex
} Triangle ;
/* Size: 12 bytes */
typedef struct TriangleBatchInfo {
/* 0x00 */ u8 textureIndex ; // 0xFF = No texture
2025-06-01 19:33:07 +01:00
/* 0x01 */ s8 vertOverride ; // If used, will end a draw this many verts in, so it can do something mid mesh.
2021-07-10 14:50:50 -05:00
/* 0x02 */ s16 verticesOffset ;
/* 0x04 */ s16 facesOffset ;
2025-06-01 19:33:07 +01:00
/* 0x06 */ u8 miscData ; // 0xFF = vertex colors, otherwise use dynamic lighting normals (Objects only)
/* 0x07 */ u8 texOffset ;
/* 0x08 */ u32 flags ; // See RenderFlags in textures_sprites.c
2021-07-10 14:50:50 -05:00
} TriangleBatchInfo ;
2025-06-01 19:33:07 +01:00
#define BATCH_VTX_COL 0xFF
2021-07-10 14:50:50 -05:00
/* Size: 8 bytes */
typedef struct ObjectModel_44 {
2023-10-16 08:12:02 -04:00
union {
2021-07-10 14:50:50 -05:00
/* 0x00 */ s32 * anim ;
2023-10-16 08:12:02 -04:00
/* 0x00 */ u8 * animData ;
};
2025-06-01 19:33:07 +01:00
/* 0x04 */ s32 animLength ; // Animation length is the result of 16-frame length keyframes.
2021-07-10 14:50:50 -05:00
} ObjectModel_44 ;
2025-05-27 21:09:54 +03:00
typedef struct ObjectModel_C {
u16 unk0 [ 4 ];
} ObjectModel_C ;
typedef struct ObjectModel_10 {
f32 A ;
f32 B ;
f32 C ;
f32 D ;
} ObjectModel_10 ;
2021-07-10 14:50:50 -05:00
typedef struct ObjectModel {
2022-11-15 17:45:22 +00:00
/* 0x00 */ TextureInfo * textures ;
/* 0x04 */ Vertex * vertices ;
/* 0x08 */ Triangle * triangles ;
2025-05-27 21:09:54 +03:00
/* 0x0C */ ObjectModel_C * unkC ;
/* 0x10 */ ObjectModel_10 * unk10 ;
2022-12-04 18:43:29 +00:00
/* 0x14 */ s16 * unk14 ;
/* 0x18 */ s16 unk18 ;
/* 0x1A */ s16 unk1A ;
2023-10-20 08:12:50 -04:00
/* 0x1C */ s16 * unk1C ;
/* 0x20 */ s16 unk20 ;
2022-11-15 17:45:22 +00:00
/* 0x22 */ s16 numberOfTextures ;
/* 0x24 */ s16 numberOfVertices ;
/* 0x26 */ s16 numberOfTriangles ;
/* 0x28 */ s16 numberOfBatches ;
/* 0x2A */ u8 pad2A [ 4 ];
/* 0x2E */ u8 unk2E ;
/* 0x2F */ char pad2F [ 1 ];
2023-10-31 16:39:28 +00:00
/* 0x30 */ s16 references ;
2023-10-20 08:12:50 -04:00
/* 0x32 */ s16 unk32 ;
/* 0x34 */ u8 pad34 [ 4 ];
2022-11-15 17:45:22 +00:00
/* 0x38 */ TriangleBatchInfo * batches ;
2023-10-20 08:12:50 -04:00
/* 0x3C */ f32 unk3C ;
2025-05-27 21:09:54 +03:00
/* 0x40 */ Vec3s * unk40 ;
2022-11-15 17:45:22 +00:00
/* 0x44 */ ObjectModel_44 * animations ;
/* 0x48 */ s16 numberOfAnimations ;
2023-10-16 08:12:02 -04:00
/* 0x4A */ s16 unk4A ;
2023-10-20 08:12:50 -04:00
/* 0x4C */ s32 * unk4C ;
2022-11-15 17:45:22 +00:00
/* 0x50 */ s16 unk50 ;
2025-06-01 19:33:07 +01:00
/* 0x52 */ s16 texOffsetUpdateRate ; // Set to the current updaterate for the first model.
2025-03-29 18:05:09 +00:00
/* 0x54 */ u8 pad [ 0x2C ];
2022-11-15 17:45:22 +00:00
} ObjectModel ;
2021-07-10 14:50:50 -05:00
2025-04-16 15:27:28 -04:00
typedef struct CollisionNode {
u16 triangleIndex ; // This triangle index
2025-06-17 16:14:28 +03:00
u16 closestTri [ 3 ];
2025-04-16 15:27:28 -04:00
} CollisionNode ;
2022-03-28 08:36:12 -04:00
/* Size: 0x44 bytes */
2021-07-30 00:41:14 -05:00
typedef struct LevelModelSegment {
/* 0x00 */ Vertex * vertices ;
2022-04-10 20:51:24 -05:00
/* 0x04 */ Triangle * triangles ;
2022-08-08 16:08:08 +01:00
/* 0x08 */ s32 unk8 ;
2021-07-30 00:41:14 -05:00
/* 0x0C */ TriangleBatchInfo * batches ;
2022-11-20 23:37:50 +00:00
/* 0x10 */ s16 * unk10 ;
2025-04-16 15:27:28 -04:00
/* 0x14 */ CollisionNode * unk14 ;
2025-05-30 17:06:44 -04:00
union {
2023-11-30 11:18:56 -05:00
/* 0x18 */ f32 * unk18 ;
2025-05-30 17:06:44 -04:00
/* 0x18 */ Vec4f * unk18_vec4f ; // Used for objects, not levels.
};
2021-07-30 00:41:14 -05:00
/* 0x1C */ s16 numberOfVertices ;
/* 0x1E */ s16 numberOfTriangles ;
/* 0x20 */ s16 numberOfBatches ;
2022-11-17 22:25:32 +00:00
u8 pad22 [ 0x06 ];
/* 0x28 */ s16 unk28 ;
/* 0x2A */ s8 unk2A ;
2023-10-10 21:13:52 +01:00
/* 0x2B */ s8 hasWaves ;
2022-12-01 19:38:05 +00:00
/* 0x2C */ Vertex * unk2C ;
2022-04-10 20:51:24 -05:00
/* 0x30 */ s16 unk30 ;
2021-08-15 22:47:51 -05:00
/* 0x32 */ s16 unk32 ;
s16 * unk34 ;
/* 0x38 */ s16 unk38 ;
2023-04-12 07:55:53 -04:00
u8 pad3A [ 2 ];
/* 0x3C */ s32 unk3C ;
2023-01-06 19:39:37 +00:00
/* 0x40 */ u8 numberofOpaqueBatches ;
2021-07-30 00:41:14 -05:00
u8 pad41 [ 0x3 ];
} LevelModelSegment ;
typedef struct LevelModelSegmentBoundingBox {
2022-03-28 08:36:12 -04:00
/* 0x00 */ s16 x1 ;
/* 0x02 */ s16 y1 ;
/* 0x04 */ s16 z1 ;
/* 0x06 */ s16 x2 ;
/* 0x08 */ s16 y2 ;
/* 0x0A */ s16 z2 ;
2021-07-30 00:41:14 -05:00
} LevelModelSegmentBoundingBox ;
2021-08-18 20:36:56 -05:00
/* Size: 8 bytes */
typedef struct BspTreeNode {
2023-01-07 14:40:25 +00:00
/* 0x00 */ s16 leftNode ; // less than split value
/* 0x02 */ s16 rightNode ; // greater or equal to split value?
/* 0x04 */ u8 splitType ; // 0 = Camera X, 1 = Camera Y, 2 = Camera Z
/* 0x05 */ u8 segmentIndex ;
/* 0x06 */ s16 splitValue ; // Decides left or right
2021-08-18 20:36:56 -05:00
} BspTreeNode ;
2021-07-16 19:32:46 -05:00
typedef struct LevelModel {
/* 0x00 */ TextureInfo * textures ;
2021-07-30 00:41:14 -05:00
/* 0x04 */ LevelModelSegment * segments ;
/* 0x08 */ LevelModelSegmentBoundingBox * segmentsBoundingBoxes ;
2023-04-12 07:55:53 -04:00
/* 0x0C */ u8 * unkC ; //Unused?
2021-08-18 20:36:56 -05:00
/* 0x10 */ u8 * segmentsBitfields ;
/* 0x14 */ BspTreeNode * segmentsBspTree ;
2021-07-16 19:32:46 -05:00
/* 0x18 */ s16 numberOfTextures ;
/* 0x1A */ s16 numberOfSegments ;
2023-04-12 07:55:53 -04:00
/* 0x1C */ s16 unk1C ; // Unused?
/* 0x1E */ s16 numberOfAnimatedTextures ;
/* 0x20 */ s32 minimapSpriteIndex ;
/* 0x24 */ u16 minimapRotation ; // angle for icons on minimap?
/* 0x26 */ u16 unk26 ; // Unused? Common values: 0x0009, 0xFFFF, 0x0303
/* 0x28 */ f32 minimapXScale ;
/* 0x2C */ f32 minimapYScale ;
/* 0x30 */ s16 minimapOffsetXAdv1 ; // minimap X offset (Adventure 1)
/* 0x32 */ s16 minimapOffsetYAdv1 ; // minimap Y offset (Adventure 1)
/* 0x34 */ s16 minimapOffsetXAdv2 ; // minimap X offset (Adventure 2)
/* 0x36 */ s16 minimapOffsetYAdv2 ; // minimap Y offset (Adventure 2)
2022-04-27 12:33:05 +01:00
/* 0x38 */ u32 minimapColor ;
2023-01-02 15:42:19 +00:00
/* 0x3C */ s16 lowerXBounds ;
/* 0x3E */ s16 upperXBounds ;
/* 0x40 */ s16 lowerYBounds ;
/* 0x42 */ s16 upperYBounds ;
/* 0x44 */ s16 lowerZBounds ;
/* 0x46 */ s16 upperZBounds ;
2022-04-10 20:51:24 -05:00
/* 0x48 */ s32 modelSize ;
2021-07-16 19:32:46 -05:00
} LevelModel ;
2022-04-29 16:31:30 -04:00
typedef struct ObjHeaderParticleEntry {
/* 0x00 */ s32 upper ;
/* 0x04 */ s32 lower ;
} ObjHeaderParticleEntry ;
// Size: 0x18 bytes
typedef struct ObjectHeader24 {
2023-06-22 15:13:36 -04:00
u8 unk0 ;
u8 unk1 ;
u8 unk2 ;
u8 unk3 ;
u8 unk4 ;
u8 unk5 ;
u16 unk6 ; //Misc Asset Id?
union {
u32 unk8 ;
struct {
u8 unk8A ;
u8 unk9 ;
u8 unkA ;
u8 unkB ;
};
};
2023-09-14 22:50:44 +01:00
s16 homeX ;
s16 homeY ;
s16 homeZ ;
u16 radius ;
2023-06-22 15:13:36 -04:00
u16 unk14 ;
u16 unk16 ;
2022-04-29 16:31:30 -04:00
} ObjectHeader24 ;
2022-02-13 08:33:50 -05:00
typedef struct ObjectHeader {
2023-10-08 15:41:12 +01:00
/* 0x00 */ s32 unk0 ; // The one use I've seen for this so far is water effect animation speed.
2023-04-28 17:52:12 +01:00
/* 0x04 */ f32 shadowScale ;
2022-02-13 09:14:04 -05:00
/* 0x08 */ f32 unk8 ;
/* 0x0C */ f32 scale ;
2022-04-29 16:31:30 -04:00
/* 0x10 */ s32 * modelIds ;
/* 0x14 */ s32 * vehiclePartIds ;
2023-10-12 08:35:23 -04:00
/* 0x18 */ s8 * vehiclePartIndices ;
2022-04-29 16:31:30 -04:00
/* 0x1C */ ObjHeaderParticleEntry * objectParticles ;
s32 pad20 ;
/* 0x24 */ ObjectHeader24 * unk24 ;
2025-06-06 08:39:06 +03:00
/* 0x28 */ f32 shadeAmbient ;
/* 0x2C */ f32 shadeDiffuse ;
2023-10-11 21:42:09 +01:00
/* 0x30 */ u16 flags ;
2023-10-08 15:41:12 +01:00
/* 0x32 */ s16 shadowGroup ;
2023-09-14 16:37:32 -04:00
/* 0x34 */ s16 unk34 ;
2023-10-08 15:41:12 +01:00
/* 0x36 */ s16 waterEffectGroup ;
2023-09-14 16:37:32 -04:00
/* 0x38 */ s16 unk38 ;
2023-09-14 22:50:44 +01:00
/* 0x3A */ u8 unk3A ;
/* 0x3B */ u8 unk3B ;
/* 0x3C */ u8 unk3C ;
2022-02-13 09:14:04 -05:00
/* 0x3D */ u8 unk3D ;
2023-09-14 22:50:44 +01:00
/* 0x3E */ s16 shadeAngleY ;
/* 0x40 */ s16 shadeAngleZ ;
2023-04-12 07:55:53 -04:00
/* 0x42 */ s16 unk42 ;
/* 0x44 */ s16 unk44 ;
2025-04-16 18:09:08 +01:00
/* 0x48 */ s16 shadowBottom ; // Lower bounds for shadow
/* 0x48 */ s16 shadowTop ; // Upper bounds for shadow
/* 0x4A */ s16 shadowFadeMin ; // Close reference distance for shadow opacity
/* 0x4C */ s16 shadowFadeMax ; // Far reference distance for shadow opacity
2023-03-07 14:30:24 -05:00
/* 0x4E */ s16 drawDistance ;
2023-09-14 16:37:32 -04:00
/* 0x50 */ s16 unk50 ;
/* 0x52 */ s8 unk52 ;
2022-02-13 09:14:04 -05:00
/* 0x53 */ s8 modelType ;
/* 0x54 */ s8 behaviorId ;
/* 0x55 */ s8 numberOfModelIds ; // size of array pointed by Object->unk68
2023-09-05 10:54:46 -04:00
/* 0x56 */ s8 unk56 ;
2024-05-03 17:24:00 +01:00
/* 0x57 */ s8 particleCount ; // Number of different particle types that are attached
2023-03-07 14:30:24 -05:00
/* 0x58 */ s8 unk58 ;
/* 0x59 */ u8 pad59 ;
2023-09-14 22:50:44 +01:00
/* 0x5A */ s8 numLightSources ;
2023-03-07 14:30:24 -05:00
/* 0x5B */ u8 unk5B ;
/* 0x5C */ u8 unk5C ;
2022-09-20 09:42:30 -04:00
/* 0x5D */ u8 unk5D ; //Misc Asset index?
/* 0x5E */ u8 pad5E [ 0x2 ];
2022-02-13 09:14:04 -05:00
/* 0x60 */ char internalName [ 16 ];
/* 0x70 */ u8 unk70 ;
2025-06-06 08:39:06 +03:00
/* 0x71 */ u8 directionalPointLighting ; // If enabled, the model is lit from the direction of the light source; if disabled, lighting is applied evenly from all sides
2023-10-12 08:35:23 -04:00
/* 0x72 */ u8 unk72 ;
2025-06-11 14:11:24 +02:00
/* 0x73 */ u8 unk73 ;
/* 0x74 */ s8 unk74 ;
/* 0x75 */ s8 unk75 ;
/* 0x76 */ u8 unk76 ;
/* 0x77 */ u8 unk77 ;
2022-02-13 08:33:50 -05:00
} ObjectHeader ;
2020-07-24 15:30:09 -05:00
2022-12-15 20:19:28 +00:00
typedef struct ObjectInteraction {
2023-09-14 16:37:32 -04:00
/* 0x00 */ struct Object * obj ;
/* 0x04 */ f32 x_position ;
/* 0x08 */ f32 y_position ;
/* 0x0C */ f32 z_position ;
2023-10-20 08:12:50 -04:00
/* 0x10 */ s8 hitboxRadius ;
2023-09-14 16:37:32 -04:00
/* 0x11 */ u8 unk11 ;
/* 0x12 */ u8 pushForce ;
/* 0x13 */ u8 distance ;
/* 0x14 */ s16 flags ;
/* 0x16 */ s8 unk16 ;
/* 0x17 */ s8 unk17 ;
2023-09-22 16:49:22 +01:00
/* 0x18 */ s32 pad [ 4 ];
2022-12-15 20:19:28 +00:00
} ObjectInteraction ;
2020-07-24 15:30:09 -05:00
2023-03-20 16:22:17 +00:00
typedef struct ShadowData {
f32 scale ;
TextureHeader * texture ;
2023-10-08 15:41:12 +01:00
s16 meshStart ;
s16 meshEnd ;
2023-09-01 08:17:01 -04:00
s16 unkC ;
2023-09-14 16:37:32 -04:00
s16 unkE ;
2023-03-20 16:22:17 +00:00
} ShadowData ;
2021-08-18 20:36:56 -05:00
2023-09-14 22:50:44 +01:00
typedef struct WaterEffect {
f32 scale ;
TextureHeader * texture ;
2023-10-08 15:41:12 +01:00
s16 meshStart ;
s16 meshEnd ;
s16 textureFrame ;
s16 animationSpeed ;
2023-09-14 22:50:44 +01:00
s16 unk10 ;
s16 unk12 ;
} WaterEffect ;
typedef struct ShadeProperties {
2025-06-06 08:39:06 +03:00
/* 0x00 */ f32 unk0 ;
/* 0x04 */ u8 lightR ;
/* 0x05 */ u8 lightG ;
/* 0x06 */ u8 lightB ;
/* 0x07 */ u8 lightIntensity ;
/* 0x08 */ s16 lightDirX ;
/* 0x0A */ s16 lightDirY ;
/* 0x0C */ s16 lightDirZ ;
/* 0x0E */ u8 secondaryLightR ;
/* 0x0F */ u8 secondaryLightG ;
/* 0x10 */ u8 secondaryLightB ;
/* 0x11 */ u8 secondaryLightIntensity ;
/* 0x12 */ s16 secondaryLightDirX ;
/* 0x14 */ s16 secondaryLightDirY ;
/* 0x16 */ s16 secondaryLightDirZ ;
/* 0x18 */ u8 shadowR ;
/* 0x19 */ u8 shadowG ;
/* 0x1A */ u8 shadowB ;
/* 0x1B */ u8 unk1B ;
/* 0x1C */ s16 shadowDirX ;
/* 0x1E */ s16 shadowDirY ;
/* 0x20 */ s16 shadowDirZ ;
/* 0x22 */ s16 unk22 ;
/* 0x24 */ s16 unk24 ;
/* 0x26 */ s16 unk26 ;
/* 0x28 */ f32 ambient ;
/* 0x2C */ f32 diffuse ;
2023-09-14 22:50:44 +01:00
} ShadeProperties ;
2021-08-07 23:46:05 -05:00
2022-12-15 20:19:28 +00:00
typedef f32 FakeHalfMatrix [ 2 ][ 4 ];
2021-07-30 00:41:14 -05:00
typedef struct Object_5C {
2022-12-15 20:19:28 +00:00
union {
2025-05-30 16:50:19 +03:00
/* 0x0000 */ MtxF matrices [ 4 ];
/* 0x0000 */ FakeHalfMatrix _matrices [ 8 ]; // This is a hack. The MtxF[4] is the real one.
2022-12-15 20:19:28 +00:00
};
/* 0x0100 */ void * unk100 ;
/* 0x0104 */ u8 unk104 ;
2023-09-14 22:50:44 +01:00
/* 0x0105 */ u8 unk105 ;
/* 0x0106 */ u8 unk106 ;
/* 0x0107 */ u8 unk107 ;
/* 0x0108 */ s32 unk108 ;
2021-07-30 00:41:14 -05:00
} Object_5C ;
typedef struct Object_60 {
s32 unk0 ;
2023-09-05 10:54:46 -04:00
struct Object * unk4 [ 10 ];
2022-12-04 18:43:29 +00:00
s8 * unk2C ;
2021-07-30 00:41:14 -05:00
} Object_60 ;
2022-04-13 23:15:54 -07:00
typedef struct Object_LaserGun {
2022-12-09 18:18:57 +00:00
/* 0x00 */ s32 unk0 ;
/* 0x00 */ s32 unk4 ;
/* 0x00 */ s32 unk7 ;
/* 0x0C */ s16 fireTimer ;
/* 0x0E */ s8 targeting ;
/* 0x0F */ s8 fireRate ;
2023-04-28 17:52:12 +01:00
/* 0x10 */ u8 laserDuration ;
/* 0x11 */ u8 radius ;
2022-04-13 23:15:54 -07:00
} Object_LaserGun ;
2022-04-12 23:54:22 -07:00
2022-04-13 20:15:46 -07:00
typedef struct Object_Laser {
2022-04-14 00:25:36 -07:00
/* 0x000 */ s16 unk0 ;
/* 0x004 */ u8 unk4 [ 0x185 ];
/* 0x187 */ s8 unk187 ;
2022-04-13 20:15:46 -07:00
} Object_Laser ;
2022-04-12 23:54:22 -07:00
2022-04-13 20:15:46 -07:00
typedef struct Object_TrophyCabinet {
2022-04-14 00:25:36 -07:00
/* 0x0 */ s32 unk0 ;
/* 0x4 */ s16 unk4 ;
2022-04-13 20:15:46 -07:00
} Object_TrophyCabinet ;
2022-04-12 23:54:22 -07:00
typedef struct Object_Animator {
2022-04-14 00:25:36 -07:00
/* 0x00 */ s16 segmentId ;
/* 0x02 */ s16 batchId ;
2023-04-28 17:52:12 +01:00
/* 0x04 */ s16 speedFactorX ;
/* 0x06 */ s16 speedFactorY ;
2022-04-14 00:25:36 -07:00
/* 0x08 */ s16 xSpeed ;
/* 0x0A */ s16 ySpeed ;
2022-04-12 23:54:22 -07:00
} Object_Animator ;
2022-04-13 21:38:07 -07:00
typedef struct Object_Animation {
2023-09-23 18:20:08 -04:00
/* 0x00 */ f32 unk0 ;
/* 0x04 */ f32 unk4 ;
/* 0x08 */ f32 unk8 ;
2023-10-20 08:12:50 -04:00
/* 0x0C */ f32 x ;
/* 0x10 */ f32 y ;
/* 0x14 */ f32 z ;
2025-05-05 15:47:26 +03:00
/* 0x18 */ SoundHandle unk18 ;
2023-09-23 18:20:08 -04:00
/* 0x1C */ struct Object * unk1C ;
/* 0x20 */ s32 unk20 ;
/* 0x24 */ s16 unk24 ;
/* 0x26 */ s16 unk26 ;
/* 0x28 */ u16 unk28 ;
2024-05-03 17:24:00 +01:00
/* 0x2A */ u16 startDelay ;
2023-09-23 18:20:08 -04:00
/* 0x2C */ u8 unk2C ;
/* 0x2D */ u8 unk2D ;
/* 0x2E */ u8 unk2E ;
/* 0x2F */ u8 unk2F ;
2024-05-03 17:24:00 +01:00
/* 0x30 */ s8 cameraID ;
2023-09-23 18:20:08 -04:00
/* 0x31 */ u8 unk31 ;
/* 0x32 */ u8 unk32 ;
/* 0x33 */ u8 unk33 ;
/* 0x34 */ u8 unk34 ;
/* 0x35 */ u8 unk35 ;
2024-05-03 17:24:00 +01:00
/* 0x36 */ s16 pauseCounter ;
2023-09-23 18:20:08 -04:00
/* 0x38 */ u8 unk38 ;
/* 0x39 */ u8 unk39 ;
/* 0x3A */ u8 unk3A ;
/* 0x3V */ u8 unk3B ;
/* 0x3C */ u8 unk3C ;
/* 0x3D */ u8 unk3D ;
/* 0x3E */ u8 unk3E ;
/* 0x3F */ u8 unk3F ;
/* 0x40 */ u8 unk40 ;
/* 0x41 */ u8 unk41 ;
/* 0x42 */ u8 unk42 ;
/* 0x43 */ u8 unk43 ;
/* 0x44 */ u8 unk44 ;
/* 0x45 */ u8 unk45 ;
/* 0x46 */ u8 pad46 [ 4 ];
2022-04-13 21:38:07 -07:00
/* 0x4A */ s16 unk4A ;
2023-10-20 08:12:50 -04:00
/* 0x4C */ u8 pad4C [ 0x10 ];
/* 0x5C */ s32 unk5C ;
2022-04-13 21:38:07 -07:00
} Object_Animation ;
2024-07-18 15:33:24 -04:00
typedef struct Object_Animation2 {
/* 0x00 */ u8 pad0 [ 6 ];
/* 0x06 */ s16 flags ;
} Object_Animation2 ;
2023-10-20 08:12:50 -04:00
typedef struct Object_OverridePos {
/* 0x00 */ f32 x ;
/* 0x04 */ f32 y ;
/* 0x08 */ f32 z ;
/* 0x0C */ Object_Animation * anim ;
} Object_OverridePos ;
2022-04-13 20:15:46 -07:00
typedef struct Object_WeaponBalloon {
2024-05-03 17:24:00 +01:00
/* 0x0 */ f32 scale ;
/* 0x4 */ s16 respawnTime ;
2022-04-14 00:25:36 -07:00
/* 0x6 */ s8 unk6 [ 0x2 ];
2022-04-13 20:15:46 -07:00
} Object_WeaponBalloon ;
2022-04-12 23:54:22 -07:00
2022-04-13 23:15:54 -07:00
typedef struct Object_Weapon {
2022-12-04 18:43:29 +00:00
/* 0x00 */ struct Object * target ;
/* 0x04 */ struct Object * owner ;
2023-01-23 12:54:17 +00:00
/* 0x08 */ struct Object * hitObj ;
2022-12-15 20:19:28 +00:00
/* 0x0C */ f32 checkpointDist ;
2022-12-04 18:43:29 +00:00
/* 0x10 */ f32 forwardVel ;
2023-01-23 12:54:17 +00:00
/* 0x14 */ s16 unk14 ;
/* 0x14 */ s16 unk16 ;
2022-12-04 18:43:29 +00:00
/* 0x18 */ u8 weaponID ;
2022-12-15 20:19:28 +00:00
/* 0x19 */ s8 checkpoint ;
2025-05-13 20:33:44 -04:00
/* 0x1A */ s16 unk1A ;
/* 0x1C */ struct AudioPoint * soundMask ;
2022-04-13 23:15:54 -07:00
} Object_Weapon ;
2022-04-12 23:54:22 -07:00
typedef struct Object_Butterfly {
2022-04-14 00:25:36 -07:00
/* 0x000 */ Triangle triangles [ 8 ];
/* 0x080 */ Vertex vertices [ 12 ];
/* 0x0F8 */ TextureHeader * texture ;
/* 0x0FC */ u8 unkFC ;
/* 0x0FD */ u8 unkFD ;
/* 0x0FE */ u8 unkFE ;
/* 0x0FF */ u8 unkFF ;
2025-02-15 10:43:28 -05:00
/* 0x100 */ struct Object * unk100 ;
/* 0x104 */ u16 unk104 ;
2022-04-12 23:54:22 -07:00
/* 0x106 */ s16 unk106 ;
/* 0x108 */ f32 unk108 ;
2023-09-22 16:49:22 +01:00
/* 0x10C */ f32 unk10C ;
2022-04-12 23:54:22 -07:00
} Object_Butterfly ;
2023-03-07 14:30:24 -05:00
typedef struct Object_Fish {
/* 0x000 */ Triangle triangles [ 8 ];
/* 0x080 */ Vertex vertices [ 12 ];
/* 0x0F8 */ TextureHeader * texture ;
/* 0x0FC */ u8 unkFC ;
/* 0x0FD */ u8 unkFD ;
2023-11-10 08:47:30 -05:00
/* 0x0FE */ s16 unkFE ;
/* 0x100 */ s16 unk100 ;
/* 0x102 */ s16 unk102 ;
2023-03-07 14:30:24 -05:00
/* 0x104 */ s16 unk104 ;
/* 0x106 */ s16 unk106 ;
/* 0x108 */ f32 unk108 ;
2023-09-22 16:49:22 +01:00
/* 0x10C */ f32 unk10C ;
/* 0x110 */ f32 unk110 ;
/* 0x114 */ f32 unk114 ;
/* 0x118 */ f32 unk118 ;
/* 0x11c */ f32 unk11C ;
2023-03-07 14:30:24 -05:00
} Object_Fish ;
2025-05-07 15:31:38 +02:00
typedef struct Object_Boost_Inner {
Vec3f position ;
f32 unkC ;
f32 unk10 ;
2025-05-13 20:33:44 -04:00
f32 unk14 ;
f32 unk18 ;
f32 unk1C ;
f32 unk20 ;
2025-05-07 15:31:38 +02:00
} Object_Boost_Inner ;
2023-03-07 14:30:24 -05:00
typedef struct Object_Boost {
2025-05-28 15:38:17 -04:00
/* 0x00 */ Object_Boost_Inner carBoostData ;
/* 0x24 */ Object_Boost_Inner hovercraftBoostData ;
/* 0x48 */ Object_Boost_Inner flyingBoostData ;
/* 0x6C */ s16 spriteId ;
/* 0x6E */ s16 textureId ;
/* 0x70 */ u8 unk70 ;
/* 0x71 */ u8 unk71 ;
/* 0x72 */ u8 unk72 ;
/* 0x73 */ s8 unk73 ;
/* 0x74 */ f32 unk74 ;
/* 0x78 */ Sprite * sprite ;
/* 0x7C */ TextureHeader * tex ;
2023-03-07 14:30:24 -05:00
} Object_Boost ;
2022-04-13 20:15:46 -07:00
typedef struct Object_EffectBox {
2025-04-30 02:42:08 +02:00
s16 unk0 ;
u8 unk2 ;
u8 unk3 ;
s16 unk4 ;
s16 unk6 ;
s16 unk8 ;
s16 unkA ;
s16 unkC ;
s8 unkE [ 0x1FE - 0xE ];
u8 unk1FE ;
u8 unk1FF ;
2022-04-13 20:15:46 -07:00
} Object_EffectBox ;
2022-04-12 23:54:22 -07:00
2022-04-13 20:15:46 -07:00
typedef struct Object_EggCreator {
2022-04-14 00:25:36 -07:00
/* 0x0 */ u8 pad0 [ 4 ];
2023-04-28 17:52:12 +01:00
/* 0x4 */ struct Object * currentEgg ;
2022-04-13 20:15:46 -07:00
} Object_EggCreator ;
2022-04-12 23:54:22 -07:00
2022-12-04 18:43:29 +00:00
typedef struct Object_CollectEgg {
/* 0x0 */ u8 pad0 [ 4 ];
2023-05-14 22:48:05 +01:00
/* 0x4 */ struct Object * spawnerObj ;
2023-04-28 17:52:12 +01:00
/* 0x8 */ s16 hatchTimer ;
/* 0xA */ s8 racerID ;
/* 0xB */ s8 status ;
2022-12-04 18:43:29 +00:00
} Object_CollectEgg ;
2022-04-13 20:15:46 -07:00
typedef struct Object_UnkId58 {
2022-04-14 00:25:36 -07:00
/* 0x000 */ u8 pad0 [ 0x1D6 ];
2022-12-30 14:14:53 +00:00
/* 0x1D6 */ s8 vehicleID ;
2022-04-13 20:15:46 -07:00
} Object_UnkId58 ;
2022-04-12 23:54:22 -07:00
2022-04-13 20:15:46 -07:00
typedef struct Object_CharacterFlag {
2023-03-07 14:30:24 -05:00
/* 0x00 */ Triangle triangles [ 2 ];
/* 0x20 */ Vertex * vertices ;
/* 0x24 */ TextureHeader * texture ;
2022-04-13 20:15:46 -07:00
} Object_CharacterFlag ;
2022-04-12 23:54:22 -07:00
2022-04-13 20:15:46 -07:00
typedef struct Object_AnimCamera {
2022-04-14 00:25:36 -07:00
/* 0x00 */ u8 pad0 [ 0x30 ];
2024-05-03 17:24:00 +01:00
/* 0x30 */ s8 cameraID ;
2023-10-04 11:57:53 -04:00
/* 0x31 */ u8 pad31 [ 0xB ];
/* 0x3C */ s32 unk3C ;
/* 0x40 */ u8 pad40 [ 4 ];
/* 0x44 */ u8 unk44 ;
/* 0x45 */ u8 pad45 [ 5 ];
/* 0x4A */ s16 unk4A ;
/* 0x4C */ u8 pad4C [ 8 ];
/* 0x54 */ s8 unk54 ;
2022-04-13 20:15:46 -07:00
} Object_AnimCamera ;
2022-04-12 23:54:22 -07:00
2022-04-13 20:15:46 -07:00
typedef struct Object_InfoPoint {
2022-04-14 00:25:36 -07:00
/* 0x0 */ s16 unk0 ;
2022-04-13 20:15:46 -07:00
} Object_InfoPoint ;
2022-04-12 23:54:22 -07:00
2022-04-13 20:15:46 -07:00
typedef struct Object_WorldKey {
2022-04-14 00:25:36 -07:00
/* 0x0 */ s16 unk0 ;
2022-04-13 20:15:46 -07:00
} Object_WorldKey ;
2022-04-12 23:54:22 -07:00
2022-04-13 20:15:46 -07:00
typedef struct Object_AudioLine {
2022-04-14 00:25:36 -07:00
/* 0x00 */ u8 unk0 ;
/* 0x01 */ u8 pad1 ;
2023-05-14 22:48:05 +01:00
/* 0x02 */ u16 soundID ;
2022-04-14 00:25:36 -07:00
/* 0x04 */ u16 unk4 ;
/* 0x06 */ u16 unk6 ;
/* 0x08 */ union {
struct {
u8 unk8 ;
u8 unk9 ;
u8 unkA ;
u8 padB ;
} unk_struct ;
s32 unk8_word ;
} unk_union ;
2024-04-10 19:53:55 +01:00
/* 0x0C */ u8 lineID ;
2022-04-14 00:25:36 -07:00
/* 0x0D */ u8 unkD ;
/* 0x0E */ u8 unkE ;
/* 0x0F */ u8 unkF ;
/* 0x10 */ u8 unk10 ;
/* 0x11 */ u8 unk11 ;
/* 0x12 */ u8 unk12 ;
2022-04-13 20:15:46 -07:00
} Object_AudioLine ;
2022-04-12 23:54:22 -07:00
2022-04-13 20:15:46 -07:00
typedef struct Object_AudioReverb {
2022-04-14 00:25:36 -07:00
/* 0x0 */ u16 pad0 ;
/* 0x2 */ s16 unk2 ;
2024-04-10 19:53:55 +01:00
/* 0x4 */ u8 lineID ;
2022-04-14 00:25:36 -07:00
/* 0x5 */ u8 unk5 ;
2022-04-13 20:15:46 -07:00
} Object_AudioReverb ;
2022-04-12 23:54:22 -07:00
2022-04-13 20:15:46 -07:00
typedef struct Object_TexScroll {
2025-02-15 10:43:28 -05:00
/* 0x0 */ s16 textureIndex ;
2022-04-14 00:25:36 -07:00
/* 0x2 */ s16 pad2 ;
/* 0x4 */ s16 unk4 ;
/* 0x6 */ s16 unk6 ;
/* 0x8 */ s16 unk8 ;
/* 0xA */ s16 unkA ;
2022-04-13 20:15:46 -07:00
} Object_TexScroll ;
2022-04-12 23:54:22 -07:00
2022-04-13 20:15:46 -07:00
typedef struct Object_Frog {
2023-04-28 17:52:12 +01:00
/* 0x00 */ f32 homeX ;
/* 0x04 */ f32 homeY ;
/* 0x08 */ f32 homeZ ;
/* 0x0C */ f32 homeRadius ;
/* 0x10 */ f32 homeRadiusSquare ;
/* 0x14 */ u8 action ;
/* 0x15 */ u8 drumstick ;
/* 0x16 */ s16 hopTimer ;
/* 0x18 */ s8 hopFrame ; // Animation frame while jumping
/* 0x19 */ s8 squishCooldown ;
/* 0x1A */ s16 hopDirection ;
/* 0x1C */ f32 forwardVel ;
/* 0x20 */ f32 hopStartX ;
/* 0x24 */ f32 hopStartZ ;
/* 0x28 */ f32 hopTargetX ;
/* 0x2C */ f32 hopTargetZ ;
/* 0x30 */ f32 scaleY ;
2022-04-13 20:15:46 -07:00
} Object_Frog ;
2022-04-12 23:54:22 -07:00
typedef struct Object_Wizpig2 {
2022-04-14 00:25:36 -07:00
/* 0x00 */ u8 pad0 [ 0x70 ];
/* 0x70 */ u8 unk70 ;
/* 0x71 */ u8 pad71 ;
/* 0x72 */ u8 unk72 ;
/* 0x73 */ u8 pad73 ;
/* 0x74 */ f32 unk74 ;
2022-04-12 23:54:22 -07:00
} Object_Wizpig2 ;
typedef struct Object_Exit {
2023-04-25 10:49:29 +01:00
/* 0x00 */ f32 directionX ;
/* 0x04 */ f32 directionY ;
/* 0x08 */ f32 directionZ ;
/* 0x0C */ f32 rotationDiff ; // Rotational offset, to test intersection when the exit is rotated.
/* 0x10 */ s32 radius ; // Activation radius.
/* 0x14 */ s8 bossFlag ; // Dictates boss level version. 0 is first encounter, 1 is rematch. -1 means no boss.
2022-04-12 23:54:22 -07:00
} Object_Exit ;
2023-10-16 08:12:02 -04:00
typedef struct Object_AiNode {
/* 0x00 */ struct Object * nodeObj [ 4 ];
/* 0x10 */ s16 distToNode [ 4 ];
2024-05-03 17:24:00 +01:00
/* 0x18 */ s8 directions [ 4 ];
2023-10-16 08:12:02 -04:00
} Object_AiNode ;
2022-09-20 09:42:30 -04:00
/* Size: 0x224 - 548 bytes */
2022-04-12 23:54:22 -07:00
typedef struct Object_Racer {
2022-04-13 19:13:50 -07:00
/* 0x000 */ s16 playerIndex ; // -1 = AI Controlled, 0 to 3 = Object controlled
2024-05-03 17:24:00 +01:00
/* 0x002 */ s8 racerIndex ; // Unique ID for each racer object.
2022-04-13 19:13:50 -07:00
/* 0x003 */ s8 characterId ; // Affects minimap color, horn, voice, etc.
2022-04-27 18:55:36 +01:00
/* 0x004 */ s32 unk4 ;
2022-05-28 23:41:26 +01:00
/* 0x008 */ f32 forwardVel ;
2023-05-20 23:03:06 +01:00
/* 0x00C */ f32 animationSpeed ;
2025-05-05 15:47:26 +03:00
/* 0x010 */ SoundHandle unk10 ;
/* 0x014 */ SoundHandle unk14 ;
/* 0x018 */ SoundHandle unk18 ;
/* 0x01C */ SoundHandle unk1C ;
/* 0x020 */ SoundHandle unk20 ;
2025-05-06 16:47:08 +03:00
/* 0x024 */ struct AudioPoint * soundMask ;
2022-05-23 23:11:46 +01:00
/* 0x028 */ u16 lastSoundID ;
2022-04-13 20:15:46 -07:00
/* 0x02A */ u16 unk2A ;
2022-04-13 19:13:50 -07:00
/* 0x02C */ f32 velocity ;
/* 0x030 */ f32 lateral_velocity ;
2024-04-10 19:53:55 +01:00
/* 0x034 */ f32 unk34 ; // Vehicle pitch.
2022-04-13 21:38:07 -07:00
/* 0x038 */ f32 ox1 ;
/* 0x03C */ f32 oy1 ;
/* 0x040 */ f32 oz1 ;
/* 0x044 */ f32 ox2 ;
/* 0x048 */ f32 oy2 ;
/* 0x04C */ f32 oz2 ;
/* 0x050 */ f32 ox3 ;
/* 0x054 */ f32 oy3 ;
/* 0x058 */ f32 oz3 ;
2022-04-13 19:13:50 -07:00
/* 0x05C */ f32 prev_x_position ;
/* 0x060 */ f32 prev_y_position ;
/* 0x064 */ f32 prev_z_position ;
2022-09-20 09:42:30 -04:00
/* 0x068 */ f32 unk68 ; // xPos
/* 0x06C */ f32 unk6C ; // yPos
/* 0x070 */ f32 unk70 ; // zPos
2022-05-20 20:37:55 +01:00
/* 0x074 */ f32 unk74 ;
2022-05-28 23:41:26 +01:00
/* 0x078 */ f32 carBobX ;
/* 0x07C */ f32 carBobY ;
/* 0x080 */ f32 carBobZ ;
2022-04-27 18:55:36 +01:00
/* 0x084 */ f32 unk84 ;
/* 0x088 */ f32 unk88 ;
2022-04-13 19:13:50 -07:00
/* 0x08C */ f32 stretch_height ;
/* 0x090 */ f32 stretch_height_cap ;
/* 0x094 */ f32 camera_zoom ;
2023-01-02 15:42:19 +00:00
/* 0x098 */ f32 unk98 ;
2022-04-13 19:13:50 -07:00
/* 0x09C */ f32 pitch ;
2023-01-02 15:42:19 +00:00
/* 0x0A0 */ f32 roll ;
/* 0x0A4 */ f32 yaw ;
2022-04-13 19:13:50 -07:00
/* 0x0A8 */ f32 checkpoint_distance ;
2022-04-27 18:55:36 +01:00
/* 0x0AC */ f32 unkAC ;
/* 0x0B0 */ f32 unkB0 ;
2022-04-13 19:13:50 -07:00
/* 0x0B4 */ f32 throttle ;
/* 0x0B8 */ f32 brake ;
2022-04-27 18:55:36 +01:00
/* 0x0BC */ f32 unkBC ;
2022-05-28 23:41:26 +01:00
/* 0x0C0 */ f32 buoyancy ;
2022-04-27 18:55:36 +01:00
/* 0x0C4 */ f32 unkC4 ;
/* 0x0C8 */ f32 unkC8 ;
/* 0x0CC */ f32 unkCC ;
2022-04-13 23:15:54 -07:00
/* 0x0D0 */ f32 unkD0 ;
2022-12-30 14:14:53 +00:00
/* 0x0D4 */ f32 unkD4 ;
2022-09-20 09:42:30 -04:00
/* 0x0D8 */ Vec3f unkD8 ;
/* 0x0E4 */ Vec3f unkE4 ;
/* 0x0F0 */ Vec3f unkF0 ;
/* 0x0FC */ Vec3f unkFC ;
2023-04-25 10:49:29 +01:00
/* 0x108 */ struct Object * exitObj ;
2022-04-27 18:55:36 +01:00
/* 0x10C */ s32 unk10C ;
/* 0x110 */ s32 unk110 ;
/* 0x114 */ s32 unk114 ;
2023-10-31 16:39:28 +00:00
/* 0x118 */ struct VehicleSoundData * vehicleSound ;
2022-05-20 20:37:55 +01:00
/* 0x11C */ f32 unk11C ;
/* 0x120 */ f32 unk120 ;
2022-05-04 14:46:31 +01:00
/* 0x124 */ f32 unk124 ;
2024-05-03 17:24:00 +01:00
/* 0x128 */ s32 lap_times [ 5 ]; //mode_init_taj_race implies there should be at least 5 lap times.
2022-04-27 18:55:36 +01:00
/* 0x13C */ s32 unk13C ;
2022-12-04 18:43:29 +00:00
/* 0x140 */ struct Object * magnetTargetObj ;
2022-04-13 19:13:50 -07:00
/* 0x144 */ struct Object * held_obj ;
2023-01-02 15:42:19 +00:00
/* 0x148 */ struct Object * approachTarget ;
2023-04-28 17:52:12 +01:00
/* 0x14C */ struct Object * zipperObj ;
2022-04-27 18:55:36 +01:00
/* 0x150 */ struct Object * unk150 ;
2022-04-13 21:38:07 -07:00
/* 0x154 */ struct Object * unk154 ;
2024-05-03 17:24:00 +01:00
/* 0x158 */ struct Object * nodeCurrent ;
/* 0x15C */ struct Object * challengeMarker ;
2022-05-04 16:38:52 +01:00
/* 0x160 */ s16 y_rotation_offset ;
/* 0x162 */ s16 x_rotation_offset ;
2022-05-01 19:45:00 +01:00
/* 0x164 */ s16 z_rotation_offset ;
/* 0x166 */ s16 unk166 ; // I don't know exactly what these are, but this one in particular seems to cause a Y position offset.
2022-04-27 18:55:36 +01:00
/* 0x168 */ s16 unk168 ;
2022-12-30 14:14:53 +00:00
/* 0x16A */ s16 headAngle ;
/* 0x166 */ s16 headAngleTarget ;
2022-04-27 18:55:36 +01:00
/* 0x16E */ s16 unk16E ;
/* 0x170 */ s16 unk170 ;
2022-05-20 20:37:55 +01:00
/* 0x172 */ s8 balloon_type ;
/* 0x173 */ s8 balloon_quantity ;
/* 0x174 */ s8 balloon_level ;
2022-12-04 18:43:29 +00:00
/* 0x175 */ s8 magnetTimer ;
2022-04-27 18:55:36 +01:00
/* 0x176 */ s16 unk176 ;
2025-05-05 15:47:26 +03:00
/* 0x178 */ SoundHandle magnetSoundMask ;
2025-05-06 16:47:08 +03:00
/* 0x17C */ struct AudioPoint * shieldSoundMask ;
/* 0x180 */ struct AudioPoint * bananaSoundMask ;
2023-05-01 14:32:25 +01:00
/* 0x184 */ s8 magnetModelID ;
2022-04-13 19:13:50 -07:00
/* 0x185 */ s8 bananas ;
2022-04-13 21:38:07 -07:00
/* 0x186 */ u8 unk186 ;
2022-05-28 23:41:26 +01:00
/* 0x187 */ s8 attackType ;
2022-05-20 20:37:55 +01:00
/* 0x188 */ s8 unk188 ;
2022-05-28 23:41:26 +01:00
/* 0x189 */ s8 shieldType ;
/* 0x18A */ s16 unk18A ;
2022-04-13 21:38:07 -07:00
/* 0x18C */ s16 unk18C ;
2022-05-28 23:41:26 +01:00
/* 0x18E */ s16 shieldTimer ;
2022-11-18 17:22:19 -07:00
/* 0x190 */ s16 courseCheckpoint ;
2022-11-06 11:35:14 -08:00
/* 0x192 */ s8 checkpoint ;
/* 0x193 */ s8 lap ;
2023-05-01 14:32:25 +01:00
/* 0x194 */ s8 countLap ;
/* 0x195 */ s8 magnetLevel3 ;
2023-10-31 16:39:28 +00:00
/* 0x196 */ s16 cameraYaw ;
2022-12-09 18:18:57 +00:00
/* 0x198 */ s16 unk198 ;
/* 0x19A */ s16 unk19A ;
2022-05-20 20:37:55 +01:00
/* 0x19C */ s16 unk19C ;
/* 0x19E */ s16 unk19E ;
2023-01-02 15:42:19 +00:00
/* 0x1A0 */ s16 steerVisualRotation ;
2022-05-21 23:04:29 +01:00
/* 0x1A2 */ s16 y_rotation_vel ;
/* 0x1A4 */ s16 x_rotation_vel ;
/* 0x1A6 */ s16 z_rotation_vel ;
2022-04-27 18:55:36 +01:00
/* 0x1A8 */ s16 unk1A8 ;
2025-03-02 17:18:23 -05:00
/* 0x1AA */ s16 unk1AA ;
2024-04-29 23:15:00 +01:00
/* 0x1AC */ s16 finishPosition ;
2023-10-11 21:42:09 +01:00
/* 0x1AE */ s16 racePosition ;
2022-05-28 23:41:26 +01:00
/* 0x1B0 */ s16 unk1B0 ;
/* 0x1B2 */ s16 unk1B2 ;
2022-04-27 18:55:36 +01:00
/* 0x1B4 */ s32 unk1B4 ;
/* 0x1B8 */ s16 unk1B8 ;
2022-05-28 23:41:26 +01:00
/* 0x1BA */ s16 unk1BA ;
2022-08-08 16:08:08 +01:00
/* 0x1BC */ s16 unk1BC ;
/* 0x1BE */ s16 unk1BE ;
/* 0x1C0 */ s16 unk1C0 ;
/* 0x1C2 */ s16 unk1C2 ;
2022-04-27 18:55:36 +01:00
/* 0x1C4 */ s16 unk1C4 ;
/* 0x1C6 */ s16 unk1C6 ;
/* 0x1C8 */ u8 unk1C8 ;
2022-04-13 21:38:07 -07:00
/* 0x1C9 */ u8 unk1C9 ;
2022-04-13 20:15:46 -07:00
/* 0x1CA */ s8 unk1CA ;
2022-04-27 18:55:36 +01:00
/* 0x1CB */ u8 unk1CB ;
2022-05-21 20:14:57 +01:00
/* 0x1CC */ s8 aiSkill ;
2022-04-27 18:55:36 +01:00
/* 0x1CD */ u8 unk1CD ;
2022-04-13 20:15:46 -07:00
/* 0x1CE */ u8 unk1CE ;
2023-04-28 17:52:12 +01:00
/* 0x1CF */ s8 eggHudCounter ;
2022-05-20 20:37:55 +01:00
/* 0x1D0 */ s8 spectateCamID ;
2022-05-28 23:41:26 +01:00
/* 0x1D1 */ s8 unk1D1 ;
2022-05-20 20:37:55 +01:00
/* 0x1D2 */ s8 unk1D2 ;
2022-05-21 16:44:59 +01:00
/* 0x1D3 */ s8 boostTimer ;
2022-12-30 14:14:53 +00:00
/* 0x1D4 */ s8 unk1D4 ;
/* 0x1D5 */ s8 unk1D5 ;
/* 0x1D6 */ s8 vehicleID ;
/* 0x1D7 */ s8 vehicleIDPrev ;
2022-10-30 19:58:59 +00:00
/* 0x1D8 */ s8 raceFinished ;
2022-05-28 23:41:26 +01:00
/* 0x1D9 */ s8 unk1D9 ;
2022-04-27 18:55:36 +01:00
/* 0x1DA */ u8 unk1DA ;
2022-04-13 21:38:07 -07:00
/* 0x1DB */ s8 spinout_timer ;
2022-04-13 19:13:50 -07:00
/* 0x1DC */ u8 wheel_surfaces [ 4 ];
2024-04-29 23:15:00 +01:00
/* 0x1E0 */ s8 trickType ; // This depends on which vehicle you're using, but this name fits the most for now.
2022-05-21 22:47:43 +01:00
/* 0x1E1 */ s8 steerAngle ;
2023-05-01 14:32:25 +01:00
/* 0x1E2 */ s8 groundedWheels ;
2022-04-27 18:55:36 +01:00
/* 0x1E3 */ s8 unk1E3 ;
/* 0x1E4 */ s8 unk1E4 ;
2023-05-01 14:32:25 +01:00
/* 0x1E5 */ s8 waterTimer ; // Set to a value, then counts down when leaving water.
2022-04-13 21:38:07 -07:00
/* 0x1E6 */ s8 drift_direction ;
2023-01-02 15:42:19 +00:00
/* 0x1E7 */ s8 miscAnimCounter ;
2022-04-27 18:55:36 +01:00
/* 0x1E8 */ s8 unk1E8 ;
/* 0x1E9 */ s8 unk1E9 ;
/* 0x1EA */ s8 unk1EA ;
2024-04-29 23:15:00 +01:00
/* 0x1EB */ s8 tapTimerR ;
/* 0x1EC */ s8 tappedR ;
2022-04-13 19:13:50 -07:00
/* 0x1ED */ s8 squish_timer ;
2022-08-08 16:08:08 +01:00
/* 0x1EE */ u8 unk1EE ;
2022-04-13 19:13:50 -07:00
/* 0x1EF */ u8 boost_sound ;
2022-04-27 18:55:36 +01:00
/* 0x1F0 */ u8 unk1F0 ;
2022-04-27 16:02:32 +01:00
/* 0x1F1 */ u8 unk1F1 ;
2022-04-13 21:38:07 -07:00
/* 0x1F2 */ u8 unk1F2 ;
2022-04-13 23:15:54 -07:00
/* 0x1F3 */ u8 unk1F3 ;
2022-05-21 16:44:59 +01:00
/* 0x1F4 */ u8 startInput ;
2023-04-28 17:52:12 +01:00
/* 0x1F5 */ u8 zipperDirCorrection ;
2022-05-28 23:41:26 +01:00
/* 0x1F6 */ s8 unk1F6 ;
2022-04-13 19:13:50 -07:00
/* 0x1F7 */ u8 transparency ;
2022-04-14 00:25:36 -07:00
/* 0x290 */ u8 indicator_type ;
/* 0x291 */ s8 indicator_timer ;
2022-12-15 20:19:28 +00:00
/* 0x1FA */ s8 drifting ;
2022-04-27 18:55:36 +01:00
/* 0x1FB */ s8 unk1FB ;
2025-03-29 18:05:09 +00:00
/* 0x1FC */ u8 wrongWayCounter ;
2025-02-21 09:23:36 -05:00
/* 0x1FD */ s8 cameraIndex ;
2022-05-28 23:41:26 +01:00
/* 0x1FE */ u8 unk1FE ;
/* 0x1FF */ u8 unk1FF ;
2022-08-08 16:08:08 +01:00
/* 0x200 */ s8 transitionTimer ;
2022-04-27 18:55:36 +01:00
/* 0x201 */ s8 unk201 ;
2022-12-15 20:19:28 +00:00
/* 0x202 */ s8 silverCoinCount ;
2022-05-21 16:44:59 +01:00
/* 0x203 */ s8 boostType ;
2023-05-20 23:03:06 +01:00
/* 0x204 */ s16 bubbleTrapTimer ;
2022-04-27 18:55:36 +01:00
/* 0x206 */ s16 unk206 ;
2022-12-10 22:42:50 +00:00
/* 0x208 */ s8 unk208 ;
/* 0x209 */ u8 unk209 ;
2022-12-30 14:14:53 +00:00
/* 0x20A */ u8 lightFlags ;
2022-12-10 22:42:50 +00:00
/* 0x20B */ u8 unk20B ;
2022-05-21 16:44:59 +01:00
/* 0x20C */ u8 throttleReleased ;
2022-04-27 18:55:36 +01:00
/* 0x20D */ u8 unk20D ;
2023-05-01 14:32:25 +01:00
/* 0x20E */ u16 delaySoundID ;
/* 0x210 */ u8 delaySoundTimer ;
2022-05-20 20:37:55 +01:00
/* 0x211 */ s8 unk211 ;
2024-05-03 17:24:00 +01:00
/* 0x212 */ s8 elevation ; // Some maps like Icicle Pyramid have elevation levels that are communicated on the minimap.
2022-04-13 20:15:46 -07:00
/* 0x213 */ s8 unk213 ;
/* 0x214 */ s8 unk214 ;
/* 0x215 */ s8 unk215 ;
2022-04-27 18:55:36 +01:00
/* 0x216 */ u8 unk216 ;
/* 0x217 */ u8 unk217 ;
2025-05-05 15:47:26 +03:00
/* 0x218 */ SoundHandle weaponSoundMask ;
/* 0x21C */ SoundHandle unk21C ;
/* 0x220 */ SoundHandle unk220 ;
2022-04-12 23:54:22 -07:00
} Object_Racer ;
typedef struct Object_Door {
2023-05-01 14:32:25 +01:00
/* 0x00 */ f32 homeY ;
2025-05-06 16:47:08 +03:00
/* 0x04 */ struct AudioPoint * soundMask ;
2024-05-03 17:24:00 +01:00
/* 0x08 */ s32 jingleTimer ;
/* 0x0A */ s16 jingleCooldown ;
/* 0x0E */ s8 doorID ;
/* 0x0F */ u8 doorType ;
/* 0x10 */ u8 balloonCount ;
/* 0x11 */ u8 balloonCountUnused ;
/* 0x12 */ u8 radius ;
/* 0x13 */ s8 textID ;
/* 0x14 */ s8 keyID ;
/* 0x15 */ s8 openDir ;
2022-04-12 23:54:22 -07:00
} Object_Door ;
typedef struct Object_Trigger {
2023-05-14 22:48:05 +01:00
/* 0x00 */ f32 directionX ;
/* 0x04 */ f32 directionY ;
/* 0x08 */ f32 directionZ ;
/* 0x0C */ f32 rotationDiff ; // Rotational offset, to test intersection when the exit is rotated.
/* 0x10 */ s32 radius ;
union {
/* 0x14 */ u8 vehicleID ;
2022-12-08 16:05:29 +00:00
/* 0x14 */ u8 unk14 ;
2023-05-14 22:48:05 +01:00
};
2022-04-12 23:54:22 -07:00
} Object_Trigger ;
typedef struct Object_Audio {
2023-01-22 15:33:18 -05:00
/* 0x00 */ u16 soundId ;
2022-04-14 00:25:36 -07:00
/* 0x02 */ u16 unk2 ;
/* 0x04 */ u8 unk4 ;
/* 0x05 */ u8 unk5 ;
/* 0x06 */ u8 unk6 ;
/* 0x07 */ u8 unk7 ;
2025-05-06 16:47:08 +03:00
/* 0x08 */ struct AudioPoint * soundMask ;
2022-04-14 00:25:36 -07:00
/* 0x0C */ u8 unkC ;
/* 0x0D */ u8 unkD ;
2022-04-12 23:54:22 -07:00
} Object_Audio ;
typedef struct Object_MidiFade {
2022-04-14 00:25:36 -07:00
/* 0x00 */ u8 unk0 ;
/* 0x01 */ u8 unk1 ;
/* 0x02 */ u8 unk2 ;
/* 0x04 */ f32 unk4 ;
/* 0x08 */ f32 unk8 ;
/* 0x0C */ f32 unkC ;
/* 0x10 */ f32 unk10 ;
/* 0x14 */ f32 unk14 ;
/* 0x18 */ f32 unk18 ;
/* 0x1C */ f32 unk1C ;
/* 0x20 */ f32 unk20 ;
/* 0x24 */ f32 unk24 ;
/* 0x28 */ f32 unk28 ;
/* 0x2C */ f32 unk2C ;
/* 0x2F */ u8 unk2F [ 16 ];
/* 0x40 */ u8 unk40 ;
2022-04-12 23:54:22 -07:00
} Object_MidiFade ;
typedef struct Object_MidiFadePoint {
2022-04-14 00:25:36 -07:00
/* 0x00 */ u16 unk0 ;
/* 0x02 */ u16 unk2 ;
/* 0x04 */ f32 unk4 ;
/* 0x08 */ f32 unk8 ;
/* 0x0C */ u8 unkC [ 16 ];
/* 0x1C */ u8 unk1C ;
2022-04-12 23:54:22 -07:00
} Object_MidiFadePoint ;
2025-06-11 14:11:24 +02:00
typedef struct Object_MidiChannelSet {
s16 unk0 ;
u8 unk2 ;
u8 unk3 ;
} Object_MidiChannelSet ;
2022-04-12 23:54:22 -07:00
typedef struct Object_PosArrow {
2022-04-14 00:25:36 -07:00
/* 0x000 */ s16 unk0 ;
/* 0x004 */ u8 pad4 [ 0x14E ];
/* 0x150 */ struct Object * unk150 ;
2022-04-12 23:54:22 -07:00
} Object_PosArrow ;
typedef struct Object_Banana {
2022-12-08 16:05:29 +00:00
/* 0x0 */ s32 unk0 ;
2022-04-14 00:25:36 -07:00
/* 0x4 */ struct Object * spawner ;
2022-12-04 18:43:29 +00:00
/* 0x8 */ s8 unk8 ;
2024-05-03 17:24:00 +01:00
/* 0x9 */ s8 droppedVehicleID ;
2022-04-12 23:54:22 -07:00
} Object_Banana ;
2022-04-13 21:38:07 -07:00
typedef struct Object_FogChanger {
2022-04-14 00:25:36 -07:00
/* 0x0 */ s16 unk0 ;
2022-04-13 21:38:07 -07:00
} Object_FogChanger ;
2022-04-12 23:54:22 -07:00
2022-12-07 20:48:14 +00:00
typedef struct Object_NPC {
2022-12-07 08:22:16 -05:00
/* 0x00 */ f32 unk0 ;
2023-04-25 10:49:29 +01:00
/* 0x04 */ f32 animFrameF ;
2025-06-03 14:47:46 -04:00
/* 0x08 */ f32 unk8 ;
union {
/* 0x0C */ u8 nodeData [ 5 ];
struct {
/* 0x0C */ s8 nodeBack1 ; // One node backwards
/* 0x0D */ u8 nodeCurrent ; // Intended target node
/* 0x0E */ u8 nodeBack2 ; // Two nodes backward
/* 0x0F */ u8 nodeForward1 ; // One node forward
/* 0x10 */ u8 nodeForward2 ; // Two nodes forward
};
};
2023-04-25 10:49:29 +01:00
/* 0x11 */ u8 fogR ;
/* 0x12 */ u8 fogG ;
/* 0x13 */ u8 fogB ;
/* 0x14 */ f32 forwardVel ;
2022-12-07 08:22:16 -05:00
/* 0x18 */ f32 unk18 ;
/* 0x1C */ s16 unk1C ;
/* 0x1E */ s16 unk1E ;
2023-04-25 10:49:29 +01:00
/* 0x20 */ s16 fogNear ;
/* 0x22 */ s16 fogFar ;
2022-12-07 20:48:14 +00:00
/* 0x24 */ s32 unk24 ;
2022-12-07 08:22:16 -05:00
/* 0x28 */ s16 unk28 ;
2022-12-07 20:48:14 +00:00
/* 0x2A */ s16 unk2A ;
2022-12-07 08:22:16 -05:00
/* 0x2C */ s32 unk2C ;
/* 0x30 */ s32 unk30 ;
2023-11-02 18:53:53 +00:00
/* 0x34 */ u16 musicFade ;
2022-12-07 08:22:16 -05:00
/* 0x36 */ s8 unk36 ;
2022-12-07 20:48:14 +00:00
} Object_NPC ;
2022-04-13 23:15:54 -07:00
typedef struct Object_TT {
2022-04-14 00:25:36 -07:00
/* 0x0 */ f32 unk0 ;
/* 0x4 */ u8 pad4 [ 0x9 ];
/* 0xD */ u8 unkD ;
2022-04-13 23:15:54 -07:00
} Object_TT ;
typedef struct Object_Bridge_WhaleRamp {
2024-05-03 17:24:00 +01:00
/* 0x0 */ f32 homeY ;
2025-05-06 16:47:08 +03:00
/* 0x4 */ struct AudioPoint * soundMask ;
2022-04-13 23:15:54 -07:00
} Object_Bridge_WhaleRamp ;
2022-09-20 09:42:30 -04:00
typedef struct Object_64_80021400 {
/* 0x00 */ u8 pad [ 0x2A ];
/* 0x2A */ s16 unk2A ;
} Object_64_80021400 ;
typedef struct Object_80021400_64 {
/* 0x000 */ u8 pad [ 0x64 ];
/* 0x064 */ struct Object_64_80021400 * obj64 ;
} Object_80021400_64 ;
2022-12-09 18:18:57 +00:00
typedef struct Object_Log {
2023-09-22 16:49:22 +01:00
/* 0x00 */ s16 unk0 ;
/* 0x02 */ u8 unk2 ;
/* 0x04 */ u8 unk3 ;
/* 0x04 */ u16 unk4 ;
/* 0x06 */ u16 unk6 ;
/* 0x08 */ u16 unk8 ;
/* 0x0A */ u16 unkA ;
2025-05-27 22:20:50 +01:00
/* 0x0C */ u16 blockID ;
2023-09-22 16:49:22 +01:00
/* 0x0E */ s8 unkE [ 2 ];
2022-12-09 18:18:57 +00:00
} Object_Log ;
typedef struct Object_Fireball_Octoweapon {
u8 pad0 [ 0x1C ];
2025-06-03 14:47:46 -04:00
struct AudioPoint * soundMask ;
2022-12-09 18:18:57 +00:00
} Object_Fireball_Octoweapon ;
2022-12-15 20:19:28 +00:00
typedef struct Object_AnimatedObject {
2023-09-22 16:49:22 +01:00
u8 pad0 [ 0x20 ];
/* 0x20 */ u32 soundMask ;
2024-05-03 17:24:00 +01:00
/* 0x24 */ s16 currentSound ;
2023-09-22 16:49:22 +01:00
/* 0x26 */ s16 unk26 ;
2022-12-15 20:19:28 +00:00
s16 unk28 ;
u8 pad2A [ 0xC ];
s16 unk36 ;
2024-05-03 17:24:00 +01:00
s8 soundID ;
2023-09-22 16:49:22 +01:00
s8 unk39 ;
2022-12-15 20:19:28 +00:00
s8 unk3A ;
2023-09-22 16:49:22 +01:00
s8 unk3B ;
s8 pad3C [ 0xC ];
2022-12-15 20:19:28 +00:00
} Object_AnimatedObject ;
2022-12-30 14:14:53 +00:00
typedef struct Object_WizpigRocket {
u8 pad0 [ 0x70 ];
u8 unk70 ;
u8 unk71 ;
u8 unk72 ;
u8 unk73 ;
f32 unk74 ;
} Object_WizpigRocket ;
2023-09-18 14:46:32 -04:00
typedef struct Object_8001E89C_64_C {
/* 0x00 */ u8 pad0 [ 0xC ];
/* 0x0C */ f32 unkC ;
/* 0x10 */ f32 unk10 ;
/* 0x14 */ f32 unk14 ;
} Object_8001E89C_64_C ;
typedef struct Object_8001E89C_64 {
/* 0x00 */ f32 unk0 ;
/* 0x04 */ f32 unk4 ;
/* 0x08 */ f32 unk8 ;
/* 0x0C */ Object_8001E89C_64_C * unkC ;
} Object_8001E89C_64 ;
2023-10-04 11:57:53 -04:00
typedef struct Object_CharacterSelect {
u8 pad0 [ 0x14 ];
f32 unk14 ;
2023-11-10 08:47:30 -05:00
u8 pad18 [ 0x10 ];
s16 unk28 ;
u8 unk2A [ 2 ];
2023-10-04 11:57:53 -04:00
u8 unk2C ;
u8 pad2D [ 2 ];
u8 unk2F ;
u8 pad30 [ 6 ];
s16 unk36 ;
u8 unk38 ;
u8 unk39 ;
s8 unk3A ;
s8 unk3B ;
s8 unk3C ;
s8 pad3D [ 2 ];
s8 unk3F ;
s8 unk40 ;
s8 unk41 ;
s8 pad42 ;
s8 unk43 ;
} Object_CharacterSelect ;
2025-05-13 20:33:44 -04:00
2022-04-12 23:54:22 -07:00
typedef struct Object_64 {
union {
2025-05-21 12:56:15 -04:00
struct Object * obj ;
2022-04-13 20:15:46 -07:00
Object_Laser laser ;
Object_TrophyCabinet trophy_cabinet ;
2022-04-12 23:54:22 -07:00
Object_Animator animator ;
2022-04-13 21:38:07 -07:00
Object_Animation animation ;
2024-07-18 15:33:24 -04:00
Object_Animation2 animation2 ;
2022-04-13 20:15:46 -07:00
Object_WeaponBalloon weapon_balloon ;
2022-04-13 23:15:54 -07:00
Object_Weapon weapon ;
2022-04-12 23:54:22 -07:00
Object_Butterfly butterfly ;
2023-03-07 14:30:24 -05:00
Object_Fish fish ;
Object_Boost boost ;
2022-04-13 20:15:46 -07:00
Object_EffectBox effect_box ;
Object_EggCreator egg_creator ;
2022-12-04 18:43:29 +00:00
Object_CollectEgg egg ;
2022-04-13 20:15:46 -07:00
Object_UnkId58 unkid58 ;
Object_CharacterFlag character_flag ;
Object_AnimCamera anim_camera ;
Object_InfoPoint info_point ;
Object_WorldKey world_key ;
Object_AudioLine audio_line ;
Object_AudioReverb audio_reverb ;
Object_TexScroll tex_scroll ;
Object_Frog frog ;
2022-04-12 23:54:22 -07:00
Object_Wizpig2 wizpig2 ;
Object_Exit exit ;
Object_Racer racer ;
Object_Door door ;
Object_Trigger trigger ;
Object_Audio audio ;
Object_MidiFade midi_fade ;
Object_MidiFadePoint midi_fade_point ;
2025-06-11 14:11:24 +02:00
Object_MidiChannelSet midi_channel_set ;
2022-04-12 23:54:22 -07:00
Object_PosArrow pos_arrow ;
Object_Banana banana ;
2022-04-13 21:38:07 -07:00
Object_FogChanger fog_changer ;
2022-12-07 20:48:14 +00:00
Object_NPC npc ;
2022-04-13 23:15:54 -07:00
Object_TT tt ;
Object_Bridge_WhaleRamp bridge_whale_ramp ;
2022-09-20 09:42:30 -04:00
Object_80021400_64 obj80021400_64 ;
2022-12-09 18:18:57 +00:00
Object_Log log ;
Object_Fireball_Octoweapon fireball_octoweapon ;
Object_LaserGun lasergun ;
2022-12-15 20:19:28 +00:00
Object_AnimatedObject animatedObject ;
2022-12-30 14:14:53 +00:00
Object_WizpigRocket wizpigRocket ;
2023-09-18 14:46:32 -04:00
Object_8001E89C_64 obj8001E89C_64 ;
2023-10-04 11:57:53 -04:00
Object_CharacterSelect characterSelect ;
2023-10-16 08:12:02 -04:00
Object_AiNode ai_node ;
2024-07-18 15:33:24 -04:00
Object_OverridePos override_pos ;
2022-04-12 23:54:22 -07:00
};
2021-06-24 13:40:40 -05:00
} Object_64 ;
2021-02-07 14:30:31 -06:00
2023-09-25 15:34:17 -04:00
// Size: 0xC
typedef struct Object_68_38 {
2023-09-27 10:31:26 -04:00
/* 0x00 */ u8 unk0 [ 8 ];
2023-09-25 15:34:17 -04:00
/* 0x08 */ s32 unk8 ;
} Object_68_38 ;
2021-08-23 15:36:14 -05:00
typedef struct Object_68 {
2022-09-20 09:42:30 -04:00
/* 0x00 */ union {
ObjectModel * objModel ;
2025-06-03 14:47:46 -04:00
Sprite * sprite ;
2022-09-20 09:42:30 -04:00
TextureHeader * texHeader ;
};
2025-05-09 09:37:13 -04:00
/* 0x04 */ Vertex * vertices [ 3 ];
2023-10-31 16:39:28 +00:00
/* 0x10 */ s16 animationID ;
/* 0x12 */ s16 animationFrame ;
/* 0x14 */ s16 animationFrameCount ;
2024-04-29 23:15:00 +01:00
/* 0x16 */ s16 offsetX ;
/* 0x18 */ s16 offsetY ;
/* 0x1A */ s16 offsetZ ;
2025-03-29 18:05:09 +00:00
/* 0x1C */ s16 headTilt ;
/* 0x1E */ s8 modelType ;
2023-10-31 16:39:28 +00:00
/* 0x1F */ s8 animationTaskNum ;
2025-03-29 18:05:09 +00:00
/* 0x20 */ s8 animUpdateTimer ;
2022-11-01 16:13:07 +00:00
/* 0x21 */ s8 unk21 ;
2022-12-15 20:19:28 +00:00
/* 0x22 */ s16 unk22 ;
/* 0x24 */ s32 unk24 ;
2023-09-25 15:34:17 -04:00
/* 0x28 */ s16 unk28 ;
/* 0x2A */ s16 unk2A ;
2022-12-15 20:19:28 +00:00
/* 0x2C */ s32 unk2C ;
/* 0x30 */ s32 unk30 ;
2023-09-25 15:34:17 -04:00
/* 0x34 */ u8 pad34 [ 0x4 ];
2023-09-27 10:31:26 -04:00
/* 0x38 */ Object_68_38 * unk38 ; //Array Size unknown
/* 0x40 */ u8 pad40 [ 0x14 ];
2023-09-25 15:34:17 -04:00
/* 0x50 */ s16 unk50 ;
2021-06-24 13:40:40 -05:00
} Object_68 ;
2022-11-01 16:13:07 +00:00
2022-12-22 13:55:08 +00:00
typedef struct unk800B2260_C {
s32 unk0 ;
s32 unk4 ;
u8 pad8 [ 0x24 ];
s16 unk2C ;
u8 pad2E [ 0xC ];
s16 unk3A ;
u8 pad3C [ 0x8 ];
void * unk44 ;
u8 pad48 [ 0x28 ];
void * unk70 ;
u8 unk74 ;
} unk800B2260_C ;
2022-03-10 09:01:18 -05:00
/* Size: 0x018 bytes */
typedef struct ObjectTransform {
2025-03-02 17:18:23 -05:00
/* 0x0000 */ Vec3s rotation ;
2025-05-21 12:56:15 -04:00
union {
2023-05-01 14:32:25 +01:00
/* 0x0006 */ s16 flags ;
2025-05-21 12:56:15 -04:00
/* 0x0006 */ s16 spriteID ;
};
2020-07-01 01:50:12 -05:00
/* 0x0008 */ f32 scale ;
/* 0x000C */ f32 x_position ;
/* 0x0010 */ f32 y_position ;
/* 0x0014 */ f32 z_position ;
2022-03-10 09:01:18 -05:00
} ObjectTransform ;
2023-05-14 22:48:05 +01:00
typedef struct SegmentPropertiesObject {
/* 0x002C */ s16 unk2C ;
/* 0x002E */ s16 segmentID ;
/* 0x0030 */ f32 distanceToCamera ;
2025-05-20 17:34:58 +03:00
/* 0x0034 */ f32 unk34 ;
2023-09-18 14:46:32 -04:00
/* 0x0038 */ s8 unk38 ;
2023-05-14 22:48:05 +01:00
/* 0x0039 */ u8 opacity ;
2023-10-06 14:40:45 +01:00
/* 0x003A */ s8 modelIndex ;
2023-05-14 22:48:05 +01:00
/* 0x003B */ s8 animationID ;
} SegmentPropertiesObject ;
2022-12-22 13:55:08 +00:00
2022-03-10 09:01:18 -05:00
/* Size: 0x44 bytes */
typedef struct ObjectSegment {
2022-04-28 15:51:08 +01:00
/* 0x0000 */ ObjectTransform trans ;
2022-12-15 20:19:28 +00:00
/* 0x0018 */ s16 animFrame ;
2025-04-17 17:24:32 +03:00
/* 0x001A */ s16 numActiveEmitters ;
2022-04-28 15:51:08 +01:00
/* 0x001C */ f32 x_velocity ;
/* 0x0020 */ f32 y_velocity ;
/* 0x0024 */ f32 z_velocity ;
/* 0x0028 */ f32 unk28 ;
2025-05-20 17:34:58 +03:00
/* 0x002C */ SegmentPropertiesObject object ;
2023-05-14 22:48:05 +01:00
/* 0x003C */ LevelObjectEntry * level_entry ;
/* 0x0040 */ ObjectHeader * header ;
2022-03-10 09:01:18 -05:00
} ObjectSegment ;
2023-11-30 11:18:56 -05:00
typedef struct Object_LightData_UnkC_Unk44 {
u8 pad0 [ 8 ];
Vertex * unk8 ;
} Object_LightData_UnkC_Unk44 ;
typedef struct Object_LightData_UnkC {
/* 0x00 */ ObjectTransform trans ;
/* 0x18 */ u8 pad18 [ 0x22 ];
/* 0x3A */ s16 unk3A ;
/* 0x3C */ u8 pad3C [ 0x8 ];
/* 0x44 */ Object_LightData_UnkC_Unk44 * unk44 ;
/* 0x48 */ u8 pad48 [ 0x14 ];
/* 0x5C */ s16 unk5C ;
/* 0x5E */ u8 pad5E [ 0xE ];
/* 0x6C */ u8 unk6C ;
/* 0x6D */ u8 unk6D ;
/* 0x6E */ u8 unk6E ;
/* 0x6F */ u8 pad6F [ 0x6 ];
/* 0x75 */ u8 unk75 ;
/* 0x76 */ u8 pad76 ;
/* 0x77 */ s8 unk77 ;
} Object_LightData_UnkC ;
typedef struct Object_LightData {
/* 0x00 */ u8 pad0 [ 6 ];
/* 0x06 */ u8 unk6 ;
/* 0x07 */ u8 pad7 [ 5 ];
/* 0x0C */ Object_LightData_UnkC ** unkC ;
} Object_LightData ;
2022-03-10 09:01:18 -05:00
/* Size: 0x0630 bytes */
typedef struct Object {
/* 0x0000 */ ObjectSegment segment ;
2025-03-29 18:05:09 +00:00
/* 0x0044 */ Vertex * curVertData ;
2022-02-13 09:14:04 -05:00
/* 0x0048 */ s16 behaviorId ;
2024-04-29 23:15:00 +01:00
/* 0x004A */ s16 objectID ; // First 9 bits are object ID, last 7 bits are header size
2022-12-15 20:19:28 +00:00
/* 0x004C */ ObjectInteraction * interactObj ; //player + 0x318
2023-03-20 16:22:17 +00:00
/* 0x0050 */ ShadowData * shadow ; //player + 0x2F4
2023-09-14 22:50:44 +01:00
/* 0x0054 */ ShadeProperties * shading ; //player + 0x2C0
/* 0x0058 */ WaterEffect * waterEffect ; //player + 0x304
2021-07-30 00:41:14 -05:00
/* 0x005C */ Object_5C * unk5C ;
/* 0x0060 */ Object_60 * unk60 ; //player + 0x340
2021-06-24 13:40:40 -05:00
/* 0x0064 */ Object_64 * unk64 ; //player + 0x98
/* 0x0068 */ Object_68 ** unk68 ; //player + 0x80
2025-04-12 23:47:30 +03:00
/* 0x006C */ struct ParticleEmitter * particleEmitter ; //player + 0x370
2025-06-03 14:47:46 -04:00
/* 0x0070 */ struct ObjectLight ** lightData ;
2025-04-14 17:07:39 +03:00
/* 0x0074 */ u32 particleEmittersEnabled ;
2023-05-14 22:48:05 +01:00
/* 0x0078 */ ObjProperties properties ;
2020-07-01 01:50:12 -05:00
/* 0x0080 */ void * unk80 ;
/* 0x0084 */ u32 unk84 ;
/* 0x0088 */ u32 unk88 ;
/* 0x008C */ u32 unk8C ;
/* 0x0090 */ u32 unk90 ;
2023-05-14 22:48:05 +01:00
/* 0x0094 */ u32 unk94 ;
2025-03-02 17:18:23 -05:00
/* 0x0098 */ s32 unk98 ;
2021-06-24 13:40:40 -05:00
} Object ;
2020-07-01 01:50:12 -05:00
2021-09-17 09:34:22 -04:00
// Unused
2022-12-07 08:22:16 -05:00
typedef struct GhostHeaderUnk0 {
u8 levelID ;
u8 vehicleID ; // 0 = Car, 1 = Hovercraft, 2 = Plane
} GhostHeaderUnk0 ;
2021-09-17 09:34:22 -04:00
/* Size: 8 bytes */
typedef struct GhostHeader {
2022-12-07 08:22:16 -05:00
union {
GhostHeaderUnk0 unk0 ;
s16 checksum ;
};
union {
struct {
u8 characterID ; // 9 = T.T.
u8 unk3 ;
};
s16 unk2 ;
};
2023-11-30 11:18:56 -05:00
union {
struct {
u8 unk4 ;
s8 unk5 ;
};
s16 time ; // In frames, where 60 frames = 1 second.
};
2021-09-17 09:34:22 -04:00
s16 nodeCount ;
} GhostHeader ;
/* Size: 12 bytes */
typedef struct GhostNode {
2023-10-30 10:52:01 -04:00
/* 0x00 */ s16 x ;
/* 0x02 */ s16 y ;
/* 0x04 */ s16 z ;
/* 0x06 */ s16 zRotation ; // This order is correct.
/* 0x08 */ s16 xRotation ;
/* 0x0A */ s16 yRotation ;
2021-09-17 09:34:22 -04:00
} GhostNode ;
2020-07-01 01:50:12 -05:00
#endif