Skip to content

Continued monkey work (monkey business if you will) - Monkey-related TUs#2469

Merged
hatal175 merged 34 commits intozeldaret:mainfrom
carter-ktb21:d_a_npc_ks
Jun 7, 2025
Merged

Continued monkey work (monkey business if you will) - Monkey-related TUs#2469
hatal175 merged 34 commits intozeldaret:mainfrom
carter-ktb21:d_a_npc_ks

Conversation

@carter-ktb21
Copy link
Copy Markdown
Contributor

@carter-ktb21 carter-ktb21 commented May 31, 2025

  • d_a_npc_ks
  • d_a_obj_so
  • d_a_obj_sw
  • d_a_npc_saru
  • d_a_obj_kago

@carter-ktb21 carter-ktb21 changed the title Continued monkey work Continued monkey work (monkey business if you will) Jun 1, 2025
@decomp-dev
Copy link
Copy Markdown

decomp-dev bot commented Jun 1, 2025

Report for GZ2E01 (372d782 - 907d589)

📈 Matched code: 64.42% (+0.34%, +38568 bytes)

✅ 153 new matches:
Unit Function Bytes Before After
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_guide_00(npc_ks_class*) +1884 0.21% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_guide_22(npc_ks_class*) +1796 0.22% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_guide_00_3(npc_ks_class*) +1348 0.30% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_demo_12(npc_ks_class*) +1337 0.30% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::setSe() +1308 0.30% 100.00%
d_a_obj_so/d/actor/d_a_obj_so daObj_So_Create(fopAc_ac_c*) +1105 0.36% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpcT_c::daNpcT_c(const daNpcT_faceMotionAnmData_c*, const daNpcT_motionAnmData_c*, const daNpcT_MotionSeqMngr_c::sequenceStepData_c*, int, const daNpcT_MotionSeqMngr_c::sequenceStepData_c*, int, const daNpcT_evtData_c*, char**) +1025 0.39% 100.00%
d_a_obj_so/d/actor/d_a_obj_so demo_camera(obj_so_class*) +973 0.41% 100.00%
d_a_obj_kago/d/actor/d_a_obj_kago daObj_Kago_c::create() +925 0.43% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpcT_c::~daNpcT_c() +900 0.44% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks useHeapInit(fopAc_ac_c*) +789 0.51% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::cutYmLook(int) +776 0.51% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_guide_00_2(npc_ks_class*) +756 0.53% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::setAttnPos() +745 0.53% 100.00%
d_a_obj_so/d/actor/d_a_obj_so so_drop(obj_so_class*) +709 0.56% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::create() +688 0.58% 100.00%
d_a_obj_so/d/actor/d_a_obj_so useHeapInit(fopAc_ac_c*) +608 0.65% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::cutHelpMe(int) +556 0.71% 100.00%
d_a_obj_so/d/actor/d_a_obj_so so_hasira(obj_so_class*) +541 0.74% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpcT_JntAnm_c::setEyeAngleX(cXyz, float, short) +516 0.77% 100.00%
d_a_obj_so/d/actor/d_a_obj_so action(obj_so_class*) +512 0.78% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::cutFindMonkey(int) +505 0.79% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::action() +421 0.94% 100.00%
d_a_obj_kago/d/actor/d_a_obj_kago daObj_Kago_c::getWallAngle(short, short*) +396 1.00% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::setCollision() +381 1.04% 100.00%
d_a_obj_kago/d/actor/d_a_obj_kago daObj_Kago_c::~daObj_Kago_c() +336 20.00% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::setParam() +305 1.30% 100.00%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_awaydoor(npc_ks_class*) +301 1.32% 100.00%
d_a_obj_kago/d/actor/d_a_obj_kago daObj_Kago_c::setGoalPosAndAngle() +285 1.39% 100.00%
d_a_npc_saru/d/actor/d_a_npc_saru daNpcT_JntAnm_c::setEyeAngleY(cXyz, short, int, float, short) +280 1.41% 100.00%

...and 123 more new matches

📈 31 improvements in unmatched functions:
Unit Function Bytes Before After
d_a_obj_so/d/actor/d_a_obj_so part_move(obj_so_class*) +5340 0.07% 96.94%
d_a_obj_kago/d/actor/d_a_obj_kago daObj_Kago_c::Execute() +3506 0.11% 98.46%
d_a_npc_ks/d/actor/d_a_npc_ks anm_se_set(npc_ks_class*) +3395 0.12% 99.99%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_mori(npc_ks_class*) +3015 0.13% 99.85%
d_a_npc_ks/d/actor/d_a_npc_ks start_check(npc_ks_class*) +2815 0.14% 99.70%
d_a_npc_ks/d/actor/d_a_npc_ks daNpc_Ks_Execute(npc_ks_class*) +2768 0.14% 99.26%
d_a_npc_ks/d/actor/d_a_npc_ks action(npc_ks_class*) +2515 0.12% 73.29%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_fsdemo(npc_ks_class*) +2510 0.16% 98.53%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_guide_01(npc_ks_class*) +2355 0.17% 99.99%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_guide_09(npc_ks_class*) +2159 0.18% 99.99%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_guide_02(npc_ks_class*) +1836 0.22% 99.95%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::wait(void*) +1831 0.22% 99.48%
d_a_npc_ks/d/actor/d_a_npc_ks daNpc_Ks_Create(fopAc_ac_c*) +1315 0.30% 99.98%
d_a_obj_so/d/actor/d_a_obj_so part_set(obj_so_class*, signed char) +1252 0.31% 96.85%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_guide_0409(npc_ks_class*) +924 0.43% 99.97%
d_a_npc_ks/d/actor/d_a_npc_ks kantera_sub(npc_ks_class*) +690 0.54% 93.41%
d_a_obj_so/d/actor/d_a_obj_so so_hang(obj_so_class*) +579 0.67% 97.85%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::CreateHeap() +546 0.72% 99.82%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::talk(void*) +467 0.84% 99.16%
d_a_npc_ks/d/actor/d_a_npc_ks path_search(npc_ks_class*) +398 0.97% 97.37%
d_a_npc_saru/d/actor/d_a_npc_saru daNpc_Saru_c::reset() +398 0.90% 90.49%
d_a_obj_kago/d/actor/d_a_obj_kago daObj_Kago_c::Draw() +284 1.39% 99.72%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_ori2(npc_ks_class*) +73 97.47% 99.99%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_option(npc_ks_class*) +69 95.95% 97.32%
d_a_obj_kago/d/actor/d_a_obj_kago __sinit_d_a_obj_kago_cpp +60 3.45% 55.00%
d_a_npc_ks/d/actor/d_a_npc_ks action_check(npc_ks_class*) +42 97.44% 98.93%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_hang_s(npc_ks_class*) +32 97.38% 99.44%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_e_hang(npc_ks_class*) +32 96.21% 99.98%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_pole_ori(npc_ks_class*) +8 97.45% 98.34%
d_a_npc_ks/d/actor/d_a_npc_ks npc_ks_hang(npc_ks_class*) +1 97.39% 97.42%

...and 1 more improvements in unmatched functions

@carter-ktb21 carter-ktb21 changed the title Continued monkey work (monkey business if you will) Continued monkey work (monkey business if you will) - Monkey-related TUs Jun 5, 2025
@carter-ktb21 carter-ktb21 marked this pull request as ready for review June 6, 2025 18:37
Comment thread include/d/actor/d_a_npc_ks.h Outdated
@@ -18,13 +19,14 @@ class npc_ks_class {
/* 0x000 */ fopAc_ac_c actor;
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.

debug says this should be fopEn_enemy_c

Comment thread include/d/actor/d_a_npc_ks.h Outdated
/* 0xC18 */ u8 field_0xc18[0xc20 - 0xc18];
/* 0xC18 */ dPath* field_0xc18;
/* 0xC1C */ u8 field_0xc1c;
/* 0xC1D */ u8 field_0xc1d[0xc20 - 0xc1d];
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.

You can probably drop field_0xc1d

Comment thread include/d/actor/d_a_npc_ks.h Outdated
/* 0xAED */ u8 field_0xaed;
/* 0xAEE */ s16 field_0xaee;
/* 0xAF0 */ s16 field_0xaf0;
/* 0xAF2 */ u8 field_0xaf2[0xaf4 - 0xaf2];
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_0xaf2 can be dropped

Comment thread include/d/actor/d_a_npc_saru.h Outdated
/* 0xE44 */ J3DModel* field_0xe44[2];
/* 0xE4C */ dCcD_Cyl field_0xe4c;
/* 0xF88 */ u8 mType;
/* 0xF89 */ u8 field_0xf89[0xf8c - 0xf89];
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_0xf89 can be dropped

Comment thread include/d/actor/d_a_npc_saru.h Outdated
/* 0xFD4 */ int field_0xfd4;
/* 0xFD8 */ u8 field_0xfd8;
/* 0xFD9 */ u8 field_0xfd9;
/* 0xFDA */ u8 field_0xfda[0xfdc - 0xfda];
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_0xfda can be dropped

Comment thread src/d/actor/d_a_npc_saru.cpp Outdated
daNpc_Saru_Param_c::Data const daNpc_Saru_Param_c::m = {
140.0f,
-3.0f,
0x3F800000,
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.

Adjust all values to struct definition

Comment thread src/d/actor/d_a_npc_saru.cpp Outdated

case 1:
JUT_ASSERT(1859, 0 != mPath.getPathInfo());
iVar1 = cLib_calcTimer(&mEventTimer);
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 don't think iVar1 assignment is necessary here

Comment thread src/d/actor/d_a_obj_kago.cpp Outdated
sp5c.set(5.0f, 0.0f, 200.0f);

int iVar1 = 0;
while (iVar1 < 1) {
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.

This looks like a for. There's a distinct chance that if you move the code in the >= 2 condition outside, this will match.

Comment thread src/d/actor/d_a_obj_so.cpp Outdated
if (i_this->field_0x1bcc != 0) {
data_80CE3C90 = 0;
#ifdef DEBUG
mDoHIO_deleteChild(data_80CE3C90);
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.

Use mDoHIO_DELETE_CHILD

Comment thread src/d/actor/d_a_obj_so.cpp Outdated
i_this->field_0x1bcc = 1;
data_80CE3C90 = 1;
#ifdef DEBUG
mDoHIO_createChild("猿オリOBJ", &l_HIO); // Monkey jail OBJ
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.

Use mDoHIO_CREATE_CHILD

@hatal175 hatal175 merged commit 3318b5e into zeldaret:main Jun 7, 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