Skip to content

MarioAutodemo.cpp mostly matching#76

Merged
Mrkol merged 10 commits intodoldecomp:mainfrom
TheAzack9:az-TMario-MarioAutodemo
Feb 6, 2026
Merged

MarioAutodemo.cpp mostly matching#76
Mrkol merged 10 commits intodoldecomp:mainfrom
TheAzack9:az-TMario-MarioAutodemo

Conversation

@TheAzack9
Copy link
Contributor

I copied the s16 implementation for set for TVec from TP since i couldn't make it match properly. I couldn't see the existing one being used anywhere, so i kept the old implementation as a comment until the PR.

If the existing one has been validated, then i will revert the copy and let the unmatching stuff be until we have more examples. Otherwise i will remove the old implementation for it.

@decomp-dev
Copy link

decomp-dev bot commented Feb 6, 2026

Report for GMSJ01 (684f416 - 44be2ab)

📈 Matched code: 26.17% (+0.04%, +1448 bytes)
📈 Matched data: 27.91% (+0.00%, +20 bytes)

✅ 7 new matches
Unit Item Bytes Before After
mario/Player/MarioAutodemo TMario::returnStart(const JGeometry::TVec3<float>*, float, bool, int) +408 0.00% 100.00%
mario/Player/MarioAutodemo TMario::footDowning() +328 0.00% 100.00%
mario/Player/MarioAutodemo TMario::rollingStart(const JGeometry::TVec3<float>*, float) +260 0.00% 100.00%
mario/Player/MarioAutodemo TMario::waitingStart(const JGeometry::TVec3<float>*, float) +256 0.00% 100.00%
mario/Player/MarioAutodemo TMario::toroccoStart() +196 0.00% 100.00%
mario/Player/MarioCap .data +16 0.00% 100.00%
mario/Player/MarioAutodemo .ctors +4 0.00% 100.00%
📈 13 improvements in unmatched items
Unit Item Bytes Before After
mario/Player/MarioAutodemo TMario::warpIn() +1003 0.00% 81.76%
mario/Player/MarioAutodemo TMario::demoMain() +803 0.00% 96.63%
mario/Player/MarioAutodemo __sinit_MarioAutodemo_cpp +712 0.00% 93.19%
mario/Player/MarioAutodemo TMario::warpOut() +656 0.00% 93.71%
mario/Player/MarioAutodemo TMario::isUnUsualStageStart() +431 0.00% 95.58%
mario/Player/MarioAutodemo TMario::electricDamage() +260 0.00% 66.36%
mario/Player/MarioAutodemo .bss +178 0.00% 96.77%
mario/Player/MarioAutodemo .sdata2 +52 46.15% 89.66%
mario/Player/MarioCap TMarioCap::TMarioCap(TMario*) +8 0.00% 0.68%
mario/Player/MarioCap TMarioCap::perform(unsigned long, JDrama::TGraphics*) +4 0.00% 0.24%
mario/Player/MarioCap TMarioCap::createMirrorCap() +4 0.00% 3.12%
mario/Player/MarioCap TMarioCap::mtxEffectHide() +3 0.00% 3.45%
mario/Player/MarioCap TMarioCap::mtxEffectShow() +3 0.00% 3.45%

}
TModelGate* gate = (TModelGate*)mHolder;
u16 gateUnk72 = gate->unk72;
Mtx* nodeMatrices = gate->unk78->getModel()->mNodeMatrices;
Copy link
Collaborator

Choose a reason for hiding this comment

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

ghidra is lying, you can just do MtxPtr mtx = gate->unk78->getModel()->getAnmMtx(gateUnk72); and use it below and it'll still match

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ghidra tends to do that 😅 I should really get better at checking for existing better functions :) Thanks for the heads up!

@TheAzack9 TheAzack9 requested a review from Mrkol February 6, 2026 07:28
@Mrkol Mrkol merged commit bba67ab into doldecomp:main Feb 6, 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