Skip to content

Commit

Permalink
d_t_tdb OK (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
CovenEsme authored Oct 16, 2024
1 parent b8a31a6 commit 1eaa124
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 12 deletions.
2 changes: 2 additions & 0 deletions config/SOUE01/rels/d_t_time_door_beamNP/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 8 additions & 9 deletions config/SOUE01/rels/d_t_time_door_beamNP/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,7 @@ def nw4rLib(lib_name, objects, extra_cflags=[]):
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"),
]
Expand Down
12 changes: 10 additions & 2 deletions include/d/t/d_t_time_door_beam.h
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions src/REL/d/t/d_t_time_door_beam.cpp
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit 1eaa124

Please sign in to comment.