d_a_obj_bemos equivalent (#2679)

* checkpoint

* e_wb changes

* checkpoint

* small fix

* d_a_obj_bemos equivalent

* add comment, fix other version symbols

* fixes for hatal
This commit is contained in:
Howard Luck
2025-09-21 10:00:19 -06:00
committed by GitHub
parent c97dbcea0e
commit 9a19ec0c13
11 changed files with 2458 additions and 2327 deletions
+43 -43
View File
@@ -674,12 +674,12 @@ static void ride_off(e_rd_class* i_this) {
e_wb_class* bullbo = (e_wb_class*)fopAcM_SearchByID(i_this->mWbActorID);
if (bullbo != NULL) {
bullbo->field_0x6be &= ~i_this->field_0x9be;
bullbo->mStatusFlags &= ~i_this->field_0x9be;
i_this->field_0x9be = 0;
if (bullbo->mActionID != 22 && bullbo->mActionID != 23 && bullbo->mActionID != 24) {
if (bullbo->mActionID == 1) {
if ((bullbo->field_0x6be & 3) != 0) {
if ((bullbo->mStatusFlags & 3) != 0) {
bullbo->mActionID = 6;
} else {
bullbo->mActionID = 0;
@@ -688,7 +688,7 @@ static void ride_off(e_rd_class* i_this) {
bullbo->mActionMode = 0;
} else if (bullbo->mActionID == 21) {
bullbo->mActionMode = 0;
} else if ((bullbo->field_0x6be & 1) == 0) {
} else if ((bullbo->mStatusFlags & 1) == 0) {
if (bullbo->mActionID == 6 && (bullbo->mActionMode == 2 || bullbo->mActionMode == 3)) {
bullbo->mActionMode = 1;
} else {
@@ -720,7 +720,7 @@ static void* s_wb_sub(void* i_actor, void* i_data) {
((e_wb_class*)i_actor)->mActionID != ACTION_DAMAGE && ((e_wb_class*)i_actor)->mActionID != ACTION_A_DAMAGE && ((e_wb_class*)i_actor)->mActionID != ACTION_STAND) {
e_rd_class* i_this = (e_rd_class*)i_data;
if (i_this->mBossMode == ((e_wb_class*)i_actor)->field_0x79d &&
(data_80519230 != 0 || (((e_wb_class*)i_actor)->field_0x6be & 3) != 3) && target_info_count < 10) {
(data_80519230 != 0 || (((e_wb_class*)i_actor)->mStatusFlags & 3) != 3) && target_info_count < 10) {
target_info[target_info_count] = (fopAc_ac_c*)i_actor;
target_info_count++;
}
@@ -799,10 +799,10 @@ static void wb_check(e_rd_class* i_this, s16 param_2) {
if (bullbo != NULL) {
if (data_80519200 != 0) {
if (i_this->field_0x5bc != 1) {
if ((bullbo->field_0x6be & 1) == 0) {
if ((bullbo->mStatusFlags & 1) == 0) {
return;
}
} else if ((bullbo->field_0x6be & 1) != 0) {
} else if ((bullbo->mStatusFlags & 1) != 0) {
return;
}
}
@@ -810,11 +810,11 @@ static void wb_check(e_rd_class* i_this, s16 param_2) {
i_this->mAction = ACTION_WB_SEARCH;
i_this->mMode = 0;
if ((bullbo->field_0x6be & 1) == 0) {
bullbo->field_0x6be |= 1;
if ((bullbo->mStatusFlags & 1) == 0) {
bullbo->mStatusFlags |= 1;
i_this->field_0x9be = 1;
} else if ((bullbo->field_0x6be & 2) == 0) {
bullbo->field_0x6be |= 2;
} else if ((bullbo->mStatusFlags & 2) == 0) {
bullbo->mStatusFlags |= 2;
i_this->field_0x9be = 2;
}
}
@@ -831,7 +831,7 @@ static BOOL wb_init_ride(e_rd_class* i_this) {
i_this->mMode = 0;
i_this->field_0x9bc = 2;
i_this->field_0x9be = i_this->field_0x5b6;
bullbo->field_0x6be |= (s8)i_this->field_0x5b6;
bullbo->mStatusFlags |= (s8)i_this->field_0x5b6;
bullbo->mActionID = 1;
if (i_this->field_0x5bc != 0 && i_this->field_0x9be == 1) {
@@ -1998,7 +1998,7 @@ static void e_rd_wb_ride(e_rd_class* i_this) {
i_this->mAction = ACTION_NORMAL;
i_this->mMode = 0;
ride_off(i_this);
} else if ((bullbo->field_0x6be & 3) == 0) {
} else if ((bullbo->mStatusFlags & 3) == 0) {
OS_REPORT("......BOSS DL !!!!\n");
if (bullbo->mActionID == 1) {
bullbo->mActionID = 0;
@@ -2069,7 +2069,7 @@ static void e_rd_wb_run(e_rd_class* i_this) {
fopAcM_setStageLayer(a_this);
}
if ((bullbo->field_0x6be & 3) == 0) {
if ((bullbo->mStatusFlags & 3) == 0) {
fopAcM_delete(a_this);
return;
}
@@ -2081,7 +2081,7 @@ static void e_rd_wb_run(e_rd_class* i_this) {
}
}
if ((bullbo->field_0x6be & 1) == 0 && bullbo->mActionID == ACTION_BOW2 && i_this->mMode != 40) {
if ((bullbo->mStatusFlags & 1) == 0 && bullbo->mActionID == ACTION_BOW2 && i_this->mMode != 40) {
anm_init(i_this, BCK_RD_RRUN02_BACK, 5.0f, 2, 1.0f);
i_this->mMode = 40;
@@ -2096,7 +2096,7 @@ static void e_rd_wb_run(e_rd_class* i_this) {
switch (i_this->mMode) {
case 0:
if ((bullbo->field_0x6be & 4) != 0) {
if ((bullbo->mStatusFlags & 4) != 0) {
if (i_this->field_0x9be == 1) {
if (bullbo->field_0x6d0 < 0) {
anm_init(i_this, BCK_RD_RSTEP_L, 10.0f, 2, 1.0f);
@@ -2107,7 +2107,7 @@ static void e_rd_wb_run(e_rd_class* i_this) {
anm_init(i_this, BCK_RD_RSTEP_BACK, 10.0f, 2, 1.0f);
}
} else {
if ((bullbo->field_0x6be & 8) != 0) {
if ((bullbo->mStatusFlags & 8) != 0) {
if (i_this->field_0x9be == 1) {
anm_init(i_this, BCK_RD_RDAMAGE, 3.0f, 0, 1.0f);
} else {
@@ -2116,14 +2116,14 @@ static void e_rd_wb_run(e_rd_class* i_this) {
i_this->field_0x990[1] = cM_rndF(50.0f) + 50.0f;
} else {
if ((bullbo->field_0x6be & 16) != 0) {
if ((bullbo->mStatusFlags & 16) != 0) {
if (i_this->field_0x9be == 1) {
anm_init(i_this, BCK_RD_RRUN, 5.0f, 2, 1.0f);
} else {
anm_init(i_this, BCK_RD_RRUN_BACK, 5.0f, 2, 1.0f);
}
} else {
if ((bullbo->field_0x6be & 32) != 0) {
if ((bullbo->mStatusFlags & 32) != 0) {
if (i_this->field_0x9be == 1) {
anm_init(i_this, BCK_RD_RWAIT, 5.0f, 2, 1.0f);
} else {
@@ -2342,9 +2342,9 @@ static void e_rd_wb_run_B(e_rd_class* i_this) {
switch (i_this->mMode) {
case 0: {
if ((bullbo->field_0x6be & 0x400) != 0) {
if ((bullbo->mStatusFlags & 0x400) != 0) {
anm_init(i_this, e_rdb_class::BCK_RB_RSTARTLOOP, 10.0f, 2, 1.0f);
} else if ((bullbo->field_0x6be & 0x800) != 0) {
} else if ((bullbo->mStatusFlags & 0x800) != 0) {
anm_init(i_this, e_rdb_class::BCK_RB_RSTART, 10.0f, 2, 1.0f);
}
@@ -2396,7 +2396,7 @@ static void e_rd_wb_run_B(e_rd_class* i_this) {
}
// check if we need to jump a fence
if ((bullbo->field_0x6be & 0x100) != 0) {
if ((bullbo->mStatusFlags & 0x100) != 0) {
i_this->mAction = ACTION_WB_BJUMP;
i_this->mMode = 0;
}
@@ -2433,7 +2433,7 @@ static void e_rd_wb_bjump(e_rd_class* i_this) {
break;
case 2:
if ((bullbo->field_0x6be & 0x200) != 0) {
if ((bullbo->mStatusFlags & 0x200) != 0) {
anm_init(i_this, BCK_RD_RUN02, 2.0f, 0, 1.0f);
i_this->mMode = 3;
}
@@ -2559,7 +2559,7 @@ static void e_rd_s_damage(e_rd_class* i_this) {
if (i_this->field_0x9be != 0) {
e_wb_class* bullbo = (e_wb_class*)fopAcM_SearchByID(i_this->mWbActorID);
if (bullbo != NULL) {
bullbo->field_0x6be &= ~i_this->field_0x9be;
bullbo->mStatusFlags &= ~i_this->field_0x9be;
}
i_this->field_0x9be = 0;
@@ -2660,7 +2660,7 @@ static void rd_disappear(e_rd_class* i_this) {
if (i_this->field_0x9be != 0) {
e_wb_class* bullbo = (e_wb_class*)fopAcM_SearchByID(i_this->mWbActorID);
if (bullbo != NULL) {
bullbo->field_0x6be &= ~i_this->field_0x9be;
bullbo->mStatusFlags &= ~i_this->field_0x9be;
if (bullbo->mActionID == 1) {
bullbo->mActionID = 0;
}
@@ -3767,7 +3767,7 @@ static void e_rd_kiba_end(e_rd_class* i_this) {
i_this->field_0x9c8 = 1;
}
if ((bullbo->field_0x6be & 0x100) != 0) {
if ((bullbo->mStatusFlags & 0x100) != 0) {
i_this->mAction = ACTION_WB_BJUMP;
i_this->mMode = 0;
i_this->field_0x990[1] = 2000;
@@ -3794,7 +3794,7 @@ static void e_rd_ikki_end(e_rd_class* i_this) {
i_this->field_0x9bc = 0;
if (daPy_getPlayerActorClass()->checkHorseRide() && bullbo != NULL) {
bullbo->field_0x6be &= ~i_this->field_0x9be;
bullbo->mStatusFlags &= ~i_this->field_0x9be;
i_this->field_0x9be = 0;
bullbo->mActionID = 16;
bullbo->mActionMode = 0;
@@ -3863,7 +3863,7 @@ static void e_rd_ikki2_end(e_rd_class* i_this) {
i_this->field_0x9bc = 0;
if (bullbo != NULL) {
bullbo->field_0x6be &= ~i_this->field_0x9be;
bullbo->mStatusFlags &= ~i_this->field_0x9be;
i_this->field_0x9be = 0;
}
@@ -3906,14 +3906,14 @@ static void e_rd_lv9_end(e_rd_class* i_this) {
break;
case 1:
if ((bullbo->field_0x6be & 8) != 0) {
if ((bullbo->mStatusFlags & 8) != 0) {
anm_init(i_this, e_rdb_class::BCK_RB_RWAIT, 10.0f, 2, 1.0f);
i_this->mMode = 2;
}
break;
case 2:
if ((bullbo->field_0x6be & 8) != 0) {
if ((bullbo->mStatusFlags & 8) != 0) {
anm_init(i_this, e_rdb_class::BCK_RB_LV9_END03, 5.0f, 0, 1.0f);
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_LV9_END03, -1);
i_this->mMode = 3;
@@ -4090,7 +4090,7 @@ static void damage_check(e_rd_class* i_this) {
e_wb_class* bullbo_p = (e_wb_class*)bullbo;
int iVar1;
if (i_this->field_0x9bc == 2 && bullbo != NULL && (bullbo_p->field_0x6be & 0xC0) != 0) {
if (i_this->field_0x9bc == 2 && bullbo != NULL && (bullbo_p->mStatusFlags & 0xC0) != 0) {
if (i_this->mAction == ACTION_IKKI2_END) {
i_this->mMode = 10;
return;
@@ -4100,7 +4100,7 @@ static void damage_check(e_rd_class* i_this) {
i_this->mMode = 0;
i_this->field_0x998 = 1000;
if ((bullbo_p->field_0x6be & 0x80) != 0) {
if ((bullbo_p->mStatusFlags & 0x80) != 0) {
i_this->field_0xa0e = a_this->shape_angle.y + 0x8000 + (s16)cM_rndFX(3000.0f);
i_this->field_0x9f6 = (s16)cM_rndFX(1000.0f);
} else {
@@ -4132,8 +4132,8 @@ static void damage_check(e_rd_class* i_this) {
if (dComIfGp_getHorseActor()->speedF > 20.0f || sVar1 > 0x7800 || sVar1 < -0x7800) {
cc_at_check(a_this, &i_this->mAtInfo);
dScnPly_c::setPauseTimer(0);
bullbo_p->field_0x79e++;
if (bullbo_p->field_0x79e >= 3) {
bullbo_p->mLapCount++;
if (bullbo_p->mLapCount >= 3) {
mDoAud_bgmStop(30);
i_this->mAction = ACTION_IKKI2_END;
i_this->mMode = 0;
@@ -4264,8 +4264,8 @@ static void damage_check(e_rd_class* i_this) {
if (i_this->mBossMode != 0 && bullbo != NULL) {
i_this->field_0x998 = 20;
if (i_this->mBossMode == 2) {
bullbo_p->field_0x79e++;
if (bullbo_p->field_0x79e == 1) {
bullbo_p->mLapCount++;
if (bullbo_p->mLapCount == 1) {
a_this->health = 0;
/* dSv_event_flag_c::M_055 - Main Event - Did damage at least once during joust/one-on-one battle */
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x58]);
@@ -4274,7 +4274,7 @@ static void damage_check(e_rd_class* i_this) {
dScnPly_c::setPauseTimer(0);
}
if (l_HIO.one_hit_kill != 0 || bullbo_p->field_0x79e >= 2) {
if (l_HIO.one_hit_kill != 0 || bullbo_p->mLapCount >= 2) {
mDoAud_bgmStop(30);
i_this->mAction = ACTION_IKKI_END;
i_this->mMode = 0;
@@ -4299,25 +4299,25 @@ static void damage_check(e_rd_class* i_this) {
}
}
bullbo_p->field_0x79e++;
bullbo_p->field_0x79f++;
bullbo_p->mLapCount++;
bullbo_p->mPathAdjustCounter++;
part_break(i_this);
if (bullbo_p->field_0x79e == 1 || bullbo_p->field_0x79e == 2 || bullbo_p->field_0x79e == 3 ||
bullbo_p->field_0x79e == 4 || bullbo_p->field_0x79e == 6) {
if (bullbo_p->mLapCount == 1 || bullbo_p->mLapCount == 2 || bullbo_p->mLapCount == 3 ||
bullbo_p->mLapCount == 4 || bullbo_p->mLapCount == 6) {
part_break(i_this);
}
s8 sVar2 = 8 - bullbo_p->field_0x79e;
s8 sVar2 = 8 - bullbo_p->mLapCount;
if (sVar2 > 8) {
sVar2 = 8;
}
dComIfGs_BossLife_public_Set(sVar2);
if (bullbo_p->field_0x79e == 5) {
if (bullbo_p->mLapCount == 5) {
Z2GetAudioMgr()->changeSubBgmStatus(2);
}
if (bullbo_p->field_0x79e >= 8) {
if (bullbo_p->mLapCount >= 8) {
i_this->mAction = ACTION_KIBA_END;
i_this->mMode = 0;
mDoAud_seStart(Z2SE_EN_RDB_V_FAINT, 0, 0, 0);
+444 -421
View File
File diff suppressed because it is too large Load Diff
+1663 -1639
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -16,13 +16,13 @@ BOOL e_wb_class::checkWait() {
void e_wb_class::setPlayerRideNow() {
mActionID = ACT_PL_RIDE_NOW;
mActionMode = 0;
field_0x6be |= 3;
mStatusFlags |= 3;
}
void e_wb_class::setPlayerRide() {
mActionID = ACT_PL_RIDE;
mActionMode = 0;
field_0x6be |= 3;
mStatusFlags |= 3;
mZ2Ride.setLinkRiding(true);
}
@@ -35,7 +35,7 @@ void e_wb_class::getOff() {
}
mActionMode = 0;
field_0x6be &= ~3;
mStatusFlags &= ~3;
mZ2Ride.setLinkRiding(false);
}
+14
View File
@@ -152,6 +152,20 @@ void mDoMtx_XrotM(Mtx mtx, s16 x) {
}
/* 8000C3DC-8000C434 006D1C 0058+00 5/5 24/24 809/809 .text mDoMtx_YrotS__FPA4_fs */
/**
* @brief Sets the given matrix to a rotation transformation around the Y-axis.
*
* This function constructs a 3x4 rotation matrix for rotating around the Y-axis by the specified angle.
* The matrix is filled directly with cosine and sine values computed from the angle.
*
* The resulting matrix layout is:
* - Row 0: cos(y), 0, sin(y), 0
* - Row 1: 0, 1, 0, 0
* - Row 2: -sin(y), 0, cos(y), 0
*
* @param mtx The 3x4 matrix to modify (output parameter).
* @param y The rotation angle as a signed 16-bit integer.
*/
void mDoMtx_YrotS(Mtx mtx, s16 y) {
f32 l_cos = JMASCos(y);
f32 l_sin = JMASSin(y);