Skip to content

Matching NpcColor.cpp#96

Merged
Mrkol merged 2 commits intodoldecomp:mainfrom
TheAzack9:az-NpcColor
Mar 26, 2026
Merged

Matching NpcColor.cpp#96
Mrkol merged 2 commits intodoldecomp:mainfrom
TheAzack9:az-NpcColor

Conversation

@TheAzack9
Copy link
Contributor

No description provided.

@decomp-dev
Copy link

decomp-dev bot commented Mar 26, 2026

Report for GMSJ01 (466750b - 70f873b)

📈 1 improvement in an unmatched item
Unit Item Bytes Before After
mario/NPC/NpcColor SMS_InitChangeNpcColor(const MActor*, const TColorChangeInfo*, short, const _GXColor*) +559 0.00% 99.96%

MActorAnmBase* getUnk28(int i) { return unk28[i]; }
MActorAnmBck* getAnmBck() { return unkC; }
J3DModel* getModel() { return unk4; }
J3DModel* getModel() const { return unk4; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better to add second overload that is const and returns a const ptr

const GXColor* param4)
{
J3DModel* model = param1->getModel();
s32 matIdx = model->mModelData->getMaterialName()->getIndex(param2->unk4);
Copy link
Collaborator

Choose a reason for hiding this comment

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

model->getModelData()

@TheAzack9
Copy link
Contributor Author

TheAzack9 commented Mar 26, 2026

When using getModelData, it no longer matches, so i removed the matching in that case :)

I experimented a bit with it earlier and it stood between not using the getModelData or adding a fabricated getMaterialId function that made it match. I tried too hard to force the match, better to leave it for now 😅

@TheAzack9 TheAzack9 requested a review from Mrkol March 26, 2026 20:15
@Mrkol Mrkol merged commit 99c2d69 into doldecomp:main Mar 26, 2026
2 checks 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