diff --git a/configure.py b/configure.py index d8827cdf0..c1ab0fd0c 100755 --- a/configure.py +++ b/configure.py @@ -1777,7 +1777,7 @@ config.libs = [ ActorRel(Matching, "d_a_scene_change"), ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_shutter"), ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_shutter2"), - ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_st"), + ActorRel(Matching, "d_a_st"), ActorRel(Matching, "d_a_steam_tag"), ActorRel(Matching, "d_a_swattack"), ActorRel(Matching, "d_a_switem"), diff --git a/include/d/actor/d_a_st.h b/include/d/actor/d_a_st.h index 02b76e40c..1cec22974 100644 --- a/include/d/actor/d_a_st.h +++ b/include/d/actor/d_a_st.h @@ -144,8 +144,9 @@ struct st_class { /* 0x1F88 */ dPa_smokeEcallBack m1F88; /* 0x1FA8 */ enemyice mEnemyIce; /* 0x2360 */ u32 mShadowId; +#if VERSION > VERSION_DEMO /* 0x2364 */ s8 m2364; - /* 0x2365 */ u8 m2365[0x2368 - 0x2365]; +#endif }; // Size: 0x2368 class HIO_c : public JORReflexible { diff --git a/src/d/actor/d_a_st.cpp b/src/d/actor/d_a_st.cpp index afec93cba..124226fe1 100644 --- a/src/d/actor/d_a_st.cpp +++ b/src/d/actor/d_a_st.cpp @@ -372,8 +372,14 @@ static void st_part_draw(st_class* i_this) { local_24.set(actor->current.pos.x, actor->current.pos.y + 200.0f, actor->current.pos.z); local_28 = 0; for (s32 i = 0; i < 26; i++) { - // TODO: fakematch - if ((i_this->mParts[i].mPartState < 10) && ((i_this->m1DC8 == 0) || (((u32)(i - 5U) > 1U) && (i != 7))) && (i != 0xB)) { + if ( + (i_this->mParts[i].mPartState < 10) && + !( + (i_this->m1DC8 != 0) && + ((i == 5) || (i == 6) || !(i != 7)) + ) && + (i != 0xB) + ) { J3DModel* model = i_this->mParts[i].mpPartModel; if (model != NULL) { if (((i == 0xF) || (i == 0x10) || (i == 0x11)) && (i_this->m1DD8 == 2)) { @@ -1638,11 +1644,13 @@ static void damage_check(st_class* i_this) { } } else if (i == 0) { i_this->m1DE4 = REG6_S(7) + 10; - if (i_this->mActionState != 0x20) { - if ((i_this->mActionState == 0x1F) & (u8)(((s16)(i_this->m02C4 >> 5) & 0xFF) == 0xA)) { - i_this->mActionState = 0x1F; - i_this->m02C4 = 10; - } + if ( + (i_this->mActionState == 0x20) || + // @bug Typo: Bitwise & instead of logical &. + ((i_this->mActionState == 0x1F) & (i_this->m02C4 >= 0xA)) + ) { + i_this->mActionState = 0x1F; + i_this->m02C4 = 10; } else if (i_this->mActionState != 0x21) { i_this->mActionState = 0x1F; i_this->m02C4 = 0; @@ -2709,8 +2717,13 @@ static BOOL daSt_Execute(st_class* i_this) { if (i_this->m1DDC != 0) { i_this->m1DDC--; } +#if VERSION == VERSION_DEMO + damage_check(i_this); + St_move(i_this); +#else St_move(i_this); damage_check(i_this); +#endif cLib_addCalcAngleS2(&actor->shape_angle.y, actor->current.angle.y + i_this->m0302, 2, 0x1000); i_this->m0302 = 0; i_this->mpMorf->play(&actor->eyePos, 0, 0);