mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-09 05:43:18 -04:00
Port some of z_room from the oot decomp
This commit is contained in:
+13
-13
@@ -164,7 +164,7 @@ void func_800860B8(void); // func_800860B8
|
||||
void func_800860D8(void); // func_800860D8
|
||||
void func_80086110(void); // func_80086110
|
||||
void func_80086258(void); // func_80086258
|
||||
void func_80086280(void); // func_80086280
|
||||
void func_80086280(char* param_1, u32 param_2); // func_80086280
|
||||
void func_800862B4(void); // func_800862B4
|
||||
void* StartHeap_AllocMin1(u32 size); // func_800862E0
|
||||
void StartHeap_FreeNull(void* pvParm1); // func_80086310
|
||||
@@ -2012,7 +2012,7 @@ void func_8010A194(void); // func_8010A194
|
||||
void func_8010A208(void); // func_8010A208
|
||||
void func_8010A238(void); // func_8010A238
|
||||
void func_8010A2AC(void); // func_8010A2AC
|
||||
void func_8010A2DC(void); // func_8010A2DC
|
||||
void func_8010A2DC(GlobalContext* ctxt); // func_8010A2DC
|
||||
void func_8010A33C(GlobalContext* ctxt, s16 param_2); // func_8010A33C
|
||||
void func_8010A410(void); // func_8010A410
|
||||
void func_8010A430(void); // func_8010A430
|
||||
@@ -2373,19 +2373,19 @@ void func_8012CEA8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_
|
||||
void func_8012CF0C(GraphicsContext* gCtxt, int iParm2, int iParm3, unsigned int uParm4, u8 param_5, u8 param_6); // func_8012CF0C
|
||||
void func_8012D374(void); // func_8012D374
|
||||
void func_8012D40C(f32* param_1, f32* param_2, s16* param_3); // func_8012D40C
|
||||
void Room_nop8012D510(GlobalContext* ctxt, LoadedRoom* room, UNK_PTR param_3, UNK_TYPE1 param_4); // func_8012D510
|
||||
void Room_DrawType3Mesh(GlobalContext* ctxt, LoadedRoom* room, u32 flags); // func_8012D528
|
||||
void Room_DrawType0Mesh(GlobalContext* ctxt, LoadedRoom* room, u32 flags); // func_8012D53C
|
||||
void Room_DrawType2Mesh(GlobalContext* ctxt, LoadedRoom* room, u32 flags); // func_8012D750
|
||||
void func_8012DEE8(GlobalContext* ctxt, LoadedRoom* room, u32 flags); // func_8012DEE8
|
||||
void func_8012E254(void); // func_8012E254
|
||||
void func_8012E32C(GlobalContext* ctxt, LoadedRoom* room, u32 flags); // func_8012E32C
|
||||
void Room_DrawType1Mesh(GlobalContext* ctxt, LoadedRoom* room, u32 flags); // func_8012E6A8
|
||||
void Room_nop8012D510(GlobalContext* ctxt, Room* room, UNK_PTR param_3, UNK_TYPE1 param_4); // func_8012D510
|
||||
void Room_DrawType3Mesh(GlobalContext* ctxt, Room* room, u32 flags); // func_8012D528
|
||||
void Room_DrawType0Mesh(GlobalContext* ctxt, Room* room, u32 flags); // func_8012D53C
|
||||
void Room_DrawType2Mesh(GlobalContext* ctxt, Room* room, u32 flags); // func_8012D750
|
||||
void func_8012DEE8(GlobalContext* ctxt, Room* room, u32 flags); // func_8012DEE8
|
||||
u32 func_8012E254(int param_1, GlobalContext* ctxt); // func_8012E254
|
||||
void func_8012E32C(GlobalContext* ctxt, Room* room, u32 flags); // func_8012E32C
|
||||
void Room_DrawType1Mesh(GlobalContext* ctxt, Room* room, u32 flags); // func_8012E6A8
|
||||
void Room_Init(GlobalContext* ctxt, RoomContext* roomCtxt); // func_8012E710
|
||||
u32 Room_AllocateAndLoad(GlobalContext* ctxt, RoomContext* roomCtxt); // func_8012E750
|
||||
unsigned int Room_StartRoomTransition(GlobalContext* ctxt, RoomContext* roomCtxt, s32 index); // func_8012E96C
|
||||
s32 Room_StartRoomTransition(GlobalContext* ctxt, RoomContext* roomCtxt, s32 index); // func_8012E96C
|
||||
s32 Room_HandleLoadCallbacks(GlobalContext* ctxt, RoomContext* roomCtxt); // func_8012EAA8
|
||||
void Room_DrawRoomMesh(GlobalContext* ctxt, LoadedRoom* room, u32 flags); // func_8012EBA8
|
||||
void Room_Draw(GlobalContext* ctxt, Room* room, u32 flags); // func_8012EBA8
|
||||
void func_8012EBF8(GlobalContext* ctxt, RoomContext* roomCtxt); // func_8012EBF8
|
||||
unsigned int func_8012EC80(GlobalContext* ctxt); // func_8012EC80
|
||||
void func_8012ED34(s16 param_1); // func_8012ED34
|
||||
@@ -3891,7 +3891,7 @@ void func_801A3AC0(void); // func_801A3AC0
|
||||
void func_801A3AEC(void); // func_801A3AEC
|
||||
void func_801A3B48(void); // func_801A3B48
|
||||
void func_801A3B90(void); // func_801A3B90
|
||||
void func_801A3CD8(void); // func_801A3CD8
|
||||
void func_801A3CD8(s8 param_1); // func_801A3CD8
|
||||
void func_801A3CF4(void); // func_801A3CF4
|
||||
void func_801A3D98(void); // func_801A3D98
|
||||
void func_801A3E38(void); // func_801A3E38
|
||||
|
||||
@@ -91,6 +91,9 @@ typedef u32 OSIntMask;
|
||||
|
||||
typedef u32 OSPageMask;
|
||||
|
||||
#define OS_MESG_NOBLOCK 0
|
||||
#define OS_MESG_BLOCK 1
|
||||
|
||||
typedef void* OSMesg;
|
||||
|
||||
typedef struct {
|
||||
|
||||
+74
-54
@@ -189,28 +189,6 @@ typedef struct {
|
||||
/* 0xC */ void* appendEnd;
|
||||
} DisplayList;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x1 */ u8 count;
|
||||
/* 0x2 */ UNK_TYPE1 pad2[2];
|
||||
/* 0x4 */ u32 paramsStart;
|
||||
/* 0x8 */ UNK_TYPE1 pad8[4];
|
||||
} DisplayMeshHeader;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 opaqueDl;
|
||||
/* 0x4 */ u32 translucentDl;
|
||||
} DisplayMeshType0Params;
|
||||
|
||||
// Size TODO
|
||||
typedef struct {
|
||||
/* 0x0 */ UNK_TYPE1 pad0[16];
|
||||
} DisplayMeshType1Params;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ UNK_TYPE1 pad0[16];
|
||||
} DisplayMeshType2Params;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 vromStart;
|
||||
/* 0x04 */ u32 vramStart;
|
||||
@@ -435,19 +413,6 @@ typedef struct {
|
||||
/* 0x08 */ Lights7 lights;
|
||||
} LightMapper;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s8 index;
|
||||
/* 0x01 */ UNK_TYPE1 pad1[2];
|
||||
/* 0x03 */ u8 unk3;
|
||||
/* 0x04 */ s8 unk4;
|
||||
/* 0x05 */ UNK_TYPE1 pad5[1];
|
||||
/* 0x06 */ u8 enablePosLights;
|
||||
/* 0x07 */ UNK_TYPE1 pad7[1];
|
||||
/* 0x08 */ DisplayMeshHeader* meshHeader;
|
||||
/* 0x0C */ void* vramAddr;
|
||||
/* 0x10 */ UNK_TYPE1 pad10[4];
|
||||
} LoadedRoom;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 vromStart;
|
||||
/* 0x4 */ u32 vromEnd;
|
||||
@@ -476,28 +441,31 @@ typedef struct {
|
||||
/* 0x20 */ u16 fracPart[16];
|
||||
} RSPMatrix;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ LoadedRoom currRoom;
|
||||
/* 0x14 */ LoadedRoom 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;
|
||||
/* 0x32 */ UNK_TYPE1 pad32[2];
|
||||
/* 0x34 */ u32 activeRoomVram;
|
||||
/* 0x38 */ DmaRequest dmaReq;
|
||||
/* 0x58 */ OSMesgQueue roomDmaCallback;
|
||||
/* 0x70 */ OSMesg roomDmaCallbackMsg[1];
|
||||
/* 0x74 */ UNK_TYPE1 pad74[4];
|
||||
/* 0x78 */ s8 unk78;
|
||||
/* 0x79 */ UNK_TYPE1 pad79[1];
|
||||
/* 0x7A */ UNK_TYPE2 unk7A[3];
|
||||
} RoomContext;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 vromStart;
|
||||
/* 0x4 */ u32 vromEnd;
|
||||
} RoomFileLocation;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 opaqueDl;
|
||||
/* 0x4 */ u32 translucentDl;
|
||||
} RoomMeshType0Params;
|
||||
|
||||
// Fields TODO
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x1 */ u8 format; // 1 = single, 2 = multi
|
||||
} RoomMeshType1;
|
||||
|
||||
// Size TODO
|
||||
typedef struct {
|
||||
/* 0x0 */ UNK_TYPE1 pad0[16];
|
||||
} RoomMeshType1Params;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ UNK_TYPE1 pad0[16];
|
||||
} RoomMeshType2Params;
|
||||
|
||||
// Extra information in the save context that is not saved
|
||||
typedef struct {
|
||||
/* 0x000 */ UNK_TYPE1 pad0[712];
|
||||
@@ -961,6 +929,22 @@ typedef struct {
|
||||
/* 0x0C */ Vector3s rot;
|
||||
} PosRot;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x1 */ u8 count;
|
||||
/* 0x2 */ UNK_TYPE1 pad2[2];
|
||||
/* 0x4 */ RoomMeshType0Params* paramsStart;
|
||||
/* 0x8 */ RoomMeshType0Params* paramsEnd;
|
||||
} RoomMeshType0;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x1 */ u8 count;
|
||||
/* 0x2 */ UNK_TYPE1 pad2[2];
|
||||
/* 0x4 */ RoomMeshType2Params* paramsStart;
|
||||
/* 0x8 */ RoomMeshType2Params* paramsEnd;
|
||||
} RoomMeshType2;
|
||||
|
||||
// Permanent save context, kept in regular save files
|
||||
typedef struct {
|
||||
/* 0x0000 */ u32 entranceIndex; // bits 0-3 : offset; 4-8: spawn index; 9-15: scene index
|
||||
@@ -1162,7 +1146,7 @@ typedef struct {
|
||||
/* 0xC0 */ UNK_TYPE1 padC0[1];
|
||||
/* 0xC1 */ u8 unkC1;
|
||||
/* 0xC2 */ u8 unkC2;
|
||||
/* 0xC3 */ UNK_TYPE1 padC3[1];
|
||||
/* 0xC3 */ u8 unkC3;
|
||||
/* 0xC4 */ RGB unkC4;
|
||||
/* 0xC7 */ s8 unkC7;
|
||||
/* 0xC8 */ s8 unkC8;
|
||||
@@ -1191,6 +1175,12 @@ typedef struct {
|
||||
/* 0x11F23 */ UNK_TYPE1 pad11F23[437];
|
||||
} MessageContext;
|
||||
|
||||
typedef union {
|
||||
/* 0x0 */ RoomMeshType0 type0;
|
||||
/* 0x0 */ RoomMeshType1 type1;
|
||||
/* 0x0 */ RoomMeshType2 type2;
|
||||
} RoomMesh;
|
||||
|
||||
// Full save context
|
||||
typedef struct {
|
||||
/* 0x0000 */ SaveContextPerm perm;
|
||||
@@ -1204,6 +1194,36 @@ typedef struct {
|
||||
/* 0xC */ ColTriInit* elemInit;
|
||||
} ColTriGroupInit;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s8 index;
|
||||
/* 0x01 */ UNK_TYPE1 pad1[2];
|
||||
/* 0x03 */ u8 unk3;
|
||||
/* 0x04 */ s8 unk4;
|
||||
/* 0x05 */ UNK_TYPE1 pad5[1];
|
||||
/* 0x06 */ u8 enablePosLights;
|
||||
/* 0x07 */ UNK_TYPE1 pad7[1];
|
||||
/* 0x08 */ RoomMesh* mesh;
|
||||
/* 0x0C */ void* vramAddr;
|
||||
/* 0x10 */ UNK_TYPE1 pad10[4];
|
||||
} Room;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Room currRoom;
|
||||
/* 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;
|
||||
/* 0x32 */ UNK_TYPE1 pad32[2];
|
||||
/* 0x34 */ u32 activeRoomVram;
|
||||
/* 0x38 */ DmaRequest dmaReq;
|
||||
/* 0x58 */ OSMesgQueue roomDmaCallback;
|
||||
/* 0x70 */ OSMesg roomDmaCallbackMsg[1];
|
||||
/* 0x74 */ UNK_TYPE1 pad74[4];
|
||||
/* 0x78 */ s8 unk78;
|
||||
/* 0x79 */ s8 unk79;
|
||||
/* 0x7A */ UNK_TYPE2 unk7A[3];
|
||||
} RoomContext;
|
||||
|
||||
typedef struct ActorBgMbarChair ActorBgMbarChair;
|
||||
|
||||
typedef struct ActorEnBji01 ActorEnBji01;
|
||||
@@ -1518,7 +1538,7 @@ typedef void(*global_context_func)(GlobalContext*);
|
||||
|
||||
typedef void(*light_map_positional_func)(LightMapper* mapper, void* params, GlobalContext* ctxt);
|
||||
|
||||
typedef void(*room_draw_func)(GlobalContext* ctxt, LoadedRoom* room, u32 flags);
|
||||
typedef void(*room_draw_func)(GlobalContext* ctxt, Room* room, u32 flags);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ draw_func unk0;
|
||||
|
||||
Reference in New Issue
Block a user