Skip to content

d_a_npc_cd work#2429

Merged
hatal175 merged 4 commits intozeldaret:mainfrom
carter-ktb21:d_a_npc_cd
May 9, 2025
Merged

d_a_npc_cd work#2429
hatal175 merged 4 commits intozeldaret:mainfrom
carter-ktb21:d_a_npc_cd

Conversation

@carter-ktb21
Copy link
Copy Markdown
Contributor

No description provided.

@decomp-dev
Copy link
Copy Markdown

decomp-dev bot commented May 8, 2025

Report for GZ2E01 (efcf241 - 8cea19c)

📈 Matched code: 59.56% (+0.02%, +2140 bytes)

📈 framework/d/actor/d_a_npc_cd | daNpcCd_c::NpcCreate(int) +301 bytes -> 76.77%
framework/d/actor/d_a_npc_cd | daNpcCd_c::isM_() +28 bytes -> 100.00%
framework/d/actor/d_a_npc_cd | daNpcCd_c::getAnmP(int, int) +380 bytes -> 100.00%
📈 framework/d/actor/d_a_npc_cd | daNpcCd_c::setAttention(int) +1656 bytes -> 86.28%
framework/d/actor/d_a_npc_cd | daNpcCd_c::setAnm(J3DAnmTransformKey*, float, float, int, int, int) +105 bytes -> 100.00%
framework/d/actor/d_a_npc_cd | daNpcCd_c::drawObj(int, J3DModel*, float) +229 bytes -> 100.00%
framework/d/actor/d_a_npc_cd | daNpcCd_c::drawNpc() +269 bytes -> 100.00%
📈 framework/d/actor/d_a_npc_cd | daNpcCd_c::jntNodeCB(J3DJoint*, J3DModel*) +656 bytes -> 88.71%
framework/d/actor/d_a_npc_cd | daNpcCd_c::setHitodamaParticle() +437 bytes -> 100.00%
framework/d/actor/d_a_npc_cd | daNpcCd_c::getNpcMdlDataP(int) +96 bytes -> 100.00%
framework/d/actor/d_a_npc_cd | daNpcCd_c::getObjMdlDataP(int) +116 bytes -> 100.00%
📈 framework/d/actor/d_a_npc_cd | daNpcCd_HIO_c::daNpcCd_HIO_c() +131 bytes -> 32.69%
framework/d/actor/d_a_npc_cd | daNpcCd_HIO_Child_c::~daNpcCd_HIO_Child_c() +69 bytes -> 100.00%
framework/d/actor/d_a_npc_cd | daNpcCd_HIO_Jnt_c::~daNpcCd_HIO_Jnt_c() +13 bytes -> 100.00%
framework/d/actor/d_a_npc_cd | daNpcCd_HIO_Child_c::daNpcCd_HIO_Child_c() +85 bytes -> 100.00%
framework/d/actor/d_a_npc_cd | daNpcCd_HIO_Jnt_c::daNpcCd_HIO_Jnt_c() +12 bytes -> 100.00%
framework/d/actor/d_a_npc_cd | fOpAcm_HIO_entry_c::~fOpAcm_HIO_entry_c() +32 bytes -> 100.00%
framework/d/actor/d_a_npc_cd | mDoHIO_entry_c::~mDoHIO_entry_c() +68 bytes -> 100.00%
📈 framework/d/actor/d_a_npc_cd | daNpcCd_HIO_c::~daNpcCd_HIO_c() +120 bytes -> 93.02%
📈 framework/d/actor/d_a_npc_cd | __sinit_d_a_npc_cd_cpp +245 bytes -> 36.84%


J3DModelData* a_mdlData_p = getNpcMdlDataP(param_1);
#ifdef DEBUG
if (a_mdlData_p == NULL) {
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.

JUT_ASSERT instead of this ifdef block


mCreature.init(&current.pos, &eyePos, 3, 1);
mCreature.setMdlType(param_1, true, mIsDarkWorld);
// mpMorf->offTranslate();
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 add #if VERSION == VERSION_SHIELD_DEBUG
Instead of the comment

JUT_ASSERT(574, m_type < MdlNUM_e);

u32 rv = field_0x9c4 ^ 16;
return (((int)rv >> 1) - (rv & 16)) >> 31;
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_0x9c4 should be int, the return type is BOOL and then this function just returns field_0x9c4 < 16
See https://decomp.me/scratch/YGTin

3, 0, 0,
};

if ((mIsDarkWorld && daPy_py_c::checkNowWolfEyeUp() == 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.

!daPy_py_c::checkNowWolfEyeUp()

// NONMATCHING
}
int daNpcCd_c::drawNpc() {
if (mIsDarkWorld && daPy_py_c::checkNowWolfEyeUp() == 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.

!daPy_py_c::checkNowWolfEyeUp()

@hatal175 hatal175 merged commit 773c0ad into zeldaret:main May 9, 2025
1 check passed
@ItsNiklas ItsNiklas mentioned this pull request May 10, 2025
meintte pushed a commit to meintte/tp that referenced this pull request May 28, 2025
* Work on create function

* General work

* Pull request cleanup

* Remove unnecessary semicolon

---------

Co-authored-by: hatal175 <hatal175@users.noreply.github.com>
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