Skip to content

d_a_mg_rod mostly done#2598

Merged
hatal175 merged 2 commits intozeldaret:mainfrom
TakaRikka:mgrod
Aug 23, 2025
Merged

d_a_mg_rod mostly done#2598
hatal175 merged 2 commits intozeldaret:mainfrom
TakaRikka:mgrod

Conversation

@TakaRikka
Copy link
Copy Markdown
Contributor

first pass, still needs more cleanup later

@decomp-dev
Copy link
Copy Markdown

decomp-dev bot commented Aug 22, 2025

Report for GZ2E01 (aec2c09 - 3d2492e)

📈 Matched code: 79.40% (+0.45%, +51712 bytes)

✅ 85 new matches
Unit Function Bytes Before After
d_a_mg_rod/d/actor/d_a_mg_rod play_camera_u(dmg_rod_class*) +4793 0.08% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod uki_main(dmg_rod_class*) +4088 0.10% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod dmg_rod_Execute(dmg_rod_class*) +3453 0.12% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod lure_action(dmg_rod_class*) +3156 0.13% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod uki_catch(dmg_rod_class*) +2288 0.17% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod lure_hit(dmg_rod_class*, mg_fish_class*) +2129 0.19% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod lure_cast(dmg_rod_class*) +2125 0.19% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod lure_standby(dmg_rod_class*) +1909 0.21% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod line_control1_u(dmg_rod_class*) +1876 0.21% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod uki_standby(dmg_rod_class*) +1821 0.22% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod lure_disp(dmg_rod_class*) +1625 0.25% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod uki_calc(dmg_rod_class*) +1524 0.26% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod uki_hit(dmg_rod_class*) +1337 0.30% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod hook_set(dmg_rod_class*, cXyz*, int) +1256 0.32% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod dmg_rod_Draw(dmg_rod_class*) +1225 0.33% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod uki_ready(dmg_rod_class*) +1168 0.34% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod lure_bare(dmg_rod_class*) +992 0.40% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod dmg_rod_Create(fopAc_ac_c*) +973 0.41% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod lure_heart(dmg_rod_class*) +853 0.47% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod wd_action(dmg_rod_class*, float, wd_ss*) +773 0.52% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod ws_action(dmg_rod_class*, float) +660 0.60% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod uki_pl_arm_calc(dmg_rod_class*) +641 0.62% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod po_action(dmg_rod_class*, float) +633 0.63% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod pe_action(dmg_rod_class*, float) +573 0.69% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod action_eff_set(dmg_rod_class*) +548 0.72% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod line_control2_u(dmg_rod_class*) +500 0.79% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod lure_onboat(dmg_rod_class*) +496 0.80% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod sp_action(dmg_rod_class*, float) +480 0.83% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod wd_check(dmg_rod_class*) +453 0.88% 100.00%
d_a_mg_rod/d/actor/d_a_mg_rod sibuki_set(dmg_rod_class*, float, cXyz*, int) +368 1.08% 100.00%

...and 55 more new matches

📈 8 improvements in unmatched functions
Unit Function Bytes Before After
d_a_mg_rod/d/actor/d_a_mg_rod play_camera(dmg_rod_class*) +8415 0.05% 99.37%
d_a_mg_rod/d/actor/d_a_mg_rod rod_control(dmg_rod_class*) +3264 0.12% 99.78%
d_a_mg_rod/d/actor/d_a_mg_rod lure_main(dmg_rod_class*) +2359 0.17% 99.45%
d_a_mg_rod/d/actor/d_a_mg_rod lure_catch(dmg_rod_class*) +1966 0.20% 98.66%
d_a_mg_rod/d/actor/d_a_mg_rod useHeapInit(fopAc_ac_c*) +1599 0.25% 99.65%
d_a_mg_rod/d/actor/d_a_mg_rod line_control2(dmg_rod_class*) +1310 0.30% 99.91%
d_a_mg_rod/d/actor/d_a_mg_rod ground_action(dmg_rod_class*) +1303 0.30% 99.02%
d_a_mg_rod/d/actor/d_a_mg_rod line_control1(dmg_rod_class*) +1149 0.35% 99.69%
📉 1 regression in unmatched functions
Unit Function Bytes Before After
d_a_mg_rod/d/actor/d_a_mg_rod JMAFastSqrt(float) -3 14.29% 0.00%

if (s_fish_ct <= 1) {
f32 fVar1 = i_this->field_0x5ec;
if (rod->field_0xf80 == 4) {
if (rod->lure_type == 4) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MG_LURE_SP

if (i_this->mGedouKind != GEDOU_KIND_CF_1 &&
rod->field_0xf80 != 4 &&
(i_this->field_0x750 & learn_d[rod->field_0xf80]) != 0)
rod->lure_type != 4 &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MG_LURE_SP

cXyz diff = rod->current.pos - i_this->actor.current.pos;
if (rod->field_0xf80 == 2 && rod->field_0x100c >= 10) {
cXyz diff = rod->actor.current.pos - i_this->actor.current.pos;
if (rod->lure_type == 2 && rod->field_0x100c >= 10) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MG_LURE_PO

}
f32 rodDist = sqrtf(VECSquareMag(&rodSep));
if (rod->field_0xf80 != 4 && rod->field_0xf80 != 2 &&
if (rod->lure_type != 4 && rod->lure_type != 2 &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MG_LURE_SP and MG_LURE_PO

if (rodDist < 1.3f * i_this->field_0x5ec &&
(rod->field_0xf80 == 4 || rod->field_0xf80 == 3) &&
rod->field_0x14f0 != 0 &&
(rod->lure_type == 4 || rod->lure_type == 3) &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lure type enum

case 900:
if (!actor->eventInfo.checkCommandDemoAccrpt()) {
fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0);
actor->eventInfo.onCondition(2);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dEvtCnd_CANDEMO_e

if (i_this->msgflow.doFlow(actor, NULL, 0)) {
camera->mCamera.Reset(i_this->play_cam_center, i_this->play_cam_eye, i_this->play_cam_fovy, 0);
camera->mCamera.Start();
camera->mCamera.S
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dEvtCnd_CANDEMO_e

if (i_this->msgflow.doFlow(actor, NULL, 0)) {
camera->mCamera.Reset(i_this->play_cam_center, i_this->play_cam_eye, i_this->play_cam_fovy, 0);
camera->mCamera.Start();
camera->mCamera.S
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dEvtCnd_CANDEMO_e

if (i_this->msgflow.doFlow(actor, NULL, 0)) {
camera->mCamera.Reset(i_this->play_cam_center, i_this->play_cam_eye, i_this->play_cam_fovy, 0);
camera->mCamera.Start();
camera->mCamera.S
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.35f

if (i_this->msgflow.doFlow(actor, NULL, 0)) {
camera->mCamera.Reset(i_this->play_cam_center, i_this->play_cam_eye, i_this->play_cam_fovy, 0);
camera->mCamera.Start();
camera->mCamera.S
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably inline, no?

@hatal175 hatal175 merged commit 0a8679f into zeldaret:main Aug 23, 2025
1 check passed
@TakaRikka TakaRikka deleted the mgrod branch September 1, 2025 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants