From 410b625350855eae2d2e8c2ea3826491fcbd46a1 Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Wed, 6 Dec 2023 21:16:03 -0500 Subject: [PATCH] Match iceeff, lighteff --- configure.py | 4 ++-- include/d/actor/d_a_arrow_lighteff.h | 2 +- src/d/actor/d_a_arrow_iceeff.cpp | 2 +- src/d/actor/d_a_arrow_lighteff.cpp | 18 +++++++++++------- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/configure.py b/configure.py index 525dd27e5..1baae1789 100644 --- a/configure.py +++ b/configure.py @@ -1329,8 +1329,8 @@ config.libs = [ ActorRel(Matching, "d_a_am", extra_cflags=['-pragma "nosyminline on"']), ActorRel(Matching, "d_a_am2", extra_cflags=["-sym off"]), ActorRel(NonMatching, "d_a_amiprop"), - ActorRel(NonMatching, "d_a_arrow_iceeff", extra_cflags=['-pragma "nosyminline on"']), - ActorRel(NonMatching, "d_a_arrow_lighteff", extra_cflags=['-pragma "nosyminline on"']), + ActorRel(Matching, "d_a_arrow_iceeff", extra_cflags=['-pragma "nosyminline on"']), + ActorRel(Matching, "d_a_arrow_lighteff", extra_cflags=['-pragma "nosyminline on"']), ActorRel(NonMatching, "d_a_beam"), ActorRel(NonMatching, "d_a_boko"), ActorRel(NonMatching, "d_a_canon"), diff --git a/include/d/actor/d_a_arrow_lighteff.h b/include/d/actor/d_a_arrow_lighteff.h index ecdb85cf7..0f2f36289 100644 --- a/include/d/actor/d_a_arrow_lighteff.h +++ b/include/d/actor/d_a_arrow_lighteff.h @@ -14,7 +14,7 @@ public: inline bool _delete(); inline bool _draw(); inline bool _execute(); - void brk_play() {} // based on position in the debug map this would play the btk so not sure what this is really doing + inline void brk_play(); void setTopPos(); void setPointLight(); diff --git a/src/d/actor/d_a_arrow_iceeff.cpp b/src/d/actor/d_a_arrow_iceeff.cpp index ddc9fdf94..5c26c989e 100644 --- a/src/d/actor/d_a_arrow_iceeff.cpp +++ b/src/d/actor/d_a_arrow_iceeff.cpp @@ -297,7 +297,7 @@ static BOOL daArrow_Iceeff_IsDelete(void*) { static actor_method_class daArrow_IceeffMethodTable = { (process_method_func)daArrow_Iceeff_Create, (process_method_func)daArrow_Iceeff_Delete, - (process_method_func)daArrow_Iceeff_Draw, + (process_method_func)daArrow_Iceeff_Execute, (process_method_func)daArrow_Iceeff_IsDelete, (process_method_func)daArrow_Iceeff_Draw, }; diff --git a/src/d/actor/d_a_arrow_lighteff.cpp b/src/d/actor/d_a_arrow_lighteff.cpp index c1dd081d0..54d72f404 100644 --- a/src/d/actor/d_a_arrow_lighteff.cpp +++ b/src/d/actor/d_a_arrow_lighteff.cpp @@ -267,13 +267,10 @@ static BOOL daArrow_Lighteff_Execute(void* i_this) { return static_cast(i_this)->_execute(); } -/* 00000D44-000011A4 .text _execute__18daArrow_Lighteff_cFv */ -bool daArrow_Lighteff_c::_execute() { - field_0x2F0 = field_0x2EC; - +void daArrow_Lighteff_c::brk_play() { mBtk.play(); - s32 cam = dComIfGp_getPlayerCameraID(0); + int cam = dComIfGp_getPlayerCameraID(0); if(!dComIfGp_checkCameraAttentionStatus(cam, 0x20)) { if(field_0x2E0 < mBrk.getEndFrame()) { field_0x2E0 += 1.0f; @@ -300,6 +297,13 @@ bool daArrow_Lighteff_c::_execute() { } mBrk.setFrame(field_0x2E0); +} + +/* 00000D44-000011A4 .text _execute__18daArrow_Lighteff_cFv */ +bool daArrow_Lighteff_c::_execute() { + field_0x2F0 = field_0x2EC; + + brk_play(); daPy_py_c* link = daPy_getPlayerActorClass(); daArrow_c* arrow = static_cast(fopAcM_SearchByID(mParentPcId)); @@ -356,7 +360,7 @@ bool daArrow_Lighteff_c::_execute() { fopAcM_delete(this); } - cam = dComIfGp_getPlayerCameraID(0); + int cam = dComIfGp_getPlayerCameraID(0); if(field_0x2E8 == 1) { fopAcM_seStartCurrent(this, JA_SE_OBJ_FIRE_ARROW_AMB, 0); if(!dComIfGp_checkCameraAttentionStatus(cam, 0x20)) { @@ -399,7 +403,7 @@ static BOOL daArrow_Lighteff_IsDelete(void*) { static actor_method_class daArrow_LighteffMethodTable = { (process_method_func)daArrow_Lighteff_Create, (process_method_func)daArrow_Lighteff_Delete, - (process_method_func)daArrow_Lighteff_Draw, + (process_method_func)daArrow_Lighteff_Execute, (process_method_func)daArrow_Lighteff_IsDelete, (process_method_func)daArrow_Lighteff_Draw, };