d_a_mg_rod debug improvements (#2993)

This commit is contained in:
Max Roncace
2025-12-23 19:11:09 -05:00
committed by GitHub
parent e8c70fb18f
commit b384af2431
13 changed files with 937 additions and 867 deletions
+2 -2
View File
@@ -231,8 +231,8 @@ void daE_BG_c::setSparkEffect() {
fopAc_ac_c* daE_BG_c::search_esa() {
dmg_rod_class* rod = (dmg_rod_class*)fopAcM_SearchByName(PROC_MG_ROD);
if (rod != NULL && rod->kind == 1 && rod->action != 5 && rod->field_0x100d != 0 &&
rod->actor.current.pos.y < rod->field_0x590 - 20.0f) {
if (rod != NULL && rod->kind == 1 && rod->action != 5 && rod->is_hook_in_water != 0 &&
rod->actor.current.pos.y < rod->water_surface_y - 20.0f) {
return &rod->actor;
} else {
return NULL;
+2 -2
View File
@@ -215,8 +215,8 @@ static obj_kbox_class* search_box(e_sg_class* i_this) {
static dmg_rod_class* search_esa(e_sg_class* i_this) {
dmg_rod_class* rod = (dmg_rod_class*)fopAcM_SearchByName(PROC_MG_ROD);
if (rod != NULL && rod->kind == 1 && rod->action != 5 && rod->field_0x100d != 0 &&
rod->actor.current.pos.y < rod->field_0x590 - 20.0f)
if (rod != NULL && rod->kind == 1 && rod->action != 5 && rod->is_hook_in_water != 0 &&
rod->actor.current.pos.y < rod->water_surface_y - 20.0f)
{
return rod;
}
+10 -10
View File
@@ -175,7 +175,7 @@ static void* s_lure_sub(void* a, void* b) {
if (rod->kind == 0 &&
rod->action == 4 &&
rod->field_0x10a9 == 0 &&
rod->field_0x100d != 0) {
rod->is_hook_in_water != 0) {
return rod;
}
}
@@ -189,8 +189,8 @@ static void* s_esa_sub(void* a, void* b) {
dmg_rod_class* rod = (dmg_rod_class*)a;
if (rod->kind == 1 &&
rod->action != 5 &&
rod->field_0x100d != 0 &&
rod->actor.current.pos.y < rod->field_0x590 - 20.0f) {
rod->is_hook_in_water != 0 &&
rod->actor.current.pos.y < rod->water_surface_y - 20.0f) {
return rod;
}
}
@@ -1328,7 +1328,7 @@ static void mf_lure_search(mg_fish_class* i_this) {
dmg_rod_class* rod = (dmg_rod_class*)fopAcM_SearchByID(i_this->mRodId);
if (rod == NULL || rod->field_0x1008 != 0) {
foundLure = true;
} else if (rod->field_0x100a != 0 || rod->field_0x100d == 0) {
} else if (rod->field_0x100a != 0 || rod->is_hook_in_water == 0) {
foundLure = true;
} else if (rod->action != 4) {
if (rod->action >= 5 &&
@@ -1531,7 +1531,7 @@ static void mf_lure_search(mg_fish_class* i_this) {
}
}
rod->field_0x1410 = 0.0f;
rod->camera_morf_rate = 0.0f;
dKy_Sound_set(i_this->actor.current.pos, 40.0f * i_this->mJointScale,
fopAcM_GetID(i_this), 5);
rod->vib_timer = 5;
@@ -1848,7 +1848,7 @@ static void mf_hit(mg_fish_class* i_this) {
pvVar5->play_cam_timer = 0;
pvVar5->field_0x14c2 = 0;
pvVar5->play_cam_fovy = 90.0f;
pvVar5->field_0x146d = 0;
pvVar5->msg_flow_state = 0;
pvVar5->field_0x10b0 = 0;
daPy_py_c* player = daPy_getLinkPlayerActorClass();
player->onFishingRodGetFish();
@@ -2173,7 +2173,7 @@ static void mf_catch(mg_fish_class* i_this) {
rod->actor.health = 1;
rod->play_cam_mode = 11;
rod->play_cam_timer = 0;
rod->field_0x146d = 0;
rod->msg_flow_state = 0;
i_this->field_0x740 = cM_rndF(1000.0f) + 3000.0f;
}
break;
@@ -2234,7 +2234,7 @@ static void mf_esa_search(mg_fish_class* i_this) {
if (rod_actor == NULL) {
flag1 = 1;
} else if (rod->field_0x100d == 0) {
} else if (rod->is_hook_in_water == 0) {
flag1 = 1;
} else if (rod->action == 5) {
flag1 = 1;
@@ -3575,8 +3575,8 @@ static int daMg_Fish_Execute(mg_fish_class* i_this) {
rod->actor.current.pos.x = i_this->field_0x638.x;
rod->actor.current.pos.y = i_this->field_0x638.y;
rod->actor.current.pos.z = i_this->field_0x638.z;
rod->field_0x1000 = 0;
rod->field_0xffc = 0;
rod->lure_pitch_offset = 0;
rod->lure_yaw_offset = 0;
}
if (i_this->field_0x659 != 0) {
fopAc_ac_c* rod = fopAcM_SearchByID(i_this->mRodId);
+886 -825
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -135,7 +135,7 @@ static void df_fly(npc_df_class* i_this, df_s* df_p) {
df_p->field_0x72 = cM_rndF(5.0f) + 5.0f;
if (df_p->field_0x77 == 0 && df_p->field_0x6c > 2000 && lrl != NULL) {
if (lrl->field_0x6ac.y < player->eyePos.y + 80.0f) {
if (lrl->rod_tip_pos.y < player->eyePos.y + 80.0f) {
if (lrl->kind == 0 || (lrl->kind != 0 && lrl->play_cam_mode == 7)) {
df_p->field_0x74 = 2;
df_p->field_0x75 = 0;
@@ -200,7 +200,7 @@ static void df_rod(npc_df_class* i_this, df_s* df_p) {
}
if (df_p->field_0x2c.y < 50.0f) {
cLib_addCalcAngleS2(&df_p->field_0x44.y, lrl->field_0x6c4 + df_p->field_0x6e, 4, 0x400);
cLib_addCalcAngleS2(&df_p->field_0x44.y, lrl->rod_angle_y + df_p->field_0x6e, 4, 0x400);
} else {
if (fabsf(df_p->field_0x2c.x) > 10.0f && fabsf(df_p->field_0x2c.z) > 10.0f) {
cLib_addCalcAngleS2(&df_p->field_0x44.y, cM_atan2s(-df_p->field_0x2c.x, -df_p->field_0x2c.z), 4, 0x400);
@@ -214,12 +214,12 @@ static void df_rod(npc_df_class* i_this, df_s* df_p) {
df_p->field_0x38.z = 0.0f;
df_p->field_0x38.x = 0.0f;
df_p->field_0x38.y = 5.0f;
cLib_addCalcAngleS2(&df_p->field_0x44.y, lrl->field_0x6c4 + df_p->field_0x6e, 2, 0x800);
cLib_addCalcAngleS2(&df_p->field_0x44.y, lrl->rod_angle_y + df_p->field_0x6e, 2, 0x800);
}
cXyz sp54(lrl->mg_rod.field_0x0[df_p->field_0x7b] + ((lrl->mg_rod.field_0x0[df_p->field_0x7b + 1] - lrl->mg_rod.field_0x0[df_p->field_0x7b]) * df_p->field_0x64));
if ((i_this->field_0xd34 - lrl->mg_rod.field_0x0[8]).abs() > 5.0f || lrl->field_0x6ac.y > player->eyePos.y + 80.0f) {
if ((i_this->field_0xd34 - lrl->mg_rod.field_0x0[8]).abs() > 5.0f || lrl->rod_tip_pos.y > player->eyePos.y + 80.0f) {
df_p->field_0x74 = 1;
df_p->field_0x4a.y += (int)cM_rndFX(8192.0f);
df_p->field_0x44.x = df_p->field_0x4a.x = -8192.0f - cM_rndF(4096.0f);
+2 -2
View File
@@ -601,7 +601,7 @@ static void henna_ride(npc_henna_class* i_this) {
lookat_pos.y = 0.0f;
lookat_pos.z = -100.0f + VREG_F(8);
MtxPosition(&lookat_pos, &pos);
pos.y = lrl->field_0x590;
pos.y = lrl->water_surface_y;
f32 unkFloat1;
if (i_this->mAnmResIndex == 7) {
unkFloat1 = 22.0f;
@@ -630,7 +630,7 @@ static void henna_ride(npc_henna_class* i_this) {
i_this->field_0x70d = 10;
}
if ((lrl != NULL && lrl->field_0x146d != 0) || i_this->field_0x7b8 != 0 ||
if ((lrl != NULL && lrl->msg_flow_state != 0) || i_this->field_0x7b8 != 0 ||
dComIfGp_checkPlayerStatus0(0, 0x2000) != 0)
{
i_this->field_0x70d = 2;