Skip to content

d_a_npc_ks work#2461

Merged
hatal175 merged 15 commits intozeldaret:mainfrom
carter-ktb21:d_a_npc_ks
May 30, 2025
Merged

d_a_npc_ks work#2461
hatal175 merged 15 commits intozeldaret:mainfrom
carter-ktb21:d_a_npc_ks

Conversation

@carter-ktb21
Copy link
Copy Markdown
Contributor

No description provided.

@decomp-dev
Copy link
Copy Markdown

decomp-dev bot commented May 28, 2025

Report for GZ2E01 (e8e3644 - bfdb4d8)

📈 Matched code: 62.09% (+0.11%, +13120 bytes)

✅ 69 new matches:
Unit Function Bytes Before After
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_to_hang(npc_ks_class*) +1980 0.20% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_ori(npc_ks_class*) +1408 0.28% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_demo_04(npc_ks_class*) +1269 0.31% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_demo_022(npc_ks_class*) +1153 0.35% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks nodeCallBack(J3DJoint*, int) +816 0.49% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_home(npc_ks_class*) +596 0.67% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks en_search_test(npc_ks_class*) +560 0.71% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks daNpc_Ks_Draw(npc_ks_class*) +485 0.82% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks shot_bo_sub(void*, void*) +413 0.96% 100.00%
d_a_obj_sw/d/actor/d_a_obj_sw daObj_Sw_Draw(obj_sw_class*) +313 1.27% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks cam_3d_morf(npc_ks_class*, float) +225 1.75% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks otherBgCheck(fopAc_ac_c*, fopAc_ac_c*) +221 1.79% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks get_move_saru(npc_ks_class*, int) +205 1.92% 100.00%
d_a_obj_sw/d/actor/d_a_obj_sw anm_init(obj_sc_s*, int, float, unsigned char, float) +173 2.27% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks all_hang_check(npc_ks_class*, int) +160 2.44% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks saru_count_check(npc_ks_class*) +136 2.86% 100.00%
d_a_obj_sw/d/actor/d_a_obj_sw s_ks_sub(void*, void*) +129 3.03% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks s_b_sub(void*, void*) +120 3.23% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks daNpc_Ks_HIO_c::daNpc_Ks_HIO_c() +113 3.45% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks dComIfGp_particle_set(unsigned short, const cXyz*, const csXyz*, const cXyz*) +113 3.45% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks s_e_sub(void*, void*) +109 3.57% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks s_en_sub(void*, void*) +109 3.57% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks s_resq_sub(void*, void*) +105 3.70% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks s_fsdown_sub(void*, void*) +105 3.70% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks all_move_check(int, int) +101 3.85% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks mDoAud_seStart(unsigned long, const Vec*, unsigned long, signed char) +96 4.00% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks s_01_sub(void*, void*) +85 4.55% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks setPlayerPosAndAngle(cXyz*, short) +81 4.76% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks s_fs_sub(void*, void*) +81 4.76% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks go_jump_check(int) +76 5.00% 100.00%

...and 39 more new matches

📈 24 improvements in unmatched functions:
Unit Function Bytes Before After
d_a_npc_ks/d/actor/d_a_npc_ks demo_camera(npc_ks_class*) +10065 0.04% 99.64%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_option(npc_ks_class*) +4840 0.08% 95.95%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_demo_02(npc_ks_class*) +3862 0.10% 99.15%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_e_jump(npc_ks_class*) +2878 0.14% 99.36%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_ori2(npc_ks_class*) +2823 0.14% 97.47%
d_a_npc_ks/d/actor/d_a_npc_ks action_check(npc_ks_class*) +2767 0.14% 97.44%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_hang(npc_ks_class*) +1990 0.20% 97.39%
d_a_obj_sw/d/actor/d_a_obj_sw sc_build(obj_sw_class*) +1603 0.25% 98.53%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_hang_s(npc_ks_class*) +1515 0.26% 97.38%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_pole_ori(npc_ks_class*) +889 0.44% 97.45%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_e_hang(npc_ks_class*) +820 0.47% 96.21%
d_a_npc_ks/d/actor/d_a_npc_ks search_enemy(npc_ks_class*, int, float) +623 0.63% 99.19%
d_a_npc_ks/d/actor/d_a_npc_ks search_bomb(npc_ks_class*, int) +526 0.75% 98.86%
d_a_npc_ks/d/actor/d_a_npc_ks hang_end_check(npc_ks_class*) +456 0.87% 99.96%
d_a_npc_ks/d/actor/d_a_npc_ks anm_init(npc_ks_class*, int, float, unsigned char, float) +386 1.02% 99.44%
d_a_npc_ks/d/actor/d_a_npc_ks water_check(npc_ks_class*, cXyz, float) +366 1.06% 98.30%
d_a_npc_ks/d/actor/d_a_npc_ks s_next_get_sub(void*, void*) +228 1.67% 96.67%
d_a_npc_ks/d/actor/d_a_npc_ks s_next_do_sub(void*, void*) +123 2.94% 93.24%
d_a_npc_ks/d/actor/d_a_npc_ks order_set(int) +118 2.94% 89.24%
d_a_npc_ks/d/actor/d_a_npc_ks s_sw_sub(void*, void*) +111 3.23% 93.55%
d_a_obj_sw/d/actor/d_a_obj_sw sc_move(obj_sw_class*) +106 0.48% 13.13%
d_a_obj_sw/d/actor/d_a_obj_sw s_ksdel_sub(void*, void*) +90 1.56% 36.84%
d_a_npc_ks/d/actor/d_a_npc_ks __sinit_d_a_npc_ks_cpp +84 4.55% 99.82%
d_a_npc_ks/d/actor/d_a_npc_ks dComIfGs_onEventBit(unsigned short) +40 8.33% 91.25%

/* 0x5C4 */ f32 field_0x5c4;
/* 0x5C8 */ s16 field_0x5c8;
/* 0x5CA */ u8 field_0x5ca[0x5ea - 0x5ca];
/* 0x5CA */ u8 field_0x5ca[0x5cc - 0x5ca];
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.

field_0x5ca can be removed

/* 0x604 */ s16 field_0x604;
/* 0x606 */ s16 field_0x606;
/* 0x608 */ s16 field_0x608;
/* 0x60A */ u8 field_0x60a[0x60c - 0x60a];
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.

field_0x60a can be removed

/* 0x60A */ u8 field_0x60a[0x60c - 0x60a];
/* 0x60C */ f32 field_0x60c;
/* 0x610 */ s16 field_0x610;
/* 0x612 */ u8 field_0x612[0x614 - 0x612];
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.

I think field_0x612 can be removed

/* 0x860 */ Z2Creature mSound;
/* 0x8F0 */ cXyz field_0x8f0;
/* 0x8FC */ csXyz field_0x8fc;
/* 0x902 */ u8 field_0x902[0x904 - 0x902];
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.

field_0x902 can be removed

/* 0x904 */ int field_0x904;
/* 0x908 */ f32 field_0x908;
/* 0x90C */ s8 field_0x90c;
/* 0x90D */ u8 field_0x90d[0x910 - 0x90d];
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.

field_0x90d can be removed


sVar1 = start_pya - sw_p->current.angle.y;
if (sVar1 < 0x4000 && sVar1 > -0x4000) {
a_this->home.angle.y = sVar1 + (u16)-0x8000;
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.

is (u16)-0x8000 not just +0x8000?

}
}

cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->shape_angle.y + (u16)-0x8000, 2, 0x1000);
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.

is (u16)-0x8000 not just +0x8000?

#pragma force_active on
static u8 data_80A5FFA0[4];
#pragma pop
// /* 80A5DEB8-80A5DEE8 015018 0030+00 1/1 0/0 0/0 .text dComIfGs_onEventBit__FUs */
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.

Comment can be deleted

i_this->mMode++;
i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
sw_p->field_0x8fc = 20.0f;
// sw_p->field_0xd10[i_this->field_0x630] = 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.

Just debug? if so put in #ifdef

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, it's commented out because I know that field_0xd10 is supposed to be an array, I just don't know the size. Likely going to work on obj_sw next so maybe that will shed light on it.

i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_CATCH, -1);
i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
sw_p->field_0x8fc = 20.0f;
// sw_p->field_0xd10[i_this->field_0x630] = 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.

#ifdef DEBUG or delete

@hatal175
Copy link
Copy Markdown
Contributor

So do you want to properly write the struct for paths or just merge as is?

@carter-ktb21
Copy link
Copy Markdown
Contributor Author

Go ahead and merge as is. I’m going to continue to work on the TU regardless!

@hatal175 hatal175 merged commit bc94559 into zeldaret:main May 30, 2025
1 check passed
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