mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-08 13:26:14 -04:00
z_room (1 non-matching) (#1143)
* begin room docs and decomp * match Room_DrawImageSingle * match Room_DrawImageMulti * Room_AllocateAndLoad non-matching * big improvements on Room_DrawCullable * match Room_AllocateAndLoad * improvement? * cleanup * comments * cleanup * small pr suggestions * PR Suggestions * cleanup sceneCmds * some PR * PR Suggestions * more PR Suggestions * col to collision
This commit is contained in:
+37
-42
@@ -1888,19 +1888,14 @@ Gfx* Gfx_PrimColor(GraphicsContext* gfxCtx, s32 lodfrac, s32 r, s32 g, s32 b, s3
|
||||
void func_8012CF0C(GraphicsContext* gfxCtx, s32 clearFb, s32 clearZb, u8 r, u8 g, u8 b);
|
||||
void func_8012D374(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b);
|
||||
void func_8012D40C(f32* param_1, f32* param_2, s16* param_3);
|
||||
void Room_nop8012D510(PlayState* play, Room* room, UNK_PTR param_3, UNK_TYPE1 param_4);
|
||||
void Room_DrawType3Mesh(PlayState* play, Room* room, u32 flags);
|
||||
void Room_DrawType0Mesh(PlayState* play, Room* room, u32 flags);
|
||||
void Room_DrawType2Mesh(PlayState* play, Room* room, u32 flags);
|
||||
void func_8012DEE8(PlayState* play, Room* room, u32 flags);
|
||||
u32 func_8012E254(s32 param_1, PlayState* play);
|
||||
void func_8012E32C(PlayState* play, Room* room, u32 flags);
|
||||
void Room_DrawType1Mesh(PlayState* play, Room* room, u32 flags);
|
||||
|
||||
void Room_Noop(PlayState* play, Room* room, Input* input, s32 arg3);
|
||||
void Room_Init(PlayState* play, RoomContext* roomCtx);
|
||||
u32 Room_AllocateAndLoad(PlayState* play, RoomContext* roomCtx);
|
||||
size_t Room_AllocateAndLoad(PlayState* play, RoomContext* roomCtx);
|
||||
s32 Room_StartRoomTransition(PlayState* play, RoomContext* roomCtx, s32 index);
|
||||
s32 Room_HandleLoadCallbacks(PlayState* play, RoomContext* roomCtx);
|
||||
void Room_Draw(PlayState* play, Room* room, u32 flags);
|
||||
|
||||
void func_8012EBF8(PlayState* play, RoomContext* roomCtx);
|
||||
s32 Inventory_GetBtnBItem(PlayState* play);
|
||||
void Inventory_ChangeEquipment(s16 value);
|
||||
@@ -1919,40 +1914,40 @@ s32 Object_GetIndex(ObjectContext* objectCtx, s16 objectId);
|
||||
s32 Object_IsLoaded(ObjectContext* objectCtx, s32 index);
|
||||
void Object_LoadAll(ObjectContext* objectCtx);
|
||||
void* func_8012F73C(ObjectContext* objectCtx, s32 iParm2, s16 id);
|
||||
void Scene_HeaderCmdSpawnList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdActorList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdActorCutsceneCamList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdColHeader(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdRoomList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdEntranceList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdSpecialFiles(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdRoomBehavior(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdMesh(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdObjectList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdLightList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdPathList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdTransiActorList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandSpawnList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandActorList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandActorCutsceneCamList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandCollisionHeader(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandRoomList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandEntranceList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandSpecialFiles(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandRoomBehavior(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandMesh(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandObjectList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandLightList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandPathList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandTransiActorList(PlayState* play, SceneCmd* cmd);
|
||||
void Door_InitContext(GameState* gameState, DoorContext* doorCtx);
|
||||
void Scene_HeaderCmdEnvLightSettings(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandEnvLightSettings(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_LoadAreaTextures(PlayState* play, s32 fileIndex);
|
||||
void Scene_HeaderCmdSkyboxSettings(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdSkyboxDisables(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdTimeSettings(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdWindSettings(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdExitList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmd09(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdSoundSettings(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdEchoSetting(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdAltHeaderList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdCutsceneList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdActorCutsceneList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdMiniMap(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmd1D(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdMiniMapCompassInfo(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdSetRegionVisitedFlag(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_HeaderCmdAnimatedMaterials(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandSkyboxSettings(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandSkyboxDisables(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandTimeSettings(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandWindSettings(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandExitList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_Command09(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandSoundSettings(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandEchoSetting(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandAltHeaderList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandCutsceneList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandActorCutsceneList(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandMiniMap(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_Command1D(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandMiniMapCompassInfo(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandSetRegionVisitedFlag(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_CommandAnimatedMaterials(PlayState* play, SceneCmd* cmd);
|
||||
void Scene_SetExitFade(PlayState* play);
|
||||
s32 Scene_ProcessHeader(PlayState* play, SceneCmd* header);
|
||||
s32 Scene_ExecuteCommands(PlayState* play, SceneCmd* sceneCmd);
|
||||
u16 Entrance_Create(s32 scene, s32 spawn, s32 layer);
|
||||
u16 Entrance_CreateFromSpawn(s32 spawn);
|
||||
void Scene_Draw(PlayState* play);
|
||||
@@ -2319,7 +2314,7 @@ void Play_SetupRespawnPoint(GameState* thisx, s32 respawnMode, s32 playerParams)
|
||||
void func_80169EFC(GameState* thisx);
|
||||
void func_80169F78(GameState* thisx);
|
||||
void func_80169FDC(GameState* thisx);
|
||||
s32 func_80169FFC(GameState* thisx);
|
||||
s32 Play_CamIsNotFixed(GameState* thisx);
|
||||
s32 FrameAdvance_IsEnabled(GameState* thisx);
|
||||
s32 func_8016A02C(GameState* thisx, Actor* actor, s16* yaw);
|
||||
s32 Play_IsUnderwater(PlayState* this, Vec3f* pos);
|
||||
@@ -2367,7 +2362,7 @@ void PreRender_ApplyFiltersSlowlyInit(PreRender* this);
|
||||
void PreRender_ApplyFiltersSlowlyDestroy(PreRender* this);
|
||||
void func_801720C4(PreRender* this);
|
||||
void func_801720FC(PreRenderParams* params, Gfx** gfxp);
|
||||
void func_80172758(Gfx** gfxp, void* timg, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tt, u16 arg8, f32 x, f32 y, f32 xScale, f32 yScale, u32 flags);
|
||||
void Prerender_DrawBackground2D(Gfx** gfxp, void* timg, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tt, u16 arg8, f32 x, f32 y, f32 xScale, f32 yScale, u32 flags);
|
||||
void THGA_Ct(TwoHeadGfxArena* thga, Gfx* start, size_t size);
|
||||
void THGA_Dt(TwoHeadGfxArena* thga);
|
||||
u32 THGA_IsCrash(TwoHeadGfxArena* thga);
|
||||
|
||||
@@ -63,6 +63,7 @@ extern RegEditor* gRegEditor;
|
||||
#define R_RUN_SPEED_LIMIT REG(45)
|
||||
|
||||
#define R_ENABLE_ARENA_DBG SREG(0) // Same as OoT
|
||||
#define R_ROOM_IMAGE_NODRAW_FLAGS SREG(25)
|
||||
#define R_UPDATE_RATE SREG(30)
|
||||
#define R_FB_FILTER_TYPE SREG(80)
|
||||
#define R_FB_FILTER_PRIM_COLOR(c) SREG(81 + c)
|
||||
@@ -139,6 +140,10 @@ extern RegEditor* gRegEditor;
|
||||
#define R_MINIMAP_DISABLED XREG(95)
|
||||
|
||||
#define R_TRANS_FADE_FLASH_ALPHA_STEP iREG(50) // Set to a negative number to start the flash
|
||||
#define R_ROOM_CULL_DEBUG_MODE iREG(86)
|
||||
#define R_ROOM_CULL_NUM_ENTRIES iREG(87)
|
||||
#define R_ROOM_CULL_USED_ENTRIES iREG(88)
|
||||
#define R_ROOM_CULL_DEBUG_TARGET iREG(89)
|
||||
|
||||
#define R_B_LABEL_DD WREG(0)
|
||||
#define R_OW_MINIMAP_X WREG(29)
|
||||
|
||||
@@ -592,8 +592,6 @@ extern Gfx gCullFrontDList[];
|
||||
extern Gfx sSetupDL[438];
|
||||
extern Gfx sFillSetupDL[12];
|
||||
extern Gfx gEmptyDL[1];
|
||||
extern Vec3f D_801C1D10;
|
||||
extern room_draw_func roomDrawFuncs[4];
|
||||
extern u32 gBitFlags[32];
|
||||
extern u16 gEquipMasks[];
|
||||
extern u16 gEquipNegMasks[];
|
||||
|
||||
@@ -563,8 +563,6 @@ typedef void (*ColChkApplyFunc)(struct PlayState*, CollisionCheckContext*, Colli
|
||||
typedef void (*ColChkVsFunc)(struct PlayState*, CollisionCheckContext*, Collider*, Collider*);
|
||||
typedef s32 (*ColChkLineFunc)(struct PlayState*, CollisionCheckContext*, Collider*, Vec3f*, Vec3f*);
|
||||
|
||||
typedef void(*room_draw_func)(struct PlayState* play, Room* room, u32 flags);
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 controllers; // bit 0 is set if controller 1 is plugged in, etc.
|
||||
/* 0x001 */ UNK_TYPE1 pad1[0x13];
|
||||
|
||||
@@ -96,7 +96,10 @@ typedef struct {
|
||||
/* 0x00 */ Vec3s pos;
|
||||
/* 0x06 */ Vec3s rot;
|
||||
/* 0x0C */ s16 fov;
|
||||
/* 0x0E */ s16 unk_0E;
|
||||
/* 0x0E */ union {
|
||||
s16 roomImageOverrideBgCamIndex;
|
||||
s16 unk_0E;
|
||||
};
|
||||
/* 0x10 */ s16 unk_10;
|
||||
} BgCamFuncData; // size = 0x12
|
||||
|
||||
|
||||
+124
-116
@@ -13,6 +13,9 @@ typedef struct {
|
||||
/* 0x4 */ uintptr_t vromEnd;
|
||||
} RomFile; // size = 0x8
|
||||
|
||||
#define ROOM_DRAW_OPA (1 << 0)
|
||||
#define ROOM_DRAW_XLU (1 << 1)
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 code;
|
||||
/* 0x1 */ u8 data1;
|
||||
@@ -213,58 +216,132 @@ typedef struct {
|
||||
/* 0x4 */ void* segment;
|
||||
} SCmdMinimapChests; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ Gfx* opaqueDl;
|
||||
/* 0x4 */ Gfx* translucentDl;
|
||||
} RoomMeshType0Params; // size = 0x8
|
||||
|
||||
// Fields TODO
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x1 */ u8 format; // 1 = single, 2 = multi
|
||||
} RoomMeshType1; // size = 0x2
|
||||
|
||||
// Size TODO
|
||||
typedef struct {
|
||||
/* 0x0 */ UNK_TYPE1 pad0[0x10];
|
||||
} RoomMeshType1Params; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ UNK_TYPE1 pad0[0x10];
|
||||
} RoomMeshType2Params; // size = 0x10
|
||||
typedef enum {
|
||||
/* 0 */ ROOM_SHAPE_TYPE_NORMAL,
|
||||
/* 1 */ ROOM_SHAPE_TYPE_IMAGE,
|
||||
/* 2 */ ROOM_SHAPE_TYPE_CULLABLE,
|
||||
/* 3 */ ROOM_SHAPE_TYPE_NONE,
|
||||
/* 4 */ ROOM_SHAPE_TYPE_MAX
|
||||
} RoomShapeType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x1 */ u8 count;
|
||||
/* 0x2 */ UNK_TYPE1 pad2[0x2];
|
||||
/* 0x4 */ RoomMeshType0Params* paramsStart;
|
||||
/* 0x8 */ RoomMeshType0Params* paramsEnd;
|
||||
} RoomMeshType0; // size = 0xC
|
||||
} RoomShapeBase; // size = 0x1
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x1 */ u8 count;
|
||||
/* 0x2 */ UNK_TYPE1 pad2[0x2];
|
||||
/* 0x4 */ RoomMeshType2Params* paramsStart;
|
||||
/* 0x8 */ RoomMeshType2Params* paramsEnd;
|
||||
} RoomMeshType2; // size = 0xC
|
||||
/* 0x0 */ Gfx* opa;
|
||||
/* 0x4 */ Gfx* xlu;
|
||||
} RoomShapeDListsEntry; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ RoomShapeBase base;
|
||||
/* 0x1 */ u8 numEntries;
|
||||
/* 0x4 */ RoomShapeDListsEntry* entries;
|
||||
/* 0x8 */ RoomShapeDListsEntry* entriesEnd;
|
||||
} RoomShapeNormal; // size = 0xC
|
||||
|
||||
typedef enum {
|
||||
/* 1 */ ROOM_SHAPE_IMAGE_AMOUNT_SINGLE = 1,
|
||||
/* 2 */ ROOM_SHAPE_IMAGE_AMOUNT_MULTI
|
||||
} RoomShapeImageAmountType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ RoomShapeBase base;
|
||||
/* 0x1 */ u8 amountType; // uses `RoomShapeImageAmountType`
|
||||
/* 0x4 */ RoomShapeDListsEntry* entry;
|
||||
} RoomShapeImageBase; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ RoomShapeImageBase base;
|
||||
/* 0x08 */ void* source;
|
||||
/* 0x0C */ u32 unk_0C;
|
||||
/* 0x10 */ void* tlut;
|
||||
/* 0x14 */ u16 width;
|
||||
/* 0x16 */ u16 height;
|
||||
/* 0x18 */ u8 fmt;
|
||||
/* 0x19 */ u8 siz;
|
||||
/* 0x1A */ u16 tlutMode;
|
||||
/* 0x1C */ u16 tlutCount;
|
||||
} RoomShapeImageSingle; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk_00;
|
||||
/* 0x02 */ u8 bgCamIndex; // the bg cam index this entry is for
|
||||
/* 0x04 */ void* source;
|
||||
/* 0x08 */ u32 unk_0C;
|
||||
/* 0x0C */ void* tlut;
|
||||
/* 0x10 */ u16 width;
|
||||
/* 0x12 */ u16 height;
|
||||
/* 0x14 */ u8 fmt;
|
||||
/* 0x15 */ u8 siz;
|
||||
/* 0x16 */ u16 tlutMode;
|
||||
/* 0x18 */ u16 tlutCount;
|
||||
} RoomShapeImageMultiBgEntry; // size = 0x1C
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ RoomShapeImageBase base;
|
||||
/* 0x8 */ u8 numBackgrounds;
|
||||
/* 0xC */ RoomShapeImageMultiBgEntry* backgrounds;
|
||||
} RoomShapeImageMulti; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ Vec3s boundsSphereCenter;
|
||||
/* 0x6 */ s16 boundsSphereRadius;
|
||||
/* 0x8 */ Gfx* opa;
|
||||
/* 0xC */ Gfx* xlu;
|
||||
} RoomShapeCullableEntry; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ RoomShapeBase base;
|
||||
/* 0x1 */ u8 numEntries;
|
||||
/* 0x4 */ RoomShapeCullableEntry* entries;
|
||||
/* 0x8 */ RoomShapeCullableEntry* entriesEnd;
|
||||
} RoomShapeCullable; // size = 0xC
|
||||
|
||||
typedef union {
|
||||
RoomMeshType0 type0;
|
||||
RoomMeshType1 type1;
|
||||
RoomMeshType2 type2;
|
||||
} RoomMesh; // size = 0xC
|
||||
RoomShapeBase base;
|
||||
RoomShapeNormal normal;
|
||||
union {
|
||||
RoomShapeImageBase base;
|
||||
RoomShapeImageSingle single;
|
||||
RoomShapeImageMulti multi;
|
||||
} image;
|
||||
RoomShapeCullable cullable;
|
||||
} RoomShape; // "Ground Shape"
|
||||
|
||||
// TODO: update ZAPD
|
||||
#define SCENE_CMD_MESH SCENE_CMD_ROOM_SHAPE
|
||||
|
||||
// TODO: Check which ones don't exist
|
||||
typedef enum {
|
||||
/* 0 */ ROOM_BEHAVIOR_TYPE1_0,
|
||||
/* 1 */ ROOM_BEHAVIOR_TYPE1_1,
|
||||
/* 2 */ ROOM_BEHAVIOR_TYPE1_2,
|
||||
/* 3 */ ROOM_BEHAVIOR_TYPE1_3, // unused
|
||||
/* 4 */ ROOM_BEHAVIOR_TYPE1_4,
|
||||
/* 5 */ ROOM_BEHAVIOR_TYPE1_5
|
||||
} RoomBehaviorType1;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ ROOM_BEHAVIOR_TYPE2_0,
|
||||
/* 1 */ ROOM_BEHAVIOR_TYPE2_1,
|
||||
/* 2 */ ROOM_BEHAVIOR_TYPE2_2,
|
||||
/* 3 */ ROOM_BEHAVIOR_TYPE2_HOT,
|
||||
/* 4 */ ROOM_BEHAVIOR_TYPE2_4,
|
||||
/* 5 */ ROOM_BEHAVIOR_TYPE2_5,
|
||||
/* 6 */ ROOM_BEHAVIOR_TYPE2_6
|
||||
} RoomBehaviorType2;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s8 num;
|
||||
/* 0x01 */ u8 unk1;
|
||||
/* 0x02 */ u8 unk2; // 3: Room is hot
|
||||
/* 0x03 */ u8 unk3;
|
||||
/* 0x02 */ u8 behaviorType2;
|
||||
/* 0x03 */ u8 behaviorType1;
|
||||
/* 0x04 */ s8 echo;
|
||||
/* 0x05 */ u8 lensMode;
|
||||
/* 0x06 */ u8 enablePosLights;
|
||||
/* 0x07 */ UNK_TYPE1 pad7[0x1];
|
||||
/* 0x08 */ RoomMesh* mesh;
|
||||
/* 0x08 */ RoomShape* roomShape;
|
||||
/* 0x0C */ void* segment;
|
||||
/* 0x10 */ UNK_TYPE1 pad10[0x4];
|
||||
} Room; // size = 0x14
|
||||
@@ -274,7 +351,7 @@ typedef struct {
|
||||
/* 0x14 */ Room prevRoom;
|
||||
/* 0x28 */ void* roomMemPages[2]; // In a scene with transitions, roomMemory is split between two pages that toggle each transition. This is one continuous range, as the second page allocates from the end
|
||||
/* 0x30 */ u8 activeMemPage; // 0 - First page in memory, 1 - Second page
|
||||
/* 0x31 */ s8 unk31;
|
||||
/* 0x31 */ s8 status;
|
||||
/* 0x32 */ UNK_TYPE1 pad32[0x2];
|
||||
/* 0x34 */ void* activeRoomVram;
|
||||
/* 0x38 */ DmaRequest dmaRequest;
|
||||
@@ -286,15 +363,17 @@ typedef struct {
|
||||
/* 0x7A */ UNK_TYPE2 unk7A[3];
|
||||
} RoomContext; // size = 0x80
|
||||
|
||||
typedef struct {
|
||||
typedef void(*RoomDrawHandler)(struct PlayState* play, Room* room, u32 flags);
|
||||
|
||||
typedef struct TransitionActorEntry {
|
||||
struct {
|
||||
s8 room; // Room to switch to
|
||||
s8 bgCamIndex; // How the camera reacts during the transition. -2 for spiral staircase. -1 for generic door. 0+ will index scene CamData
|
||||
} /* 0x0 */ sides[2]; // 0 = front, 1 = back
|
||||
/* 0x4 */ s16 id;
|
||||
/* 0x4 */ s16 id;
|
||||
/* 0x6 */ Vec3s pos;
|
||||
/* 0xC */ s16 rotY;
|
||||
/* 0xE */ u16 params;
|
||||
/* 0xC */ s16 rotY;
|
||||
/* 0xE */ u16 params;
|
||||
} TransitionActorEntry; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
@@ -390,77 +469,6 @@ typedef struct {
|
||||
/* 0x00C */ ObjectStatus status[OBJECT_EXCHANGE_BANK_MAX];
|
||||
} ObjectContext; // size = 0x958
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 headerType;
|
||||
} MeshHeaderBase; // size = 0x1
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ MeshHeaderBase base;
|
||||
/* 0x1 */ u8 numEntries;
|
||||
/* 0x4 */ u32 dListStart;
|
||||
/* 0x8 */ u32 dListEnd;
|
||||
} MeshHeader0; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 opaqueDList;
|
||||
/* 0x4 */ u32 translucentDList;
|
||||
} MeshEntry0; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ MeshHeaderBase base;
|
||||
/* 0x1 */ u8 format;
|
||||
/* 0x4 */ u32 entryRecord;
|
||||
} MeshHeader1Base; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ MeshHeader1Base base;
|
||||
/* 0x08 */ u32 imagePtr;
|
||||
/* 0x0C */ u32 unknown;
|
||||
/* 0x10 */ u32 unknown2;
|
||||
/* 0x14 */ u16 bgWidth;
|
||||
/* 0x16 */ u16 bgHeight;
|
||||
/* 0x18 */ u8 imageFormat;
|
||||
/* 0x19 */ u8 imageSize;
|
||||
/* 0x1A */ u16 imagePal;
|
||||
/* 0x1C */ u16 imageFlip;
|
||||
} MeshHeader1Single; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ MeshHeader1Base base;
|
||||
/* 0x8 */ u8 bgCnt;
|
||||
/* 0xC */ u32 bgRecordPtr;
|
||||
} MeshHeader1Multi; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unknown;
|
||||
/* 0x02 */ s8 bgID;
|
||||
/* 0x04 */ u32 imagePtr;
|
||||
/* 0x08 */ u32 unknown2;
|
||||
/* 0x0C */ u32 unknown3;
|
||||
/* 0x10 */ u16 bgWidth;
|
||||
/* 0x12 */ u16 bgHeight;
|
||||
/* 0x14 */ u8 imageFmt;
|
||||
/* 0x15 */ u8 imageSize;
|
||||
/* 0x16 */ u16 imagePal;
|
||||
/* 0x18 */ u16 imageFlip;
|
||||
} BackgroundRecord; // size = 0x1C
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 playerXMax;
|
||||
/* 0x2 */ s16 playerZMax;
|
||||
/* 0x4 */ s16 playerXMin;
|
||||
/* 0x6 */ s16 playerZMin;
|
||||
/* 0x8 */ u32 opaqueDList;
|
||||
/* 0xC */ u32 translucentDList;
|
||||
} MeshEntry2; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ MeshHeaderBase base;
|
||||
/* 0x1 */ u8 numEntries;
|
||||
/* 0x4 */ u32 dListStart;
|
||||
/* 0x8 */ u32 dListEnd;
|
||||
} MeshHeader2; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 count; // number of points in the path
|
||||
/* 0x1 */ u8 unk1;
|
||||
@@ -846,7 +854,7 @@ typedef enum {
|
||||
/* 0x07 */ SCENE_CMD_ID_SPECIAL_FILES,
|
||||
/* 0x08 */ SCENE_CMD_ID_ROOM_BEHAVIOR,
|
||||
/* 0x09 */ SCENE_CMD_ID_UNK_09,
|
||||
/* 0x0A */ SCENE_CMD_ID_MESH,
|
||||
/* 0x0A */ SCENE_CMD_ID_ROOM_SHAPE,
|
||||
/* 0x0B */ SCENE_CMD_ID_OBJECT_LIST,
|
||||
/* 0x0C */ SCENE_CMD_ID_LIGHT_LIST,
|
||||
/* 0x0D */ SCENE_CMD_ID_PATH_LIST,
|
||||
@@ -905,8 +913,8 @@ typedef enum {
|
||||
#define SCENE_CMD_UNK_09() \
|
||||
{ SCENE_CMD_ID_UNK_09, 0, CMD_W(0) }
|
||||
|
||||
#define SCENE_CMD_MESH(meshHeader) \
|
||||
{ SCENE_CMD_ID_MESH, 0, CMD_PTR(meshHeader) }
|
||||
#define SCENE_CMD_ROOM_SHAPE(roomShape) \
|
||||
{ SCENE_CMD_ID_ROOM_SHAPE, 0, CMD_PTR(roomShape) }
|
||||
|
||||
#define SCENE_CMD_OBJECT_LIST(numObjects, objectList) \
|
||||
{ SCENE_CMD_ID_OBJECT_LIST, numObjects, CMD_PTR(objectList) }
|
||||
|
||||
Reference in New Issue
Block a user