From 6a74885a38f5b924e3453c7f9a807b441c71a19a Mon Sep 17 00:00:00 2001 From: rozlette Date: Sat, 28 Dec 2019 00:24:30 -0600 Subject: [PATCH] Little bit of work on z_scene_proc --- include/functions.h | 67 ++++++++++++------------ include/structs.h | 18 ++++++- include/variables.h | 13 +++-- linker_scripts/code_script.txt | 2 +- src/code/z_scene_proc.c | 87 +++++++++++++++++++++++++++++++ src/test.old | 73 -------------------------- tables/files_with_nonmatching.txt | 1 + tables/functions.py | 64 +++++++++++------------ tables/variables.py | 13 +++-- undef.txt | 4 +- 10 files changed, 183 insertions(+), 159 deletions(-) create mode 100644 src/code/z_scene_proc.c delete mode 100644 src/test.old diff --git a/include/functions.h b/include/functions.h index c9bde264da..0946e59f92 100644 --- a/include/functions.h +++ b/include/functions.h @@ -484,7 +484,6 @@ void func_80096410(void); // func_80096410 void func_800964D0(void); // func_800964D0 s32 __osSpSetPc(u32 data); // func_80096510 void func_80096540(void); // func_80096540 -// UNK_RET func_80096770(UNK_ARGS); void func_800967A0(void); // func_800967A0 u32 __osGetWatchLo(void); // func_80096810 void __osSetWatchLo(u32 value); // func_80096820 @@ -890,7 +889,7 @@ void func_800BDC5C(void); // func_800BDC5C void func_800BDCF4(void); // func_800BDCF4 void func_800BDFB0(void); // func_800BDFB0 void func_800BDFC0(GlobalContext* ctxt, UNK_TYPE4 uParm2); // func_800BDFC0 -void func_800BE03C(void); // func_800BE03C +void func_800BE03C(GlobalContext* ctxt, Gfx* dl); // func_800BE03C void func_800BE0B8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5); // func_800BE0B8 void func_800BE184(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6); // func_800BE184 void func_800BE22C(void); // func_800BE22C @@ -2440,42 +2439,42 @@ void func_801306A4(GlobalContext* ctxt); // func_801306A4 s32 Scene_ProcessHeader(GlobalContext* ctxt, SceneHeaderEntry* header); // func_801306E8 u32 Scene_CreateEntrance(u32 sceneIndex, u32 spawnIndex, u32 offset); // func_80130768 void func_80130784(void); // func_80130784 -void func_801307C0(void); // func_801307C0 -void func_801307F4(void); // func_801307F4 +void func_801307C0(GlobalContext* ctxt); // func_801307C0 +void func_801307F4(GlobalContext* ctxt); // func_801307F4 void func_80130834(void); // func_80130834 -void func_801308A0(void); // func_801308A0 +void SceneProc_DrawType0Texture(GlobalContext* ctxt, unsigned int param_2, UNK_TYPE4 param_3); // func_801308A0 void func_80130940(void); // func_80130940 -void func_801309F4(void); // func_801309F4 -void func_80130A94(void); // func_80130A94 -void func_80130C5C(void); // func_80130C5C +void SceneProc_DrawType1Texture(void); // func_801309F4 +void func_80130A94(GlobalContext* ctxt, unsigned int param_2, u8* param_3, u8* param_4); // func_80130A94 +void SceneProc_DrawType2Texture(void); // func_80130C5C void func_80130D0C(void); // func_80130D0C -void func_80130D3C(void); // func_80130D3C +void SceneProc_DrawType3Texture(void); // func_80130D3C void func_80130F58(void); // func_80130F58 void func_8013115C(void); // func_8013115C -void func_801311B4(void); // func_801311B4 -void func_80131580(void); // func_80131580 -void func_80131690(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5); // func_80131690 -void func_80131758(void); // func_80131758 -void func_8013178C(void); // func_8013178C -void func_801317C0(void); // func_801317C0 +void SceneProc_DrawType4Texture(void); // func_801311B4 +void SceneProc_DrawType5Texture(void); // func_80131580 +void SceneProc_DrawAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures, f32 param_3, u32 step, u32 flags); // func_80131690 +void SceneProc_DrawAllSceneAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures); // func_80131758 +void SceneProc_DrawOpaqueSceneAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures); // func_8013178C +void SceneProc_DrawTranslucentSceneAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures); // func_801317C0 void func_801317F4(void); // func_801317F4 void func_8013182C(void); // func_8013182C void func_80131864(void); // func_80131864 -void func_8013189C(void); // func_8013189C -void func_801318C8(void); // func_801318C8 -void func_801318F4(void); // func_801318F4 +void SceneProc_DrawAllAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures, u32 step); // func_8013189C +void SceneProc_DrawOpaqueAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures, u32 step); // func_801318C8 +void SceneProc_DrawTranslucentAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures, u32 step); // func_801318F4 void func_80131920(void); // func_80131920 void func_8013194C(void); // func_8013194C void func_80131978(void); // func_80131978 -void func_801319A4(void); // func_801319A4 -void func_801319CC(void); // func_801319CC -void func_80131CDC(void); // func_80131CDC -void func_80131DE4(void); // func_80131DE4 +void func_801319A4(GlobalContext* ctxt); // func_801319A4 +void func_801319CC(GlobalContext* ctxt); // func_801319CC +void func_80131CDC(GlobalContext* ctxt); // func_80131CDC +void func_80131DE4(GlobalContext* ctxt); // func_80131DE4 void func_80131DF0(void); // func_80131DF0 void func_80131E58(s32* param_1, s32 param_2, u32 param_3); // func_80131E58 -void func_80131EC0(void); // func_80131EC0 -void func_80131F90(void); // func_80131F90 -void func_80131FC0(void); // func_80131FC0 +void func_80131EC0(GlobalContext* ctxt); // func_80131EC0 +void func_80131F90(GlobalContext* ctxt); // func_80131F90 +void func_80131FC0(GlobalContext* ctxt); // func_80131FC0 EntranceRecord* SceneTable_LookupEntrance(u32 entrance); // func_801322C0 s32 SceneTable_LookupEntranceScene(u32 entrance); // func_8013230C s32 SceneTable_LookupEntranceAbsoluteScene(u32 entrance); // func_80132338 @@ -3736,8 +3735,6 @@ void func_8019AB40(void); // func_8019AB40 void func_8019AC10(void); // func_8019AC10 void func_8019ACEC(void); // func_8019ACEC void func_8019ADBC(void); // func_8019ADBC -// UNK_RET func_8019AE40(UNK_ARGS); -// UNK_RET func_8019AEC0(UNK_ARGS); void func_8019AF00(void); // func_8019AF00 void func_8019AF58(void); // func_8019AF58 void func_8019AFE8(void); // func_8019AFE8 @@ -15720,14 +15717,14 @@ void func_80BD5118(void); // func_80BD5118 void func_80BD5134(void); // func_80BD5134 void func_80BD51DC(void); // func_80BD51DC void func_80BD5200(void); // func_80BD5200 -void func_80BD53C0(void); // func_80BD53C0 -void func_80BD546C(void); // func_80BD546C -void func_80BD5498(void); // func_80BD5498 -void func_80BD54BC(void); // func_80BD54BC -void func_80BD5500(void); // func_80BD5500 -void func_80BD5530(void); // func_80BD5530 -void func_80BD556C(void); // func_80BD556C -void func_80BD5590(void); // func_80BD5590 +void BgIkanaRay_Init(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD53C0 +void BgIkanaRay_Fini(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD546C +void BgIkanaRay_SetDeactivated(ActorBgIkanaRay* this); // func_80BD5498 +void BgIkanaRay_UpdateCheckForActivation(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD54BC +void BgIkanaRay_SetActivated(ActorBgIkanaRay* this); // func_80BD5500 +void BgIkanaRay_UpdateActivated(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD5530 +void BgIkanaRay_Main(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD556C +void BgIkanaRay_Draw(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD5590 void func_80BD5690(void); // func_80BD5690 void func_80BD5728(void); // func_80BD5728 void func_80BD57F4(void); // func_80BD57F4 diff --git a/include/structs.h b/include/structs.h index 5a98ec8f65..5222c3868f 100644 --- a/include/structs.h +++ b/include/structs.h @@ -45,6 +45,12 @@ typedef struct { /* 0x6 */ s16 floorNodeHead; } ActorMeshPolyLists; +typedef struct { +/* 0x0 */ s8 segment; +/* 0x2 */ s16 type; +/* 0x4 */ u32 params; +} AnimatedTexture; + typedef struct { /* 0x0 */ u16 floorHead; /* 0x2 */ u16 wallHead; @@ -1944,7 +1950,8 @@ struct GlobalContext { /* 0x187B0 */ z_Matrix unk187B0; /* 0x187F0 */ UNK_TYPE1 pad187F0[12]; /* 0x187FC */ z_Matrix unk187FC; -/* 0x1883C */ UNK_TYPE1 pad1883C[8]; +/* 0x1883C */ UNK_TYPE1 pad1883C[4]; +/* 0x18840 */ u32 unk18840; /* 0x18844 */ u8 unk18844; /* 0x18845 */ u8 unk18845; /* 0x18846 */ u16 sceneNumActorsToLoad; @@ -1958,7 +1965,7 @@ struct GlobalContext { /* 0x18860 */ void* exitList; /* 0x18864 */ void* pathList; /* 0x18868 */ UNK_TYPE1 pad18868[4]; -/* 0x1886C */ void* textureAnimations; +/* 0x1886C */ AnimatedTexture* sceneTextureAnimations; /* 0x18870 */ UNK_TYPE1 pad18870[4]; /* 0x18874 */ u8 unk18874; /* 0x18875 */ s8 unk18875; @@ -2050,6 +2057,13 @@ typedef struct { /* 0x261 */ UNK_TYPE1 pad261[3]; } ActorArrowFire; +typedef struct { +/* 0x000 */ Actor base; +/* 0x144 */ ColCylinder cylinder; +/* 0x190 */ AnimatedTexture* animatedTextures; +/* 0x194 */ actor_func update; +} ActorBgIkanaRay; + struct ActorBgMbarChair { /* 0x000 */ Actor base; /* 0x144 */ UNK_TYPE1 pad144[24]; diff --git a/include/variables.h b/include/variables.h index f9b628a334..ed5aa647ea 100644 --- a/include/variables.h +++ b/include/variables.h @@ -1023,9 +1023,9 @@ extern UNK_TYPE1 D_801C2660; // D_801C2660 extern scene_header_func sceneHeaderFuncTable[31]; // D_801C26A8 extern UNK_TYPE1 D_801C2730; // D_801C2730 extern ObjectFileTableEntry objectFileTable[643]; // D_801C2740 -extern UNK_TYPE1 D_801C3B60; // D_801C3B60 -extern UNK_PTR D_801C3BB8; // D_801C3BB8 -extern UNK_PTR D_801C3BD8; // D_801C3BD8 +extern Gfx D_801C3B60[11]; // D_801C3B60 +extern global_context_func D_801C3BB8[8]; // D_801C3BB8 +extern UNK_PTR gSceneProcDrawFuncs; // D_801C3BD8 extern UNK_TYPE1 D_801C3C50; // D_801C3C50 extern UNK_TYPE1 D_801C3C80; // D_801C3C80 extern UNK_TYPE1 D_801C3C88; // D_801C3C88 @@ -2710,8 +2710,8 @@ extern UNK_TYPE1 D_801F5A2C; // D_801F5A2C extern GlobalContext* D_801F5A90; // D_801F5A90 extern UNK_TYPE1 D_801F5A96; // D_801F5A96 extern UNK_TYPE2 D_801F5A98; // D_801F5A98 -extern UNK_TYPE1 D_801F5AA0; // D_801F5AA0 -extern UNK_TYPE1 D_801F5AA4; // D_801F5AA4 +extern u32 gSceneProcStep; // D_801F5AA0 +extern u32 gSceneProcFlags; // D_801F5AA4 extern UNK_TYPE1 D_801F5AA8; // D_801F5AA8 extern UNK_TYPE1 D_801F5AB0; // D_801F5AB0 extern UNK_TYPE1 D_801F5AB4; // D_801F5AB4 @@ -13837,9 +13837,8 @@ extern OverlayBlockSizes bgIkanaBombwallOverlayInfo; // D_80BD5300 extern u32 bgIkanaBombwallOverlayRelocations[39]; // D_80BD5314 extern u32 bgIkanaBombwallOverlayInfoOffset; // D_80BD53BC extern ActorInitData bgIkanaRayInitData; // D_80BD55D0 -extern UNK_TYPE1 D_80BD55F0; // D_80BD55F0 +extern ColCylinderInit bgIkanaRayCylinderInit; // D_80BD55F0 extern ActorInitVar bgIkanaRayCompInit[4]; // D_80BD561C -extern UNK_TYPE1 D_80BD562C; // D_80BD562C extern OverlayBlockSizes bgIkanaRayOverlayInfo; // D_80BD5630 extern u32 bgIkanaRayOverlayRelocations[17]; // D_80BD5644 extern u32 bgIkanaRayOverlayInfoOffset; // D_80BD568C diff --git a/linker_scripts/code_script.txt b/linker_scripts/code_script.txt index 904ad012e0..376db07a48 100644 --- a/linker_scripts/code_script.txt +++ b/linker_scripts/code_script.txt @@ -264,7 +264,7 @@ SECTIONS build/src/code/z_room.o(.text) build/asm/code_0x8012EC80.o(.text) build/asm/z_scene.o(.text) - build/asm/z_scene_proc.o(.text) + build/src/code/z_scene_proc.o(.text) build/asm/z_scene_table.o(.text) build/asm/code_0x801323D0.o(.text) build/asm/z_skelanime.o(.text) diff --git a/src/code/z_scene_proc.c b/src/code/z_scene_proc.c new file mode 100644 index 0000000000..1cd8d75341 --- /dev/null +++ b/src/code/z_scene_proc.c @@ -0,0 +1,87 @@ +#include +#include + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_801307C0.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_801307F4.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80130834.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/SceneProc_DrawType0Texture.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80130940.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/SceneProc_DrawType1Texture.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80130A94.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/SceneProc_DrawType2Texture.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80130D0C.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/SceneProc_DrawType3Texture.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80130F58.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_8013115C.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/SceneProc_DrawType4Texture.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/SceneProc_DrawType5Texture.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/SceneProc_DrawAnimatedTextures.asm") + +void SceneProc_DrawAllSceneAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures) { + SceneProc_DrawAnimatedTextures(ctxt, textures, 1, ctxt->unk18840, 3); +} + +void SceneProc_DrawOpaqueSceneAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures) { + SceneProc_DrawAnimatedTextures(ctxt, textures, 1, ctxt->unk18840, 1); +} + +void SceneProc_DrawTranslucentSceneAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures) { + SceneProc_DrawAnimatedTextures(ctxt, textures, 1, ctxt->unk18840, 2); +} + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_801317F4.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_8013182C.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80131864.asm") + +void SceneProc_DrawAllAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures, u32 step) { + SceneProc_DrawAnimatedTextures(ctxt, textures, 1, step, 3); +} + +void SceneProc_DrawOpaqueAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures, u32 step) { + SceneProc_DrawAnimatedTextures(ctxt, textures, 1, step, 1); +} + +void SceneProc_DrawTranslucentAnimatedTextures(GlobalContext* ctxt, AnimatedTexture* textures, u32 step) { + SceneProc_DrawAnimatedTextures(ctxt, textures, 1, step, 2); +} + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80131920.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_8013194C.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80131978.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_801319A4.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_801319CC.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80131CDC.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80131DE4.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80131DF0.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80131E58.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80131EC0.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80131F90.asm") + +GLOBAL_ASM("./asm/nonmatching/z_scene_proc/func_80131FC0.asm") + diff --git a/src/test.old b/src/test.old deleted file mode 100644 index 056ecd77d4..0000000000 --- a/src/test.old +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include - - -void func_80174BF0(void* a0) { - u32 s0; - s16* sp38; - s16 v0; - - D_801D1520 = 320; - D_801D1524 = 240; - - func_8010C0C0(); - func_80083BC4(); - func_801792A4(); - func_80179260(); - - D_801D1528 = 0x80780000 - (u32)&D_803824C0; - func_800865F8((u32)&D_803824C0, D_801D1528); - - func_800E93E0(); - - staticContext->unkD4 = 0; - - osCreateMesgQueue(&D_801F8160, D_801F8178, 1); - - osSetEventMesg(5, &D_801F8160, NULL); - - osCreateMesgQueue(&D_801F8500, D_801F8518, 60); - - func_80085320(&D_801FB2D8, &D_801F9FB8, &D_801FA5B8_, 0, 256, &D_801DFD70); - - func_801772A0(&D_801F81C0, &D_801FA5B8, 16, D_8009B290, 1, &D_80099EF0); - - func_8008189C(); - - func_80081250(&D_80099EF0, &D_801F84F8, &D_801F8500); - - func_80085320(&D_801FB2F8, &D_801FA5B8, &D_801FADB8_, 0, 256, &D_801DFD78); - - func_80173074(&D_801FB338, &D_801FADB8, 11, 10, &D_801F81C0, &D_80099EF0); - - func_80085320(&D_801FB318, &D_801FADB8, &D_801FB2B8_, 0, 256, &D_801DFD80); - - func_80176194(&D_801F8160, &D_80099EF0, 7, 15, &D_801FADB8); - - func_80173048(&D_801FB338); - - func_80085320(&D_801FB2B8, &D_801F87B8, &D_801F9FB8_, 0, 256, &D_801DFD88); - - osCreateThread(&D_801F8608, 4, (void (*)(void*))func_801748A0, a0, &D_801F9FB8_, 9); - osStartThread(&D_801F8608); - - s0 = 0; - while (s0 == 0) { - sp38 = NULL; - osRecvMesg(&D_801F8500, (OSMesg*)&sp38, 1); - - if (sp38 == NULL) break; - - v0 = *sp38; - - if (v0 == 3) { - s0 = 1; - } else if (v0 == 4) { - func_8010C164(); - } - } - - func_800812DC(&D_80099EF0, &D_801F84F8); - - osDestroyThread(&D_801F8608); -} diff --git a/tables/files_with_nonmatching.txt b/tables/files_with_nonmatching.txt index 345f9bd9cf..7c8c671071 100644 --- a/tables/files_with_nonmatching.txt +++ b/tables/files_with_nonmatching.txt @@ -8,3 +8,4 @@ z_actor z_DLF z_lights z_room +z_scene_proc diff --git a/tables/functions.py b/tables/functions.py index a48f1a4aa4..162d2bafce 100644 --- a/tables/functions.py +++ b/tables/functions.py @@ -879,7 +879,7 @@ 0x800BDCF4:("func_800BDCF4","void","void"), 0x800BDFB0:("func_800BDFB0","void","void"), 0x800BDFC0:("func_800BDFC0","void","GlobalContext* ctxt, UNK_TYPE4 uParm2"), - 0x800BE03C:("func_800BE03C","void","void"), + 0x800BE03C:("func_800BE03C","void","GlobalContext* ctxt, Gfx* dl"), 0x800BE0B8:("func_800BE0B8","void","UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5"), 0x800BE184:("func_800BE184","void","UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6"), 0x800BE22C:("func_800BE22C","void","void"), @@ -2429,42 +2429,42 @@ 0x801306E8:("Scene_ProcessHeader","s32","GlobalContext* ctxt, SceneHeaderEntry* header"), 0x80130768:("Scene_CreateEntrance","u32","u32 sceneIndex, u32 spawnIndex, u32 offset"), 0x80130784:("func_80130784","void","void"), - 0x801307C0:("func_801307C0","void","void"), - 0x801307F4:("func_801307F4","void","void"), + 0x801307C0:("func_801307C0","void","GlobalContext* ctxt"), + 0x801307F4:("func_801307F4","void","GlobalContext* ctxt"), 0x80130834:("func_80130834","void","void"), - 0x801308A0:("func_801308A0","void","void"), + 0x801308A0:("SceneProc_DrawType0Texture","void","GlobalContext* ctxt, unsigned int param_2, UNK_TYPE4 param_3"), 0x80130940:("func_80130940","void","void"), - 0x801309F4:("func_801309F4","void","void"), - 0x80130A94:("func_80130A94","void","void"), - 0x80130C5C:("func_80130C5C","void","void"), + 0x801309F4:("SceneProc_DrawType1Texture","void","void"), + 0x80130A94:("func_80130A94","void","GlobalContext* ctxt, unsigned int param_2, u8* param_3, u8* param_4"), + 0x80130C5C:("SceneProc_DrawType2Texture","void","void"), 0x80130D0C:("func_80130D0C","void","void"), - 0x80130D3C:("func_80130D3C","void","void"), + 0x80130D3C:("SceneProc_DrawType3Texture","void","void"), 0x80130F58:("func_80130F58","void","void"), 0x8013115C:("func_8013115C","void","void"), - 0x801311B4:("func_801311B4","void","void"), - 0x80131580:("func_80131580","void","void"), - 0x80131690:("func_80131690","void","UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5"), - 0x80131758:("func_80131758","void","void"), - 0x8013178C:("func_8013178C","void","void"), - 0x801317C0:("func_801317C0","void","void"), + 0x801311B4:("SceneProc_DrawType4Texture","void","void"), + 0x80131580:("SceneProc_DrawType5Texture","void","void"), + 0x80131690:("SceneProc_DrawAnimatedTextures","void","GlobalContext* ctxt, AnimatedTexture* textures, f32 param_3, u32 step, u32 flags"), + 0x80131758:("SceneProc_DrawAllSceneAnimatedTextures","void","GlobalContext* ctxt, AnimatedTexture* textures"), + 0x8013178C:("SceneProc_DrawOpaqueSceneAnimatedTextures","void","GlobalContext* ctxt, AnimatedTexture* textures"), + 0x801317C0:("SceneProc_DrawTranslucentSceneAnimatedTextures","void","GlobalContext* ctxt, AnimatedTexture* textures"), 0x801317F4:("func_801317F4","void","void"), 0x8013182C:("func_8013182C","void","void"), 0x80131864:("func_80131864","void","void"), - 0x8013189C:("func_8013189C","void","void"), - 0x801318C8:("func_801318C8","void","void"), - 0x801318F4:("func_801318F4","void","void"), + 0x8013189C:("SceneProc_DrawAllAnimatedTextures","void","GlobalContext* ctxt, AnimatedTexture* textures, u32 step"), + 0x801318C8:("SceneProc_DrawOpaqueAnimatedTextures","void","GlobalContext* ctxt, AnimatedTexture* textures, u32 step"), + 0x801318F4:("SceneProc_DrawTranslucentAnimatedTextures","void","GlobalContext* ctxt, AnimatedTexture* textures, u32 step"), 0x80131920:("func_80131920","void","void"), 0x8013194C:("func_8013194C","void","void"), 0x80131978:("func_80131978","void","void"), - 0x801319A4:("func_801319A4","void","void"), - 0x801319CC:("func_801319CC","void","void"), - 0x80131CDC:("func_80131CDC","void","void"), - 0x80131DE4:("func_80131DE4","void","void"), + 0x801319A4:("func_801319A4","void","GlobalContext* ctxt"), + 0x801319CC:("func_801319CC","void","GlobalContext* ctxt"), + 0x80131CDC:("func_80131CDC","void","GlobalContext* ctxt"), + 0x80131DE4:("func_80131DE4","void","GlobalContext* ctxt"), 0x80131DF0:("func_80131DF0","void","void"), 0x80131E58:("func_80131E58","void","s32* param_1, s32 param_2, u32 param_3"), - 0x80131EC0:("func_80131EC0","void","void"), - 0x80131F90:("func_80131F90","void","void"), - 0x80131FC0:("func_80131FC0","void","void"), + 0x80131EC0:("func_80131EC0","void","GlobalContext* ctxt"), + 0x80131F90:("func_80131F90","void","GlobalContext* ctxt"), + 0x80131FC0:("func_80131FC0","void","GlobalContext* ctxt"), 0x801322C0:("SceneTable_LookupEntrance","EntranceRecord*","u32 entrance"), 0x8013230C:("SceneTable_LookupEntranceScene","s32","u32 entrance"), 0x80132338:("SceneTable_LookupEntranceAbsoluteScene","s32","u32 entrance"), @@ -15707,14 +15707,14 @@ 0x80BD5134:("func_80BD5134","void","void"), 0x80BD51DC:("func_80BD51DC","void","void"), 0x80BD5200:("func_80BD5200","void","void"), - 0x80BD53C0:("func_80BD53C0","void","void"), - 0x80BD546C:("func_80BD546C","void","void"), - 0x80BD5498:("func_80BD5498","void","void"), - 0x80BD54BC:("func_80BD54BC","void","void"), - 0x80BD5500:("func_80BD5500","void","void"), - 0x80BD5530:("func_80BD5530","void","void"), - 0x80BD556C:("func_80BD556C","void","void"), - 0x80BD5590:("func_80BD5590","void","void"), + 0x80BD53C0:("BgIkanaRay_Init","void","ActorBgIkanaRay* this, GlobalContext* ctxt"), + 0x80BD546C:("BgIkanaRay_Fini","void","ActorBgIkanaRay* this, GlobalContext* ctxt"), + 0x80BD5498:("BgIkanaRay_SetDeactivated","void","ActorBgIkanaRay* this"), + 0x80BD54BC:("BgIkanaRay_UpdateCheckForActivation","void","ActorBgIkanaRay* this, GlobalContext* ctxt"), + 0x80BD5500:("BgIkanaRay_SetActivated","void","ActorBgIkanaRay* this"), + 0x80BD5530:("BgIkanaRay_UpdateActivated","void","ActorBgIkanaRay* this, GlobalContext* ctxt"), + 0x80BD556C:("BgIkanaRay_Main","void","ActorBgIkanaRay* this, GlobalContext* ctxt"), + 0x80BD5590:("BgIkanaRay_Draw","void","ActorBgIkanaRay* this, GlobalContext* ctxt"), 0x80BD5690:("func_80BD5690","void","void"), 0x80BD5728:("func_80BD5728","void","void"), 0x80BD57F4:("func_80BD57F4","void","void"), diff --git a/tables/variables.py b/tables/variables.py index 2e3db0f129..3d983d73f3 100644 --- a/tables/variables.py +++ b/tables/variables.py @@ -1010,9 +1010,9 @@ 0x801C26A8:("sceneHeaderFuncTable","scene_header_func","[31]"), 0x801C2730:("D_801C2730","UNK_TYPE1",""), 0x801C2740:("objectFileTable","ObjectFileTableEntry","[643]"), - 0x801C3B60:("D_801C3B60","UNK_TYPE1",""), - 0x801C3BB8:("D_801C3BB8","UNK_PTR",""), - 0x801C3BD8:("D_801C3BD8","UNK_PTR",""), + 0x801C3B60:("D_801C3B60","Gfx","[11]"), + 0x801C3BB8:("D_801C3BB8","global_context_func","[8]"), + 0x801C3BD8:("gSceneProcDrawFuncs","UNK_PTR",""), 0x801C3C50:("D_801C3C50","UNK_TYPE1",""), 0x801C3C80:("D_801C3C80","UNK_TYPE1",""), 0x801C3C88:("D_801C3C88","UNK_TYPE1",""), @@ -2697,8 +2697,8 @@ 0x801F5A90:("D_801F5A90","GlobalContext*",""), 0x801F5A96:("D_801F5A96","UNK_TYPE1",""), 0x801F5A98:("D_801F5A98","UNK_TYPE2",""), - 0x801F5AA0:("D_801F5AA0","UNK_TYPE1",""), - 0x801F5AA4:("D_801F5AA4","UNK_TYPE1",""), + 0x801F5AA0:("gSceneProcStep","u32",""), + 0x801F5AA4:("gSceneProcFlags","u32",""), 0x801F5AA8:("D_801F5AA8","UNK_TYPE1",""), 0x801F5AB0:("D_801F5AB0","UNK_TYPE1",""), 0x801F5AB4:("D_801F5AB4","UNK_TYPE1",""), @@ -13824,9 +13824,8 @@ 0x80BD5314:("bgIkanaBombwallOverlayRelocations","u32","[39]"), 0x80BD53BC:("bgIkanaBombwallOverlayInfoOffset","u32",""), 0x80BD55D0:("bgIkanaRayInitData","ActorInitData",""), - 0x80BD55F0:("D_80BD55F0","UNK_TYPE1",""), + 0x80BD55F0:("bgIkanaRayCylinderInit","ColCylinderInit",""), 0x80BD561C:("bgIkanaRayCompInit","ActorInitVar","[4]"), - 0x80BD562C:("D_80BD562C","UNK_TYPE1",""), 0x80BD5630:("bgIkanaRayOverlayInfo","OverlayBlockSizes",""), 0x80BD5644:("bgIkanaRayOverlayRelocations","u32","[17]"), 0x80BD568C:("bgIkanaRayOverlayInfoOffset","u32",""), diff --git a/undef.txt b/undef.txt index ca0111b551..2e02f0c066 100644 --- a/undef.txt +++ b/undef.txt @@ -333,8 +333,8 @@ D_801F5A2C = code_bss_start + 0x00011A8C; D_801F5A90 = code_bss_start + 0x00011AF0; D_801F5A96 = code_bss_start + 0x00011AF6; D_801F5A98 = code_bss_start + 0x00011AF8; -D_801F5AA0 = code_bss_start + 0x00011B00; -D_801F5AA4 = code_bss_start + 0x00011B04; +gSceneProcStep = code_bss_start + 0x00011B00; +gSceneProcFlags = code_bss_start + 0x00011B04; D_801F5AA8 = code_bss_start + 0x00011B08; D_801F5AB0 = code_bss_start + 0x00011B10; D_801F5AB4 = code_bss_start + 0x00011B14;