Skip to content

better Kukku - #405

Merged
Mrkol merged 2 commits into
doldecomp:mainfrom
MagiHotline:kukku
Nov 15, 2026
Merged

Mrkol merged 2 commits into
doldecomp:mainfrom
MagiHotline:kukku

Conversation

@MagiHotline

Copy link
Copy Markdown
Contributor

Slight improvements, still figuring out stuff

@decomp-dev

decomp-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Report for GMSJ01 (fe440d5 - f7c2545)

📈 Matched code: 52.84% (+0.02%, +748 bytes)

✅ 2 new matches
Unit Item Bytes Before After
mario/Enemy/Kukku TKukku::behaveToWater(THitActor*) +21 95.18% 100.00%
mario/Enemy/Kukku TNerveKukkuPostFall::execute(TSpineBase<TLiveActor>*) const +1 99.94% 100.00%
📈 5 improvements in unmatched items
Unit Item Bytes Before After
mario/Enemy/Kukku TNerveKukkuGraphWander::execute(TSpineBase<TLiveActor>*) const +45 94.34% 98.95%
mario/Enemy/Kukku TNerveKukkuFall::execute(TSpineBase<TLiveActor>*) const +20 96.69% 99.77%
mario/Enemy/Kukku TKukku::dropCoins() +9 98.74% 99.57%
mario/Enemy/Kukku TKukku::updateRotation() +5 98.95% 99.77%
mario/Enemy/Kukku TKukku::init(TLiveManager*) +3 99.43% 99.89%

Report for GMSP01 (fe440d5 - f7c2545)

📈 Matched code: 52.36% (+0.02%, +748 bytes)

✅ 2 new matches
Unit Item Bytes Before After
mario/Enemy/Kukku TKukku::behaveToWater(THitActor*) +21 95.18% 100.00%
mario/Enemy/Kukku TNerveKukkuPostFall::execute(TSpineBase<TLiveActor>*) const +1 99.94% 100.00%
📈 5 improvements in unmatched items
Unit Item Bytes Before After
mario/Enemy/Kukku TNerveKukkuGraphWander::execute(TSpineBase<TLiveActor>*) const +45 94.34% 98.95%
mario/Enemy/Kukku TNerveKukkuFall::execute(TSpineBase<TLiveActor>*) const +20 96.69% 99.77%
mario/Enemy/Kukku TKukku::dropCoins() +9 98.74% 99.57%
mario/Enemy/Kukku TKukku::updateRotation() +5 98.95% 99.77%
mario/Enemy/Kukku TKukku::init(TLiveManager*) +3 99.43% 99.89%

Report for GMSP01_NX (fe440d5 - f7c2545)

📈 Matched code: 52.10% (+0.02%, +748 bytes)

✅ 2 new matches
Unit Item Bytes Before After
mario/Enemy/Kukku TKukku::behaveToWater(THitActor*) +21 95.18% 100.00%
mario/Enemy/Kukku TNerveKukkuPostFall::execute(TSpineBase<TLiveActor>*) const +1 99.94% 100.00%
📈 5 improvements in unmatched items
Unit Item Bytes Before After
mario/Enemy/Kukku TNerveKukkuGraphWander::execute(TSpineBase<TLiveActor>*) const +45 94.34% 98.95%
mario/Enemy/Kukku TNerveKukkuFall::execute(TSpineBase<TLiveActor>*) const +20 96.69% 99.77%
mario/Enemy/Kukku TKukku::dropCoins() +9 98.74% 99.57%
mario/Enemy/Kukku TKukku::updateRotation() +5 98.95% 99.77%
mario/Enemy/Kukku TKukku::init(TLiveManager*) +3 99.43% 99.89%

Report for GMSE01 (fe440d5 - f7c2545)

📈 Matched code: 51.77% (+0.02%, +748 bytes)

✅ 2 new matches
Unit Item Bytes Before After
mario/Enemy/Kukku TKukku::behaveToWater(THitActor*) +21 95.18% 100.00%
mario/Enemy/Kukku TNerveKukkuPostFall::execute(TSpineBase<TLiveActor>*) const +1 99.94% 100.00%
📈 5 improvements in unmatched items
Unit Item Bytes Before After
mario/Enemy/Kukku TNerveKukkuGraphWander::execute(TSpineBase<TLiveActor>*) const +45 94.34% 98.95%
mario/Enemy/Kukku TNerveKukkuFall::execute(TSpineBase<TLiveActor>*) const +20 96.69% 99.77%
mario/Enemy/Kukku TKukku::dropCoins() +9 98.74% 99.57%
mario/Enemy/Kukku TKukku::updateRotation() +5 98.95% 99.77%
mario/Enemy/Kukku TKukku::init(TLiveManager*) +3 99.43% 99.89%

Report for GMSJ01_01 (fe440d5 - f7c2545)

📈 Matched code: 52.03% (+0.02%, +748 bytes)

✅ 2 new matches
Unit Item Bytes Before After
mario/Enemy/Kukku TKukku::behaveToWater(THitActor*) +21 95.18% 100.00%
mario/Enemy/Kukku TNerveKukkuPostFall::execute(TSpineBase<TLiveActor>*) const +1 99.94% 100.00%
📈 5 improvements in unmatched items
Unit Item Bytes Before After
mario/Enemy/Kukku TNerveKukkuGraphWander::execute(TSpineBase<TLiveActor>*) const +45 94.34% 98.95%
mario/Enemy/Kukku TNerveKukkuFall::execute(TSpineBase<TLiveActor>*) const +20 96.69% 99.77%
mario/Enemy/Kukku TKukku::dropCoins() +9 98.74% 99.57%
mario/Enemy/Kukku TKukku::updateRotation() +5 98.95% 99.77%
mario/Enemy/Kukku TKukku::init(TLiveManager*) +3 99.43% 99.89%

Comment thread src/Enemy/Kukku.cpp Outdated
mSpine->reset();
mSpine->setNext(&TNerveKukkuFall::theNerve());
if (!isFalling()) {
if (!isRecoveringGraph()) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hm? Why 2 ifs, codegen should be identical to && (as long as you do the !)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

u right, it has same codegen

Comment thread src/Enemy/Kukku.cpp
void TKukku::updateRotation()
{
JGeometry::TVec3<f32> toTarget = mCurrentTarget.getPoint();
JGeometry::TVec3<f32> toTarget = getCurrentTarget().getPoint();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

fakematch for stack padding or does it actually change codegen?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it actually changes codegen adding this getter

Comment thread src/Enemy/Kukku.cpp
// kukku->doFlyToCurPathNode();
// Biggest what if? fly calls update and then calls recover, so that it can
// call callmomentum and being inlined regularly. understanding if
// updateRotation needs to be called there or somewhere else.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't get what you're trying to say here 😅

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

TNerveKukkuGraphWander seems to calling the unused function doFlyToCurPathNode() (which seems to match in TNerveKukkuRecoverGraph) but it emits out of line updateRotation(). It for sure is a problem on how I decided the body of these unused functions :/ but in one it seems to have worked so that's why I understand this bit

@Mrkol
Mrkol merged commit 2159385 into doldecomp:main Nov 15, 2026
6 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