From 26ba4723e9e865950c56d387759e1ddafed92aa6 Mon Sep 17 00:00:00 2001 From: robojumper Date: Sun, 15 Sep 2024 18:00:59 +0200 Subject: [PATCH] d_t_noeffect_area OK --- .../rels/d_t_noeffect_areaNP/splits.txt | 3 ++ .../rels/d_t_noeffect_areaNP/symbols.txt | 30 +++++++-------- configure.py | 2 +- include/d/tg/d_t_noeffect_area.h | 31 +++++++++++++++ src/REL/d/t/d_t_noeffect_area.cpp | 38 +++++++++++++++++++ 5 files changed, 88 insertions(+), 16 deletions(-) create mode 100644 include/d/tg/d_t_noeffect_area.h diff --git a/config/SOUE01/rels/d_t_noeffect_areaNP/splits.txt b/config/SOUE01/rels/d_t_noeffect_areaNP/splits.txt index 04bb7a4f..59ac57a6 100644 --- a/config/SOUE01/rels/d_t_noeffect_areaNP/splits.txt +++ b/config/SOUE01/rels/d_t_noeffect_areaNP/splits.txt @@ -12,3 +12,6 @@ REL/executor.c: REL/d/t/d_t_noeffect_area.cpp: .text start:0x00000070 end:0x00000268 .ctors start:0x00000000 end:0x00000004 + .rodata start:0x00000000 end:0x0000000C + .data start:0x00000000 end:0x00000084 + .bss start:0x00000008 end:0x00000010 diff --git a/config/SOUE01/rels/d_t_noeffect_areaNP/symbols.txt b/config/SOUE01/rels/d_t_noeffect_areaNP/symbols.txt index 5afa4e77..d2abea99 100644 --- a/config/SOUE01/rels/d_t_noeffect_areaNP/symbols.txt +++ b/config/SOUE01/rels/d_t_noeffect_areaNP/symbols.txt @@ -1,20 +1,20 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global -fn_596_70 = .text:0x00000070; // type:function size:0x5C -fn_596_D0 = .text:0x000000D0; // type:function size:0x94 -fn_596_170 = .text:0x00000170; // type:function size:0x34 -fn_596_1B0 = .text:0x000001B0; // type:function size:0x8 -fn_596_1C0 = .text:0x000001C0; // type:function size:0x8 -fn_596_1D0 = .text:0x000001D0; // type:function size:0x10 -fn_596_1E0 = .text:0x000001E0; // type:function size:0xC -fn_596_1F0 = .text:0x000001F0; // type:function size:0x5C -fn_596_250 = .text:0x00000250; // type:function size:0x18 +dTgNoEffectArea_c_classInit__Fv = .text:0x00000070; // type:function size:0x5C +create__17dTgNoEffectArea_cFv = .text:0x000000D0; // type:function size:0x94 +doDelete__17dTgNoEffectArea_cFv = .text:0x00000170; // type:function size:0x34 +actorExecute__17dTgNoEffectArea_cFv = .text:0x000001B0; // type:function size:0x8 +draw__17dTgNoEffectArea_cFv = .text:0x000001C0; // type:function size:0x8 +addToList__17dTgNoEffectArea_cFR9fLiMgBa_c = .text:0x000001D0; // type:function size:0x10 +getList__17dTgNoEffectArea_cFv = .text:0x000001E0; // type:function size:0xC +__dt__17dTgNoEffectArea_cFv = .text:0x000001F0; // type:function size:0x5C +__sinit_\d_t_noeffect_area_cpp = .text:0x00000250; // type:function size:0x18 scope:local _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_596_rodata_0 = .rodata:0x00000000; // type:object size:0x4 -lbl_596_rodata_4 = .rodata:0x00000004; // type:object size:0x4 -lbl_596_rodata_8 = .rodata:0x00000008; // type:object size:0x4 data:float -lbl_596_data_0 = .data:0x00000000; // type:object size:0x10 -lbl_596_data_10 = .data:0x00000010; // type:object size:0x74 -lbl_596_bss_8 = .bss:0x00000008; // type:object size:0x8 data:4byte +sFloat1__17dTgNoEffectArea_c = .rodata:0x00000000; // type:object size:0x4 +sFloat2__17dTgNoEffectArea_c = .rodata:0x00000004; // type:object size:0x4 +lbl_596_rodata_8 = .rodata:0x00000008; // type:object size:0x4 scope:local data:float +g_profile_TAG_NOEFFECT_AREA = .data:0x00000000; // type:object size:0x10 +__vt__17dTgNoEffectArea_c = .data:0x00000010; // type:object size:0x74 +sList__17dTgNoEffectArea_c = .bss:0x00000008; // type:object size:0x8 data:4byte diff --git a/configure.py b/configure.py index eca0c997..86aae5e6 100644 --- a/configure.py +++ b/configure.py @@ -1151,7 +1151,7 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_t_mole_prohibit", "REL/d/t/d_t_mole_prohibit.cpp"), Rel(NonMatching, "d_t_musasabi", "REL/d/t/d_t_musasabi.cpp"), Rel(NonMatching, "d_t_musou", "REL/d/t/d_t_musou.cpp"), - Rel(NonMatching, "d_t_noeffect_area", "REL/d/t/d_t_noeffect_area.cpp"), + Rel(Matching, "d_t_noeffect_area", "REL/d/t/d_t_noeffect_area.cpp"), Rel(NonMatching, "d_t_player_restart", "REL/d/t/d_t_player_restart.cpp"), Rel(NonMatching, "d_t_plight", "REL/d/t/d_t_plight.cpp"), Rel(NonMatching, "d_t_pltchg", "REL/d/t/d_t_pltchg.cpp"), diff --git a/include/d/tg/d_t_noeffect_area.h b/include/d/tg/d_t_noeffect_area.h new file mode 100644 index 00000000..18dd0bbd --- /dev/null +++ b/include/d/tg/d_t_noeffect_area.h @@ -0,0 +1,31 @@ +#ifndef D_T_NOEFFECT_AREA_H +#define D_T_NOEFFECT_AREA_H + +#include +#include +#include + +class dTgNoEffectArea_c : public dTg_c { +public: + dTgNoEffectArea_c() : mEntry(this) {} + virtual ~dTgNoEffectArea_c() {} + + virtual int create() override; + virtual int doDelete() override; + virtual int actorExecute() override; + virtual int draw() override; + + static fLiNdBa_c *getList(); + + static const f32 sFloat1; + static const f32 sFloat2; + +private: + void addToList(fLiMgBa_c &list); + + static fLiMgBa_c sList; + fLiNdBa_c mEntry; + mMtx_c mMtx; +}; + +#endif diff --git a/src/REL/d/t/d_t_noeffect_area.cpp b/src/REL/d/t/d_t_noeffect_area.cpp index e69de29b..13772c33 100644 --- a/src/REL/d/t/d_t_noeffect_area.cpp +++ b/src/REL/d/t/d_t_noeffect_area.cpp @@ -0,0 +1,38 @@ +#include + +SPECIAL_ACTOR_PROFILE(TAG_NOEFFECT_AREA, dTgNoEffectArea_c, fProfile::TAG_NOEFFECT_AREA, 0x0158, 0, 0); + +fLiMgBa_c dTgNoEffectArea_c::sList; + +const f32 dTgNoEffectArea_c::sFloat1 = 100.0f; +const f32 dTgNoEffectArea_c::sFloat2 = 100.0f; + +int dTgNoEffectArea_c::create() { + scale *= 0.01f; + PSMTXTrans(mMtx, position.x, position.y, position.z); + mMtx.YrotM(rotation.y); + PSMTXInverse(mMtx, mMtx); + addToList(sList); + return SUCCEEDED; +} + +int dTgNoEffectArea_c::doDelete() { + sList.remove(&this->mEntry); + return 1; +} + +int dTgNoEffectArea_c::actorExecute() { + return 1; +} + +int dTgNoEffectArea_c::draw() { + return 1; +} + +void dTgNoEffectArea_c::addToList(fLiMgBa_c &list) { + list.append(&this->mEntry); +} + +fLiNdBa_c *dTgNoEffectArea_c::getList() { + return sList.getFirst(); +}