Make Object_3C a LevelObjectEntry.

This commit is contained in:
Antonio Castelli
2022-11-06 20:19:11 -08:00
parent 10537750e1
commit 689ba90944
7 changed files with 167 additions and 107 deletions
+119
View File
@@ -140,6 +140,12 @@ typedef struct LevelObjectEntry_Door {
typedef struct LevelObjectEntry_FogChanger {
/* 0x00 */ LevelObjectEntryCommon common;
/* 0x08 */ u8 unk8;
/* 0x09 */ u8 unk9;
/* 0x0A */ u8 unkA;
/* 0x0B */ u8 unkB;
/* 0x0C */ s16 unkC;
/* 0x0E */ s16 unkE;
/* 0x10 */ s16 unk10;
} LevelObjectEntry_FogChanger;
typedef struct LevelObjectEntry_AiNode {
@@ -230,6 +236,12 @@ typedef struct LevelObjectEntry_Buoy_PirateShip {
typedef struct LevelObjectEntry_Weather {
/* 0x00 */ LevelObjectEntryCommon common;
/* 0x08 */ s16 unk8;
/* 0x0A */ s16 unkA;
/* 0x0C */ s16 unkC;
/* 0x0E */ s16 unkE;
/* 0x10 */ u8 unk10;
/* 0x11 */ u8 unk11;
/* 0x12 */ s16 unk12;
} LevelObjectEntry_Weather;
typedef struct LevelObjectEntry_Bridge_WhaleRamp {
@@ -413,6 +425,12 @@ typedef struct LevelObjectEntry_DynamicLightingObject {
typedef struct LevelObjectEntry_EffectBox {
/* 0x00 */ LevelObjectEntryCommon common;
/* 0x08 */ u8 unk8;
/* 0x09 */ u8 unk9;
/* 0x0A */ u8 unkA;
/* 0x0B */ u8 unkB;
/* 0x0C */ u8 unkC;
/* 0x0D */ u8 unkD;
} LevelObjectEntry_EffectBox;
typedef struct LevelObjectEntry_TrophyCab {
@@ -494,6 +512,7 @@ typedef struct LevelObjectEntry_Snowball {
typedef struct LevelObjectEntry_Teleport {
/* 0x00 */ LevelObjectEntryCommon common;
/* 0x08 */ s8 unk8;
} LevelObjectEntry_Teleport;
typedef struct LevelObjectEntry_Lighthouse_RocketSignpost {
@@ -509,6 +528,8 @@ typedef struct LevelObjectEntry_Windsail {
typedef struct LevelObjectEntry_RangeTrigger {
/* 0x00 */ LevelObjectEntryCommon common;
/* 0x08 */ u16 unk8;
/* 0x0A */ u16 unkA;
} LevelObjectEntry_RangeTrigger;
typedef struct LevelObjectEntry_Fireball_Octoweapon {
@@ -569,4 +590,102 @@ typedef struct LevelObjectEntry8000E2B4 {
s16 unkE;
} LevelObjectEntry8000E2B4;
typedef struct LevelObjectEntry80011AD0 {
LevelObjectEntryCommon common;
u8 pad8[0x6];
u8 unkD;
} LevelObjectEntry80011AD0;
typedef struct LevelObjectEntry {
union {
LevelObjectEntry_Racer racer;
LevelObjectEntry_Scenery scenery;
LevelObjectEntry_Fish fish;
LevelObjectEntry_Animator animator;
LevelObjectEntry_Weapon weapon;
LevelObjectEntry_Smoke smoke;
LevelObjectEntry_Exit exit;
LevelObjectEntry_Audio audio;
LevelObjectEntry_AudioLine audioLine;
LevelObjectEntry_CameraControl cameraControl;
LevelObjectEntry_SetupPoint setupPoint;
LevelObjectEntry_Dino_Whale dino_whale;
LevelObjectEntry_Checkpoint checkpoint;
LevelObjectEntry_Door door;
LevelObjectEntry_FogChanger fogChanger;
LevelObjectEntry_AiNode aiNode;
LevelObjectEntry_WeaponBalloon weaponBalloon;
LevelObjectEntry_AudioSeqLine audioSeqLine;
LevelObjectEntry_BombExplosion bombExplosion;
LevelObjectEntry_WBalloonPop balloonPop;
LevelObjectEntry_Unknown25 unk25;
LevelObjectEntry_SkyControl skyControl;
LevelObjectEntry_AudioReverb audioReverb;
LevelObjectEntry_Torch_Mist torch_mist;
LevelObjectEntry_TexScroll texScroll;
LevelObjectEntry_ModeChange modeChange;
LevelObjectEntry_StopWatchMan tt;
LevelObjectEntry_Banana banana;
LevelObjectEntry_RgbaLight rgbaLighting;
LevelObjectEntry_Buoy_PirateShip buoy_pirateShip;
LevelObjectEntry_Weather weather;
LevelObjectEntry_Bridge_WhaleRamp bridge_whaleRamp;
LevelObjectEntry_RampSwitch rampSwitch;
LevelObjectEntry_SeaMonster seaMonster;
LevelObjectEntry_Bonus bonus;
LevelObjectEntry_LensFlare lensFlare;
LevelObjectEntry_LensFlareSwitch lensFlareSwitch;
LevelObjectEntry_CollectEgg collectEgg;
LevelObjectEntry_EggCreator eggCreator;
LevelObjectEntry_CharacterFlag characterFlag;
LevelObjectEntry_Animation animation;
LevelObjectEntry_InfoPoint infoPoint;
LevelObjectEntry_Trigger trigger;
LevelObjectEntry_AirZippers_WaterZippers airzipper_waterzipper;
LevelObjectEntry_Unknown58 unk58;
LevelObjectEntry_WaveGenerator waverGenerator;
LevelObjectEntry_Butterfly butterfly;
LevelObjectEntry_Parkwarden taj;
LevelObjectEntry_WorldKey worldKey;
LevelObjectEntry_BananaCreator bananaCreator;
LevelObjectEntry_TreasureSucker treasureSucker;
LevelObjectEntry_Log log;
LevelObjectEntry_LavaSpurt lavaSpurt;
LevelObjectEntry_PosArrow posArrow;
LevelObjectEntry_HitTester hitTester;
LevelObjectEntry_MidiFade midiFade;
LevelObjectEntry_DynamicLightingObject dynamicLighting;
LevelObjectEntry_EffectBox effectBox;
LevelObjectEntry_TrophyCab trophyCabinet;
LevelObjectEntry_Bubbler bubbler;
LevelObjectEntry_FlyCoin flyCoin;
LevelObjectEntry_GoldenBalloon goldenBalloon;
LevelObjectEntry_Laserbolt laserbolt;
LevelObjectEntry_Lasergun lasergun;
LevelObjectEntry_GroundZipper groundZipper;
LevelObjectEntry_OverridePos overridePos;
LevelObjectEntry_WizpigShip wizpigShip;
LevelObjectEntry_SilverCoin silverCoin;
LevelObjectEntry_Boost boost;
LevelObjectEntry_WardenSmoke tajSmoke;
LevelObjectEntry_Unknown94 unk94;
LevelObjectEntry_Unknown96 unk96;
LevelObjectEntry_Snowball snowball;
LevelObjectEntry_Teleport teleport;
LevelObjectEntry_Lighthouse_RocketSignpost lighthouse_signpost;
LevelObjectEntry_Windsail windsail;
LevelObjectEntry_RangeTrigger rangeTrigger;
LevelObjectEntry_Fireball_Octoweapon fireball_octoweapon;
LevelObjectEntry_Frog frog;
LevelObjectEntry_SilverCoinAdv2 silverCoinAdv2;
LevelObjectEntry_TTDoor ttDoor;
LevelObjectEntry_MidiFadePoint midiFadePoint;
LevelObjectEntry_OctoBubble octoBubble;
LevelObjectEntry_LevelName levelName;
LevelObjectEntry_Midichset midichset;
LevelObjectEntry8000E2B4 unk8000E2B4;
LevelObjectEntry80011AD0 unk80011AD0;
};
} LevelObjectEntry;
#endif
+2 -11
View File
@@ -5,6 +5,7 @@
#include "types.h"
#include "enums.h"
#include "level_object_entries.h"
// Stolen from PD
// This hacky structure allows coords to be accessed using
@@ -554,16 +555,6 @@ typedef struct LevelModel {
/* 0x48 */ s32 modelSize;
} LevelModel;
typedef struct Object_3C {
u8 pad0[0x2];
s16 unk2;
s16 unk4;
s16 unk6;
s8 unk8;
u8 pad9[0x4];
u8 unkD;
} Object_3C;
typedef enum {
OBJECT_MODEL_TYPE_3D_MODEL,
OBJECT_MODEL_TYPE_SPRITE_BILLBOARD,
@@ -1387,7 +1378,7 @@ typedef struct ObjectSegment {
/* 0x003B */ s8 unk3B;
union {
/* 0x003C */ Object_3C* unk3C;
/* 0x003C */ LevelObjectEntry* level_entry;
/* 0x003C */ f32 unk3C_f;
} unk3C_a;