diff --git a/configure.py b/configure.py index 5f5f0f5db5..827064dad7 100755 --- a/configure.py +++ b/configure.py @@ -1761,7 +1761,7 @@ config.libs = [ ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_gs"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_hb_leaf"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_hm"), - ActorRel(NonMatching, "d_a_e_hp"), + ActorRel(MatchingFor("GZ2E01"), "d_a_e_hp"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_hz"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_hzelda"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_is"), diff --git a/include/d/actor/d_a_e_hp.h b/include/d/actor/d_a_e_hp.h index ad001cf6d7..74d601a1c0 100644 --- a/include/d/actor/d_a_e_hp.h +++ b/include/d/actor/d_a_e_hp.h @@ -100,22 +100,5 @@ public: STATIC_ASSERT(sizeof(daE_HP_c) == 0xdfc); -class daE_HP_HIO_c : public JORReflexible { -public: - /* 806E5DEC */ daE_HP_HIO_c(); - /* 806E9D38 */ virtual ~daE_HP_HIO_c() {} - -#if DEBUG - void genMessage(JORMContext*); -#endif - - s8 mChild; - f32 modelSize; - s16 waitTimeAfterAttack; - s16 resurrectionTime; - s16 attackDelayOnApproach; - u8 rangeDisplay; -}; - #endif /* D_A_E_HP_H */ diff --git a/src/d/actor/d_a_e_hp.cpp b/src/d/actor/d_a_e_hp.cpp index a8133e38e1..79cebe5a79 100644 --- a/src/d/actor/d_a_e_hp.cpp +++ b/src/d/actor/d_a_e_hp.cpp @@ -10,6 +10,23 @@ #include "d/d_debug_viewer.h" #include "f_op/f_op_actor_enemy.h" +class daE_HP_HIO_c : public JORReflexible { +public: + /* 806E5DEC */ daE_HP_HIO_c(); + /* 806E9D38 */ virtual ~daE_HP_HIO_c() {} + +#if DEBUG + void genMessage(JORMContext*); +#endif + + s8 mChild; + f32 modelSize; + s16 waitTimeAfterAttack; + s16 resurrectionTime; + s16 attackDelayOnApproach; + u8 rangeDisplay; +}; + namespace { /* 806EA320-806EA364 000038 0044+00 0/1 0/0 0/0 .data cc_hp_src__22@unnamed@d_a_e_hp_cpp@ */ @@ -744,10 +761,21 @@ void daE_HP_c::executeDead() { movemode++; } case 1: { - if (dComIfGp_event_runCheck() != FALSE) { +#if VERSION != VERSION_SHIELD_DEBUG + // TODO: gameInfo fake match to force reuse of pointer + dComIfG_play_c* play = &g_dComIfG_gameInfo.play; + if (play->getEvent().runCheck()) +#else + if (dComIfGp_event_runCheck()) +#endif + { if (eventInfo.checkCommandDemoAccrpt()) { if (dComIfGp_getEventManager().endCheck(field_0x778)) { +#if VERSION != VERSION_SHIELD_DEBUG + play->getEvent().reset(); +#else dComIfGp_event_reset(); +#endif } else if (strcmp(dComIfGp_getEventManager().getRunEventName(), "DEFAULT_GETITEM") == 0 && field_0x784 != -1)