Skip to content

d_a_npc_moir almost equivalent#2569

Merged
hatal175 merged 9 commits intozeldaret:mainfrom
carter-ktb21:d_a_npc_moir
Aug 9, 2025
Merged

d_a_npc_moir almost equivalent#2569
hatal175 merged 9 commits intozeldaret:mainfrom
carter-ktb21:d_a_npc_moir

Conversation

@carter-ktb21
Copy link
Copy Markdown
Contributor

some misplaced .data seems to be causing all but one of the remaining regallocs but I could not figure out a fix.

@decomp-dev
Copy link
Copy Markdown

decomp-dev bot commented Aug 4, 2025

Report for GZ2E01 (0759e31 - 05f25bf)

📈 Matched code: 76.65% (+0.22%, +25336 bytes)

✅ 68 new matches
Unit Function Bytes Before After
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::playMotion() +2132 0.19% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::EvCut_Appear2(int) +2085 0.19% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::talk(void*) +1784 0.22% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::fight(void*) +1436 0.28% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::demo(void*) +1337 0.30% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::EvCut_Appear(int) +1144 0.35% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::Create() +1013 0.39% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::leave(void*) +985 0.40% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::setAttnPos() +957 0.42% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::main() +861 0.46% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::CreateHeap() +785 0.51% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::checkHeadGear() +733 0.54% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::lookat() +724 0.55% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::setExpressionAnm(int, bool) +601 0.66% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::wait_type2(void*) +596 0.67% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcF_c::~daNpcF_c() +585 0.68% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::setWaitAction() +500 0.79% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcF_c::daNpcF_c() +492 0.81% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::~daNpcMoiR_c() +463 9.76% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::ctrlJoint(J3DJoint*, J3DModel*) +461 0.86% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::reset() +373 1.06% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::setParam() +373 1.06% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::daNpcMoiR_c() +341 12.21% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::setMotionAnm(int, float) +333 1.19% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::setExpressionBtp(int) +221 1.79% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::EvCut_Introduction(int) +216 1.82% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcF_Lookat_c::~daNpcF_Lookat_c() +205 1.92% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir __sinit_d_a_npc_moir_cpp +185 2.13% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::drawOtherMdls() +133 2.94% 100.00%
d_a_npc_moir/d/actor/d_a_npc_moir cLib_getRndValue<int>(int, int) +124 0.00% 100.00%

...and 38 more new matches

📈 4 improvements in unmatched functions
Unit Function Bytes Before After
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::wait_type1(void*) +2144 0.19% 99.98%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::wait_type0(void*) +1115 0.36% 99.98%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::multiTalk(void*) +1099 0.36% 99.92%
d_a_npc_moir/d/actor/d_a_npc_moir daNpcMoiR_c::ctrlBtk() +176 1.89% 84.62%

/* 80A7D0CC-80A7D0EC 00104C 0020+00 1/1 0/0 0/0 .text createHeapCallBack__11daNpcMoiR_cFP10fopAc_ac_c */
int daNpcMoiR_c::createHeapCallBack(fopAc_ac_c* a_this) {
daNpcMoiR_c* i_this = (daNpcMoiR_c*)a_this;
i_this->CreateHeap();
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.

missing return

}

if (mActorMngr[0].getActorP() != NULL) {
setLookMode(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.

Use LookMode enum

if (mActorMngr[0].getActorP() != NULL) {
setLookMode(2);
} else {
setLookMode(0);
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 LookMode enum

}

if (mActorMngr[0].getActorP() != NULL) {
setLookMode(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.

Use LookMode enum

if (mActorMngr[0].getActorP() != NULL) {
setLookMode(2);
} else {
setLookMode(0);
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 LookMode enum

// NONMATCHING
}
case 1:
setLookMode(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.

Use LookMode enum

switch (*cutName) {
case '0001':
case '0005':
setLookMode(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.

Use LookMode enum

break;

case '0002':
setLookMode(0);
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 LookMode enum

/* 0xDDC */ ActionFn mAction;
/* 0xDE8 */ request_of_phase_process_class mPhase[2];
/* 0xDF8 */ fpc_ProcID field_0xdf8;
/* 0xDFC */ fpc_ProcID field_0xdfc;
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 this is just int

mActorMngr[i].initialize();
}

field_0xdfc = cPhs_INIT_e;
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 0

@hatal175
Copy link
Copy Markdown
Contributor

hatal175 commented Aug 7, 2025

I think you missed the npc enum

@hatal175 hatal175 merged commit cc9325c into zeldaret:main Aug 9, 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