From 1eaa124714e6328dc7e96841e2888e2b28093586 Mon Sep 17 00:00:00 2001 From: CovenEsme <84377742+CovenEsme@users.noreply.github.com> Date: Wed, 16 Oct 2024 22:04:00 +0000 Subject: [PATCH] d_t_tdb OK (#67) --- .../rels/d_t_time_door_beamNP/splits.txt | 2 ++ .../rels/d_t_time_door_beamNP/symbols.txt | 17 ++++++------ configure.py | 2 +- include/d/t/d_t_time_door_beam.h | 12 +++++++-- src/REL/d/t/d_t_time_door_beam.cpp | 27 +++++++++++++++++++ 5 files changed, 48 insertions(+), 12 deletions(-) diff --git a/config/SOUE01/rels/d_t_time_door_beamNP/splits.txt b/config/SOUE01/rels/d_t_time_door_beamNP/splits.txt index e9aaf96f..23f8f5f8 100644 --- a/config/SOUE01/rels/d_t_time_door_beamNP/splits.txt +++ b/config/SOUE01/rels/d_t_time_door_beamNP/splits.txt @@ -11,3 +11,5 @@ REL/executor.c: REL/d/t/d_t_time_door_beam.cpp: .text start:0x00000070 end:0x000001CC + .rodata start:0x00000000 end:0x00000004 + .data start:0x00000000 end:0x00000084 diff --git a/config/SOUE01/rels/d_t_time_door_beamNP/symbols.txt b/config/SOUE01/rels/d_t_time_door_beamNP/symbols.txt index 623f3406..d014a1db 100644 --- a/config/SOUE01/rels/d_t_time_door_beamNP/symbols.txt +++ b/config/SOUE01/rels/d_t_time_door_beamNP/symbols.txt @@ -2,15 +2,14 @@ _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 dTgTimeDoorBeam_c_classInit__Fv = .text:0x00000070; // type:function size:0x4C -fn_591_C0 = .text:0x000000C0; // type:function size:0x48 -fn_591_110 = .text:0x00000110; // type:function size:0x8 -fn_591_120 = .text:0x00000120; // type:function size:0x8 -fn_591_130 = .text:0x00000130; // type:function size:0x8 -fn_591_140 = .text:0x00000140; // type:function size:0x24 -fn_591_164 = .text:0x00000164; // type:function size:0x4 +create__17dTgTimeDoorBeam_cFv = .text:0x000000C0; // type:function size:0x48 +doDelete__17dTgTimeDoorBeam_cFv = .text:0x00000110; // type:function size:0x8 +actorExecute__17dTgTimeDoorBeam_cFv = .text:0x00000120; // type:function size:0x8 +draw__17dTgTimeDoorBeam_cFv = .text:0x00000130; // type:function size:0x8 +checkPlayerPosInMtx__17dTgTimeDoorBeam_cFv = .text:0x00000140; // type:function size:0x28 __dt__17dTgTimeDoorBeam_cFv = .text:0x00000170; // type:function size:0x5C _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_591_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float -g_profile_TAG_TIME_DOOR_BEAM = .data:0x00000000; // type:object size:0x10 -lbl_591_data_10 = .data:0x00000010; // type:object size:0x74 +lbl_591_rodata_0 = .rodata:0x00000000; // type:object size:0x4 scope:local data:float +g_profile_TAG_TIME_DOOR_BEAM = .data:0x00000000; // type:object size:0x10 data:4byte +__vt__17dTgTimeDoorBeam_c = .data:0x00000010; // type:object size:0x74 diff --git a/configure.py b/configure.py index c071d0bd..54005b5c 100644 --- a/configure.py +++ b/configure.py @@ -1832,7 +1832,7 @@ config.libs = [ Rel(NonMatching, "d_t_telop", "REL/d/t/d_t_telop.cpp"), Rel(Matching, "d_t_timer", "REL/d/t/d_t_timer.cpp"), Rel(Matching, "d_t_time_area_check", "REL/d/t/d_t_time_area_check.cpp"), - Rel(NonMatching, "d_t_time_door_beam", "REL/d/t/d_t_time_door_beam.cpp"), + Rel(Matching, "d_t_time_door_beam", "REL/d/t/d_t_time_door_beam.cpp"), Rel(Matching, "d_t_touch", "REL/d/t/d_t_touch.cpp"), Rel(NonMatching, "d_t_tumble_weed", "REL/d/t/d_t_tumble_weed.cpp"), ] diff --git a/include/d/t/d_t_time_door_beam.h b/include/d/t/d_t_time_door_beam.h index 380f82f4..d03600e4 100644 --- a/include/d/t/d_t_time_door_beam.h +++ b/include/d/t/d_t_time_door_beam.h @@ -1,14 +1,22 @@ #ifndef D_T_TIME_DOOR_BEAM_H #define D_T_TIME_DOOR_BEAM_H -#include "d/a/d_a_base.h" +#include "d/t/d_tg.h" +#include "m/m_mtx.h" -class dTgTimeDoorBeam_c : public dAcBase_c { +class dTgTimeDoorBeam_c : public dTg_c { public: dTgTimeDoorBeam_c() {} virtual ~dTgTimeDoorBeam_c() {} + virtual int create() override; + virtual int doDelete() override; + virtual int actorExecute() override; + virtual int draw() override; + private: + bool checkPlayerPosInMtx(); + mMtx_c matrix; }; #endif diff --git a/src/REL/d/t/d_t_time_door_beam.cpp b/src/REL/d/t/d_t_time_door_beam.cpp index fa249fc8..be66b90c 100644 --- a/src/REL/d/t/d_t_time_door_beam.cpp +++ b/src/REL/d/t/d_t_time_door_beam.cpp @@ -1,3 +1,30 @@ #include "d/t/d_t_time_door_beam.h" +#include "d/a/d_a_player.h" +#include "toBeSorted/area_math.h" SPECIAL_ACTOR_PROFILE(TAG_TIME_DOOR_BEAM, dTgTimeDoorBeam_c, fProfile::TAG_TIME_DOOR_BEAM, 0x252, 0, 0); + +int dTgTimeDoorBeam_c::create() { + matrixCreateFromPosRotYScale(matrix, position, rotation.y, mScale, nullptr, 0.0f); + return SUCCEEDED; +} + +int dTgTimeDoorBeam_c::doDelete() { + return SUCCEEDED; +} + +int dTgTimeDoorBeam_c::actorExecute() { + return SUCCEEDED; +} + +int dTgTimeDoorBeam_c::draw() { + return SUCCEEDED; +} + +bool dTgTimeDoorBeam_c::checkPlayerPosInMtx() { + if (dAcPy_c::LINK == nullptr) { + return false; + } + + return checkIfVec3fInMatrix(matrix, dAcPy_c::LINK->position); +}