diff --git a/config/RSBE01_02/rels/sora_adv_stage/splits.txt b/config/RSBE01_02/rels/sora_adv_stage/splits.txt index 509ba6a..600b2dd 100644 --- a/config/RSBE01_02/rels/sora_adv_stage/splits.txt +++ b/config/RSBE01_02/rels/sora_adv_stage/splits.txt @@ -11,6 +11,11 @@ global_destructor_chain.c: .dtors start:0x00000000 end:0x00000008 .bss start:0x00000000 end:0x00000004 +mo_adv_stage/gr_adventure_final.cpp: + .text start:0x0003D6E4 end:0x0003DA24 + .rodata start:0x000008E8 end:0x000008F4 + .data start:0x000177D8 end:0x000179F8 + mo_adv_stage/mo_adv_stage.cpp: .text start:0x00048CF0 end:0x00048D8C .data start:0x00018550 end:0x00018561 diff --git a/config/RSBE01_02/rels/sora_adv_stage/symbols.txt b/config/RSBE01_02/rels/sora_adv_stage/symbols.txt index a44863e..e364308 100644 --- a/config/RSBE01_02/rels/sora_adv_stage/symbols.txt +++ b/config/RSBE01_02/rels/sora_adv_stage/symbols.txt @@ -24,7 +24,7 @@ fn_40_2024 = .text:0x00002024; // type:function size:0x194 fn_40_21B8 = .text:0x000021B8; // type:function size:0x74 fn_40_222C = .text:0x0000222C; // type:function size:0x34 fn_40_2260 = .text:0x00002260; // type:function size:0x8F0 -fn_40_2B50 = .text:0x00002B50; // type:function size:0x1C +getModelCount__6GroundFv = .text:0x00002B50; // type:function size:0x1C fn_40_2B6C = .text:0x00002B6C; // type:function size:0x858 fn_40_33C4 = .text:0x000033C4; // type:function size:0x20 fn_40_33E4 = .text:0x000033E4; // type:function size:0x4D4 @@ -33,7 +33,7 @@ fn_40_38C0 = .text:0x000038C0; // type:function size:0x47C fn_40_3D3C = .text:0x00003D3C; // type:function size:0xC fn_40_3D48 = .text:0x00003D48; // type:function size:0xB0 fn_40_3DF8 = .text:0x00003DF8; // type:function size:0xB0 -fn_40_3EA8 = .text:0x00003EA8; // type:function size:0x8 +setGimmickData__9grGimmickFPv = .text:0x00003EA8; // type:function size:0x8 fn_40_3EB0 = .text:0x00003EB0; // type:function size:0x40 fn_40_3EF0 = .text:0x00003EF0; // type:function size:0xC8 fn_40_3FB8 = .text:0x00003FB8; // type:function size:0xC @@ -51,7 +51,7 @@ fn_40_4828 = .text:0x00004828; // type:function size:0x1D0 fn_40_49F8 = .text:0x000049F8; // type:function size:0x1E4 fn_40_4BDC = .text:0x00004BDC; // type:function size:0x6C fn_40_4C48 = .text:0x00004C48; // type:function size:0x138 -fn_40_4D80 = .text:0x00004D80; // type:function size:0x8 +getMdlIndex__6GroundFv = .text:0x00004D80; // type:function size:0x8 fn_40_4D88 = .text:0x00004D88; // type:function size:0x78 fn_40_4E00 = .text:0x00004E00; // type:function size:0x160 fn_40_4F60 = .text:0x00004F60; // type:function size:0x80 @@ -73,9 +73,9 @@ fn_40_5AA4 = .text:0x00005AA4; // type:function size:0x234 fn_40_5CD8 = .text:0x00005CD8; // type:function size:0x6C fn_40_5D44 = .text:0x00005D44; // type:function size:0x130 fn_40_5E74 = .text:0x00005E74; // type:function size:0x68 -fn_40_5EDC = .text:0x00005EDC; // type:function size:0x4 -fn_40_5EE0 = .text:0x00005EE0; // type:function size:0x4 -fn_40_5EE4 = .text:0x00005EE4; // type:function size:0x8 +setInitializeFlag__6GroundFv = .text:0x00005EDC; // type:function size:0x4 +setInitializeInfo__6GroundFi = .text:0x00005EE0; // type:function size:0x4 +getInitializeInfo__6GroundFi = .text:0x00005EE4; // type:function size:0x8 fn_40_5EEC = .text:0x00005EEC; // type:function size:0xEC fn_40_5FD8 = .text:0x00005FD8; // type:function size:0x78 fn_40_6050 = .text:0x00006050; // type:function size:0x1F0 @@ -108,7 +108,7 @@ fn_40_7848 = .text:0x00007848; // type:function size:0x118 fn_40_7960 = .text:0x00007960; // type:function size:0x134 fn_40_7A94 = .text:0x00007A94; // type:function size:0x11C fn_40_7BB0 = .text:0x00007BB0; // type:function size:0xF4 -fn_40_7CA4 = .text:0x00007CA4; // type:function size:0x8 +adventureEventGetItem__6GroundFiP13stTriggerData = .text:0x00007CA4; // type:function size:0x8 fn_40_7CAC = .text:0x00007CAC; // type:function size:0x4C fn_40_7CF8 = .text:0x00007CF8; // type:function size:0x4C fn_40_7D44 = .text:0x00007D44; // type:function size:0x50 @@ -417,19 +417,19 @@ fn_40_18BCC = .text:0x00018BCC; // type:function size:0x7E0 fn_40_193AC = .text:0x000193AC; // type:function size:0xA8 fn_40_19454 = .text:0x00019454; // type:function size:0x2EC fn_40_19740 = .text:0x00019740; // type:function size:0xB4 -fn_40_197F4 = .text:0x000197F4; // type:function size:0x8 +setMdlIndex__6GroundFi = .text:0x000197F4; // type:function size:0x8 fn_40_197FC = .text:0x000197FC; // type:function size:0xAC fn_40_198A8 = .text:0x000198A8; // type:function size:0x4 fn_40_198AC = .text:0x000198AC; // type:function size:0x130 fn_40_199DC = .text:0x000199DC; // type:function size:0x80 -fn_40_19A5C = .text:0x00019A5C; // type:function size:0x10 -fn_40_19A6C = .text:0x00019A6C; // type:function size:0x10 -fn_40_19A7C = .text:0x00019A7C; // type:function size:0xC -fn_40_19A88 = .text:0x00019A88; // type:function size:0x4 -fn_40_19A8C = .text:0x00019A8C; // type:function size:0x8 -fn_40_19A94 = .text:0x00019A94; // type:function size:0x8 -fn_40_19A9C = .text:0x00019A9C; // type:function size:0x8 -fn_40_19AA4 = .text:0x00019AA4; // type:function size:0x8 +disableCalcCollision__6GroundFv = .text:0x00019A5C; // type:function size:0x10 +enableCalcCollision__6GroundFv = .text:0x00019A6C; // type:function size:0x10 +isEnableCalcCollision__6GroundFv = .text:0x00019A7C; // type:function size:0xC +initStageData__6GroundFv = .text:0x00019A88; // type:function size:0x4 +getStageData__6GroundFv = .text:0x00019A8C; // type:function size:0x8 +setStageData__6GroundFPv = .text:0x00019A94; // type:function size:0x8 +getTransparencyFlag__9grGimmickFv = .text:0x00019A9C; // type:function size:0x8 +getGimmickData__9grGimmickFv = .text:0x00019AA4; // type:function size:0x8 fn_40_19AAC = .text:0x00019AAC; // type:function size:0x98 fn_40_19B44 = .text:0x00019B44; // type:function size:0x48 fn_40_19B8C = .text:0x00019B8C; // type:function size:0x58 @@ -1299,10 +1299,10 @@ fn_40_3D5E0 = .text:0x0003D5E0; // type:function size:0x4 fn_40_3D5E4 = .text:0x0003D5E4; // type:function size:0x7C fn_40_3D660 = .text:0x0003D660; // type:function size:0x54 fn_40_3D6B4 = .text:0x0003D6B4; // type:function size:0x30 -fn_40_3D6E4 = .text:0x0003D6E4; // type:function size:0xE0 -fn_40_3D7C4 = .text:0x0003D7C4; // type:function size:0x58 -fn_40_3D81C = .text:0x0003D81C; // type:function size:0x10 -fn_40_3D82C = .text:0x0003D82C; // type:function size:0x1F8 +create__16grAdventureFinalFiPCcPCc = .text:0x0003D6E4; // type:function size:0xE0 +__dt__16grAdventureFinalFv = .text:0x0003D7C4; // type:function size:0x58 +update__16grAdventureFinalFf = .text:0x0003D81C; // type:function size:0x10 +updateEff__16grAdventureFinalFv = .text:0x0003D82C; // type:function size:0x1F8 fn_40_3DA24 = .text:0x0003DA24; // type:function size:0x90 fn_40_3DAB4 = .text:0x0003DAB4; // type:function size:0x88 fn_40_3DB3C = .text:0x0003DB3C; // type:function size:0x160 @@ -1563,7 +1563,7 @@ lbl_40_rodata_838 = .rodata:0x00000838; // type:object size:0x10 align:4 data:fl lbl_40_rodata_848 = .rodata:0x00000848; // type:object size:0x48 align:4 data:float lbl_40_rodata_890 = .rodata:0x00000890; // type:object size:0x48 lbl_40_rodata_8D8 = .rodata:0x000008D8; // type:object size:0x10 align:4 data:float -lbl_40_rodata_8E8 = .rodata:0x000008E8; // type:object size:0x10 align:4 data:float +lbl_40_rodata_8E8 = .rodata:0x000008E8; // type:object size:0xC align:4 data:float lbl_40_rodata_8F8 = .rodata:0x000008F8; // type:object size:0x28 align:4 data:float lbl_40_rodata_920 = .rodata:0x00000920; // type:object size:0x10 align:4 data:float lbl_40_rodata_930 = .rodata:0x00000930; // type:object size:0x70 data:byte @@ -1665,15 +1665,15 @@ lbl_40_data_B78 = .data:0x00000B78; // type:object size:0x20 lbl_40_data_B98 = .data:0x00000B98; // type:object size:0x8 lbl_40_data_BA0 = .data:0x00000BA0; // type:object size:0xB data:string lbl_40_data_BAC = .data:0x00000BAC; // type:object size:0x1C -lbl_40_data_BC8 = .data:0x00000BC8; // type:object size:0x8 +__RTTI__10grYakumono = .data:0x00000BC8; // type:object size:0x8 lbl_40_data_BD0 = .data:0x00000BD0; // type:object size:0x14 data:string lbl_40_data_BE4 = .data:0x00000BE4; // type:object size:0x24 lbl_40_data_C08 = .data:0x00000C08; // type:object size:0xA data:string lbl_40_data_C14 = .data:0x00000C14; // type:object size:0x14 -lbl_40_data_C28 = .data:0x00000C28; // type:object size:0x8 +__RTTI__9grGimmick = .data:0x00000C28; // type:object size:0x8 lbl_40_data_C30 = .data:0x00000C30; // type:object size:0x7 data:string lbl_40_data_C38 = .data:0x00000C38; // type:object size:0x10 -lbl_40_data_C48 = .data:0x00000C48; // type:object size:0x8 +__RTTI__6Ground = .data:0x00000C48; // type:object size:0x8 lbl_40_data_C50 = .data:0x00000C50; // type:object size:0x17 data:string lbl_40_data_C68 = .data:0x00000C68; // type:object size:0x10 lbl_40_data_C78 = .data:0x00000C78; // type:object size:0x8 @@ -1775,7 +1775,7 @@ lbl_40_data_15B8 = .data:0x000015B8; // type:object size:0x8 lbl_40_data_15C0 = .data:0x000015C0; // type:object size:0x13 data:string lbl_40_data_15D8 = .data:0x000015D8; // type:object size:0x8 lbl_40_data_15E0 = .data:0x000015E0; // type:object size:0x7 data:string -lbl_40_data_15E8 = .data:0x000015E8; // type:object size:0x18 +__RTTI__6gfTask = .data:0x000015E8; // type:object size:0x18 lbl_40_data_1600 = .data:0x00001600; // type:object size:0xB data:string lbl_40_data_1610 = .data:0x00001610; // type:object size:0x8 lbl_40_data_1618 = .data:0x00001618; // type:object size:0xC @@ -2472,10 +2472,10 @@ lbl_40_data_16248 = .data:0x00016248; // type:object size:0x28 lbl_40_data_16270 = .data:0x00016270; // type:object size:0x1568 lbl_40_data_177D8 = .data:0x000177D8; // type:object size:0x7 data:string lbl_40_data_177E0 = .data:0x000177E0; // type:object size:0x7 data:string -lbl_40_data_177E8 = .data:0x000177E8; // type:object size:0x1CC +__vt__16grAdventureFinal = .data:0x000177E8; // type:object size:0x1CC lbl_40_data_179B4 = .data:0x000179B4; // type:object size:0x11 data:string -lbl_40_data_179C8 = .data:0x000179C8; // type:object size:0x28 -lbl_40_data_179F0 = .data:0x000179F0; // type:object size:0x8 +lbl_40_data_179C8 = .data:0x000179C8; // type:object size:0x24 +__RTTI__16grAdventureFinal = .data:0x000179F0; // type:object size:0x8 lbl_40_data_179F8 = .data:0x000179F8; // type:object size:0x9 data:string lbl_40_data_17A04 = .data:0x00017A04; // type:object size:0x64 lbl_40_data_17A68 = .data:0x00017A68; // type:object size:0x9 data:string diff --git a/configure.py b/configure.py index 4e47e8a..1a98cfe 100755 --- a/configure.py +++ b/configure.py @@ -707,6 +707,7 @@ def MatchingFor(*versions): "cflags": cflags_rel, "host": False, "objects": [ + Object(Matching, "mo_adv_stage/gr_adventure_final.cpp"), Object(Matching, "mo_adv_stage/mo_adv_stage.cpp"), ], }, diff --git a/include/sora_adv_stage/gr_adventure_final.h b/include/sora_adv_stage/gr_adventure_final.h new file mode 100644 index 0000000..4d06f01 --- /dev/null +++ b/include/sora_adv_stage/gr_adventure_final.h @@ -0,0 +1,30 @@ +#pragma once + +#include + +const float EFF_SOMETHING = 0.0f; +const float EFF_FRAME_MAX1 = 2540.0f; +const float EFF_FRAME_MAX2 = 6100.0f; +class grAdventureFinal : public grYakumono { +protected: + char unk1; + float unk4; + u8 m_step; + u16 padding; + +public: + grAdventureFinal(const char* taskName) : grYakumono(taskName) { + unk1 = 0; + unk4 = EFF_SOMETHING; + m_step = 0; + setupMelee(); + m_transparencySettings = 0; + }; + virtual void update(float deltaFrame); + virtual ~grAdventureFinal(); + + virtual void updateEff(); + + static grAdventureFinal* create(int mdlIndex, const char* tgtNodeName, const char* taskName); + +}; diff --git a/src/mo_adv_stage/gr_adventure_final.cpp b/src/mo_adv_stage/gr_adventure_final.cpp new file mode 100644 index 0000000..c05a88e --- /dev/null +++ b/src/mo_adv_stage/gr_adventure_final.cpp @@ -0,0 +1,56 @@ +#include +#include +#include + +grAdventureFinal* grAdventureFinal::create(int mdlIndex, const char* tgtNodeName, const char* taskName) { + grAdventureFinal* ground = new (Heaps::StageInstance) grAdventureFinal(taskName); + if (ground) { + ground->setMdlIndex(mdlIndex); + ground->setTgtNode(tgtNodeName); + } + return ground; +} + +grAdventureFinal::~grAdventureFinal() { } + +void grAdventureFinal::update(float deltaFrame) { + this->updateEff(); +} + +void grAdventureFinal::updateEff() +{ + switch (m_step) { + case 0: + g_ecMgr->setDrawPrio(1); + g_ecMgr->setEffect(ef_ptc_stg_final_zenpan); + g_ecMgr->setDrawPrio(0xffffffff); + unk4 = EFF_SOMETHING; + m_step++; + break; + case 1: + if (!(this->getMotionFrame(0) < 2540.0f)) { + g_ecMgr->setDrawPrio(1); + u32 unk = g_ecMgr->setEffect(ef_ptc_stg_final_star); + g_ecMgr->setDrawPrio(0xffffffff); + g_ecMgr->setParent(unk, m_sceneModels[0], "spaceB", 0); // sceneModel is actually supposed to be a wrapper of some kind + m_step++; + } + break; + case 2: + if (!(this->getMotionFrame(0) < 6100.0f)) { + g_ecMgr->setDrawPrio(1); + u32 unk = g_ecMgr->setEffect(ef_ptc_stg_final_kirakira); + g_ecMgr->setDrawPrio(0xffffffff); + g_ecMgr->setParent(unk, m_sceneModels[0], "spaceF", 0); // sceneModel is actually supposed to be a wrapper of some kind + m_step++; + } + break; + case 3: + if (this->getMotionFrame(0) < unk4) { + m_step = 0; + } else { + unk4 = this->getMotionFrame(0); + } + break; + } +}