diff --git a/configure.py b/configure.py index b03469e3a..ce49a0aaf 100755 --- a/configure.py +++ b/configure.py @@ -1427,7 +1427,7 @@ config.libs = [ ActorRel(Matching, "d_a_obj_ohatch"), ActorRel(Matching, "d_a_obj_otble"), ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_pbco"), - ActorRel(Equivalent, "d_a_obj_pirateship"), # weak func order + ActorRel(Matching, "d_a_obj_pirateship"), ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_quake"), ActorRel(Matching, "d_a_obj_rcloud"), ActorRel(Matching, "d_a_obj_roten"), @@ -1476,7 +1476,7 @@ config.libs = [ ActorRel(Matching, "d_a_warpdm20", extra_cflags=['-pragma "nosyminline on"']), ActorRel(Matching, "d_a_warphr", extra_cflags=['-pragma "nosyminline on"']), ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_wbird"), - ActorRel(Equivalent, "d_a_ykgr", extra_cflags=['-pragma "nosyminline on"']), + ActorRel(Matching, "d_a_ykgr"), ActorRel(Matching, "d_a_alldie"), ActorRel(Matching, "d_a_am"), ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_am2"), @@ -1510,7 +1510,7 @@ config.libs = [ ActorRel(NonMatching, "d_a_nzg"), ActorRel(NonMatching, "d_a_obj_aygr"), ActorRel(NonMatching, "d_a_obj_balancelift"), - ActorRel(Equivalent, "d_a_obj_barrier"), # weak func order + ActorRel(MatchingFor("GZLE01", "GZLP01"), "d_a_obj_barrier"), ActorRel(NonMatching, "d_a_obj_bemos"), ActorRel(Matching, "d_a_obj_canon"), ActorRel(Matching, "d_a_obj_eff"), @@ -1637,7 +1637,7 @@ config.libs = [ ActorRel(NonMatching, "d_a_npc_p2"), ActorRel(NonMatching, "d_a_npc_people"), # regalloc ActorRel(NonMatching, "d_a_npc_pf1"), - ActorRel(Equivalent, "d_a_npc_photo"), + ActorRel(MatchingFor("GZLE01", "GZLP01"), "d_a_npc_photo"), ActorRel(NonMatching, "d_a_npc_pm1"), ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_npc_roten"), ActorRel(NonMatching, "d_a_npc_rsh1"), diff --git a/include/d/actor/d_a_obj_barrier.h b/include/d/actor/d_a_obj_barrier.h index 02b9705e9..d56a474a4 100644 --- a/include/d/actor/d_a_obj_barrier.h +++ b/include/d/actor/d_a_obj_barrier.h @@ -28,6 +28,11 @@ public: class daObjBarrier_ef_c { public: + daObjBarrier_ef_c() { + mActiveEffFlags = 0; + } + ~daObjBarrier_ef_c() {} + void setDummyTexture(int); bool checkHitActor(fopAc_ac_c*); void birth(fopAc_ac_c*, f32, cXyz, cXyz, int); @@ -62,10 +67,6 @@ public: PRM_MOYA_S = 0x08, }; - daObjBarrier_c() { - mEffect.mActiveEffFlags = 0; - } - void init_mtx(); static int solidHeapCB(fopAc_ac_c*); bool create_heap(); diff --git a/include/d/actor/d_a_obj_pirateship.h b/include/d/actor/d_a_obj_pirateship.h index b549ead2d..8b91fcedc 100644 --- a/include/d/actor/d_a_obj_pirateship.h +++ b/include/d/actor/d_a_obj_pirateship.h @@ -29,7 +29,7 @@ namespace daObjPirateship { inline cPhs_State _create(); inline bool _delete(); inline bool _draw(); - bool _execute(); + inline bool _execute(); void getKajiID() {} void set_mtx(); diff --git a/include/d/actor/d_a_ykgr.h b/include/d/actor/d_a_ykgr.h index 214bb43a3..403bebaff 100644 --- a/include/d/actor/d_a_ykgr.h +++ b/include/d/actor/d_a_ykgr.h @@ -2,7 +2,7 @@ #define D_A_YKGR_H #include "f_op/f_op_actor.h" -#include "Jsystem/JParticle/JPAEmitter.h" +#include "JSystem/JParticle/JPAEmitter.h" #include "f_op/f_op_camera_mng.h" #include "d/d_com_inf_game.h" #include "m_Do/m_Do_hostIO.h" @@ -69,6 +69,7 @@ public: m18 = 0.0f; m1C = true; } + ~dPa_YkgrPcallBack() {} void draw(JPABaseEmitter*, JPABaseParticle*); void setParam(float); diff --git a/src/d/actor/d_a_obj_pirateship.cpp b/src/d/actor/d_a_obj_pirateship.cpp index 5af6742bb..d2f9232b2 100644 --- a/src/d/actor/d_a_obj_pirateship.cpp +++ b/src/d/actor/d_a_obj_pirateship.cpp @@ -403,6 +403,63 @@ cPhs_State daObjPirateship::Method::Create(void* v_this) { return ((daObjPirateship::Act_c*)v_this)->_create(); } +/* 000012A4-000017E0 .text _execute__Q215daObjPirateship5Act_cFv */ +bool daObjPirateship::Act_c::_execute() { + dBgS_GndChk gndChk; + cXyz sp14(current.pos.x, current.pos.y + 50.0f, current.pos.z); + gndChk.SetPos(&sp14); + gndChk.OffWall(); + if (dComIfG_Bgsp()->GroundCross(&gndChk) > -G_CM3D_F_INF) { + s32 roomNo = dComIfG_Bgsp()->GetRoomId(gndChk); + JUT_ASSERT(VERSION_SELECT(717, 720, 739, 739), 0 <= roomNo && roomNo < 64) + fopAcM_SetRoomNo(this, roomNo); + } + + if (!demo_move()) { + if (l_HIO.m05 == 0 && m4A8 != NULL) { + dLib_pathMove(¤t.pos, &m4A4, m4A8, 3.0f, path_move_call_back, (void*)this); + if (m32E > 0x4000 || m32E < -0x4000) { + cLib_addCalcAngleS2(&m330, l_HIO.m12, 0x10, 0x300); + } else { + cLib_addCalcAngleS2(&m330, l_HIO.m10, 0x10, 0x300); + } + m32E += m330; + current.pos.y = home.pos.y + (l_HIO.m0C + 10.0f) * cM_ssin(m32E); + } + m2CA = l_HIO.m06; + } + + if (m2CC == 0) { + if (dComIfGs_isEventBit(0x310)) { +#if VERSION > VERSION_JPN + if (!dComIfGs_isEventBit(1)) { + CreateWave(); + } +#endif + m2CC = 1; + } else { + return false; + } + } else if (m2CD == 0 && dComIfGs_isEventBit(1)) { + m2CD = 1; + pirateCreate(create_idx_tbl_1stIsland_demo); +#if VERSION > VERSION_JPN + DeleteWave(); +#endif + } + + m2E4 = NULL; + m2E4 = fopAcM_SearchByID(m_sail_id); + m2EC = NULL; + m2EC = fopAcM_SearchByID(m2F0); + m2FC = NULL; + m2FC = fopAcM_SearchByID(m300); + set_mtx(); + sound_proc(); + SetWave(); + return MoveBGExecute() != FALSE; +} + /* 00000F10-000012A4 .text _create__Q215daObjPirateship5Act_cFv */ cPhs_State daObjPirateship::Act_c::_create() { fopAcM_SetupActor(this, daObjPirateship::Act_c); @@ -509,63 +566,6 @@ bool daObjPirateship::Act_c::_draw() { return MoveBGDraw(); } -/* 000012A4-000017E0 .text _execute__Q215daObjPirateship5Act_cFv */ -bool daObjPirateship::Act_c::_execute() { - dBgS_GndChk gndChk; - cXyz sp14(current.pos.x, current.pos.y + 50.0f, current.pos.z); - gndChk.SetPos(&sp14); - gndChk.OffWall(); - if (dComIfG_Bgsp()->GroundCross(&gndChk) > -G_CM3D_F_INF) { - s32 roomNo = dComIfG_Bgsp()->GetRoomId(gndChk); - JUT_ASSERT(VERSION_SELECT(717, 720, 739, 739), 0 <= roomNo && roomNo < 64) - fopAcM_SetRoomNo(this, roomNo); - } - - if (!demo_move()) { - if (l_HIO.m05 == 0 && m4A8 != NULL) { - dLib_pathMove(¤t.pos, &m4A4, m4A8, 3.0f, path_move_call_back, (void*)this); - if (m32E > 0x4000 || m32E < -0x4000) { - cLib_addCalcAngleS2(&m330, l_HIO.m12, 0x10, 0x300); - } else { - cLib_addCalcAngleS2(&m330, l_HIO.m10, 0x10, 0x300); - } - m32E += m330; - current.pos.y = home.pos.y + (l_HIO.m0C + 10.0f) * cM_ssin(m32E); - } - m2CA = l_HIO.m06; - } - - if (m2CC == 0) { - if (dComIfGs_isEventBit(0x310)) { -#if VERSION > VERSION_JPN - if (!dComIfGs_isEventBit(1)) { - CreateWave(); - } -#endif - m2CC = 1; - } else { - return false; - } - } else if (m2CD == 0 && dComIfGs_isEventBit(1)) { - m2CD = 1; - pirateCreate(create_idx_tbl_1stIsland_demo); -#if VERSION > VERSION_JPN - DeleteWave(); -#endif - } - - m2E4 = NULL; - m2E4 = fopAcM_SearchByID(m_sail_id); - m2EC = NULL; - m2EC = fopAcM_SearchByID(m2F0); - m2FC = NULL; - m2FC = fopAcM_SearchByID(m300); - set_mtx(); - sound_proc(); - SetWave(); - return MoveBGExecute() != FALSE; -} - /* 00001E8C-00001F50 .text Delete__Q215daObjPirateship6MethodFPv */ BOOL daObjPirateship::Method::Delete(void* v_this) { return ((daObjPirateship::Act_c*)v_this)->_delete(); diff --git a/src/d/actor/d_a_ykgr.cpp b/src/d/actor/d_a_ykgr.cpp index b20ab63df..8ca248561 100644 --- a/src/d/actor/d_a_ykgr.cpp +++ b/src/d/actor/d_a_ykgr.cpp @@ -12,8 +12,6 @@ #include "f_op/f_op_actor_mng.h" #include "m_Do/m_Do_hostIO.h" -#include "weak_bss_936_to_1036.h" // IWYU pragma: keep - class daYkgr_HIO_c : #if VERSION == VERSION_DEMO public JORReflexible