obj_barrier OK on JPN

This commit is contained in:
LagoLunatic
2025-08-22 00:56:51 -04:00
parent cb4fe5cf27
commit 65c446628b
3 changed files with 29 additions and 8 deletions
+1 -1
View File
@@ -1510,7 +1510,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_nzg"),
ActorRel(NonMatching, "d_a_obj_aygr"),
ActorRel(NonMatching, "d_a_obj_balancelift"),
ActorRel(MatchingFor("GZLE01", "GZLP01"), "d_a_obj_barrier"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_barrier"),
ActorRel(NonMatching, "d_a_obj_bemos"),
ActorRel(Matching, "d_a_obj_canon"),
ActorRel(Matching, "d_a_obj_eff"),
+2
View File
@@ -97,8 +97,10 @@ public:
/* 0x5D8 */ daObjBarrier_ef_c mEffect;
/* 0x724 */ u8 mBarrierActive;
/* 0x728 */ int mMoya;
#if VERSION > VERSION_JPN
/* 0x72C */ s16 mEventID;
/* 0x730 */ int mBarrierProc;
#endif
};
#endif /* D_A_OBJ_BARRIER_H */
+26 -7
View File
@@ -106,7 +106,7 @@ bool daObjBarrier_anm_c::init() {
J3DAnmTevRegKey* pbrk = static_cast<J3DAnmTevRegKey*>(dComIfG_getObjectRes(l_arcname, YCAGE_BRK_YCAGE00));
if (modelData == NULL || pbtk == NULL || pbrk == NULL) {
JUT_ASSERT(407, FALSE);
JUT_ASSERT(VERSION_SELECT(406, 406, 407, 407), FALSE);
rt = false;
} else {
mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x1000200);
@@ -225,6 +225,7 @@ void daObjBarrier_c::brkAnmPlay() {
mAnm.setBrkFrame(brk_frame);
}
#if VERSION > VERSION_JPN
/* 00000884-000009F0 .text break_start_wait_proc__14daObjBarrier_cFv */
void daObjBarrier_c::break_start_wait_proc() {
// 0x3980: Saw Hyrule 3 Electric Barrier Demo
@@ -271,11 +272,26 @@ void daObjBarrier_c::break_end_wait_proc() {
fopAcM_delete(this);
}
}
#endif
/* 00000AB8-00000B34 .text break_check__14daObjBarrier_cFv */
bool daObjBarrier_c::break_check() {
bool chk = false;
#if VERSION <= VERSION_JPN
if (mMoya == 0) {
if (dComIfGs_isEventBit(0x3980) == true) {
daPy_py_c* player_p = (daPy_py_c*)daPy_getPlayerActorClass();
if ((player_p->current.pos - current.pos).absXZ() >= 8800.0f) {
dComIfGs_onEventBit(dSv_evtBit_c::BARRIER_BREAK);
dComIfGp_setNextStage("Hyrule", 0xE9, 0, 9);
chk = true;
}
}
}
#else
if (mMoya == 0) {
switch (mBarrierProc) {
case PROC_BREAK_START_WAIT:
@@ -291,6 +307,7 @@ bool daObjBarrier_c::break_check() {
break;
}
}
#endif
return chk;
}
@@ -301,8 +318,8 @@ void daObjBarrier_ef_c::setDummyTexture(int i_idx) {
J3DTexture* texture = modelData->getTexture();
JUTNameTab* textureName = modelData->getTextureName();
JUT_ASSERT(808, texture != NULL);
JUT_ASSERT(809, textureName != NULL);
JUT_ASSERT(VERSION_SELECT(710, 710, 808, 808), texture != NULL);
JUT_ASSERT(VERSION_SELECT(711, 711, 809, 809), textureName != NULL);
for (u16 i = 0; i < texture->getNum(); i++) {
if (strcmp(textureName->getName(i), "__dummy") == 0) {
@@ -377,13 +394,13 @@ void daObjBarrier_ef_c::birth(fopAc_ac_c* i_hitActor, f32 i_radius, cXyz i_cente
J3DModelData* modelData = mpModel[effect_idx]->getModelData();
J3DAnmTextureSRTKey* btk_anm_p = static_cast<J3DAnmTextureSRTKey*>(dComIfG_getObjectRes(l_arcname, YCAGE_BTK_YHRBR00));
JUT_ASSERT(937, btk_anm_p != NULL);
JUT_ASSERT(VERSION_SELECT(839, 839, 937, 937), btk_anm_p != NULL);
J3DAnmTransform* bck_anm_p = static_cast<J3DAnmTransform*>(dComIfG_getObjectRes(l_arcname, YCAGE_BCK_YHRBR00));
JUT_ASSERT(942, bck_anm_p != NULL);
JUT_ASSERT(VERSION_SELECT(844, 844, 942, 942), bck_anm_p != NULL);
J3DAnmTevRegKey* brk_anm_p = static_cast<J3DAnmTevRegKey*>(dComIfG_getObjectRes(l_arcname, YCAGE_BRK_YHRBR00));
JUT_ASSERT(947, brk_anm_p != NULL);
JUT_ASSERT(VERSION_SELECT(849, 849, 947, 947), brk_anm_p != NULL);
mBtk[effect_idx].init(modelData, btk_anm_p, TRUE, J3DFrameCtrl::EMode_NONE, 1.0f, 0, -1,
true, 0);
@@ -409,7 +426,7 @@ bool daObjBarrier_ef_c::init() {
J3DAnmTevRegKey* pbrk = static_cast<J3DAnmTevRegKey*>(dComIfG_getObjectRes(l_arcname, YCAGE_BRK_YHRBR00));
if (modelData == NULL || pbtk == NULL || pbck == NULL || pbrk == NULL) {
JUT_ASSERT(1016, FALSE);
JUT_ASSERT(VERSION_SELECT(918, 918, 1016, 1016), FALSE);
rt = false;
} else {
for (int i = 0; i < 4; i++) {
@@ -572,9 +589,11 @@ bool daObjBarrier_c::_execute() {
/* 00001B64-00001C1C .text _draw__14daObjBarrier_cFv */
bool daObjBarrier_c::_draw() {
#if VERSION > VERSION_JPN
if (mBarrierProc) {
return true;
}
#endif
if (mMoya == 0) {
mAnm.getBtkAnmP()->entry(mAnm.getMdlP()->getModelData());