Skip to content

Decompile Boss Pakkun - #157

Open
KakarottoCake wants to merge 25 commits into
doldecomp:mainfrom
KakarottoCake:bosspakkun
Open

Decompile Boss Pakkun#157
KakarottoCake wants to merge 25 commits into
doldecomp:mainfrom
KakarottoCake:bosspakkun

Conversation

@KakarottoCake

Copy link
Copy Markdown
Contributor

src/Enemy/bosspakkun.cpp was empty on main. This fills it in, along with
include/Enemy/BossPakkun.hpp.

82 of 126 functions match. 293 of 296 data objects match; .bss and .sdata2
are exact and .rodata is 7 bytes short. The unit stays NonMatching.

The TU needs M3DUtil/InfectiousStrings.hpp. Without it we were 224 bytes short
in .rodata ahead of the string table, which shifted every pool reference in
TBossPakkunParams::TBossPakkunParams and TBossPakkunManager::load. Both match
exactly once it is included.

Known gaps:

  • 13 functions differ only in stack frame size. Left alone.
  • TNerveBPDie::execute (80.2%) is the last structural one. Retail repeats
    modBgm(0, 1) in both arms of a branch and the source factors it into a single
    call. I did not duplicate an identical call to gain the score.
  • Three UNUSED bodies are short of their map sizes: ignoreWaterCheck (0x4 vs
    0xf0), initJParticle (0x274 vs 0x280), vomitFinished (0x40 vs 0x3c).
  • changeBck spells the previous-index transitions as separate if branches
    instead of a switch with fall-through cases. Retail emits its own parameter
    call per branch, so the fall-through form does not reproduce it, but the if
    form does repeat one line three times. Happy to change it back if you would
    rather have the switch.

@decomp-dev

decomp-dev Bot commented Sep 3, 2026

Copy link
Copy Markdown

Report for GMSJ01 (c0071c2 - 19f7581)

📈 Matched code: 38.91% (+0.29%, +10272 bytes)
📈 Matched data: 56.85% (+0.87%, +5540 bytes)

✅ 89 new matches
Unit Item Bytes Before After
mario/Enemy/bosspakkun .rodata +2856 0.00% 100.00%
mario/Enemy/bosspakkun .data +1656 0.00% 100.00%
mario/Enemy/bosspakkun TBossPakkunParams::TBossPakkunParams(const char*) +1112 0.00% 100.00%
mario/Enemy/bosspakkun __sinit_bosspakkun_cpp +764 0.00% 100.00%
mario/Enemy/bosspakkun TBossPakkunManager::load(JSUMemoryInputStream&) +708 0.00% 100.00%
mario/Enemy/bosspakkun .bss +576 0.00% 100.00%
mario/Enemy/bosspakkun TBPTornado::TBPTornado(TBossPakkun*, const char*) +244 0.00% 100.00%
mario/Enemy/bosspakkun .sdata2 +232 0.00% 100.00%
mario/Enemy/bosspakkun .sbss +216 0.00% 100.00%
mario/Enemy/bosspakkun TBPVomit::perform(unsigned long, JDrama::TGraphics*) +208 0.00% 100.00%
mario/Enemy/bosspakkun TBossPakkun::TBossPakkun(const char*) +208 0.00% 100.00%
mario/Enemy/bosspakkun TBossPakkunMtxCalc::~TBossPakkunMtxCalc() +172 0.00% 100.00%
mario/Enemy/bosspakkun TBossPakkun::checkMarioRiding() +168 0.00% 100.00%
mario/Enemy/bosspakkun TNerveBPFlyCannon::execute(TSpineBase<TLiveActor>*) const +148 0.00% 100.00%
mario/Enemy/bosspakkun TBPPolDrop::~TBPPolDrop() +132 0.00% 100.00%
mario/Enemy/bosspakkun TBPTornado::~TBPTornado() +132 0.00% 100.00%
mario/Enemy/bosspakkun TBPHeadHit::~TBPHeadHit() +132 0.00% 100.00%
mario/Enemy/bosspakkun TBPNavel::~TBPNavel() +132 0.00% 100.00%
mario/Enemy/bosspakkun TBossPakkun::kill() +128 0.00% 100.00%
mario/Enemy/bosspakkun TBPVomit::~TBPVomit() +116 0.00% 100.00%
mario/Enemy/bosspakkun TBossPakkun::~TBossPakkun() +108 0.00% 100.00%
mario/Enemy/bosspakkun TBPNavel::perform(unsigned long, JDrama::TGraphics*) +104 0.00% 100.00%
mario/Enemy/bosspakkun TBossPakkunManager::~TBossPakkunManager() +100 0.00% 100.00%
mario/Enemy/bosspakkun TNerveBPWait::theNerve() +100 0.00% 100.00%
mario/Enemy/bosspakkun TNerveBPCannon::theNerve() +100 0.00% 100.00%
mario/Enemy/bosspakkun TNerveBPVomit::theNerve() +100 0.00% 100.00%
mario/Enemy/bosspakkun TNerveBPTornado::theNerve() +100 0.00% 100.00%
mario/Enemy/bosspakkun TNerveBPPivot::theNerve() +100 0.00% 100.00%
mario/Enemy/bosspakkun TNerveBPSwallow::theNerve() +100 0.00% 100.00%
mario/Enemy/bosspakkun TNerveBPTumbleIn::theNerve() +100 0.00% 100.00%

...and 59 more new matches

📈 44 improvements in unmatched items
Unit Item Bytes Before After
mario/Enemy/bosspakkun TNerveBPWait::execute(TSpineBase<TLiveActor>*) const +2994 0.00% 96.97%
mario/Enemy/bosspakkun TBossPakkun::perform(unsigned long, JDrama::TGraphics*) +1991 0.00% 99.58%
mario/Enemy/bosspakkun TBPTornado::perform(unsigned long, JDrama::TGraphics*) +1832 0.00% 99.83%
mario/Enemy/bosspakkun TBossPakkun::init(TLiveManager*) +1703 0.00% 85.85%
mario/Enemy/bosspakkun TBossPakkun::gotHipDropDamage() +1435 0.00% 99.12%
mario/Enemy/bosspakkun TBPHeadHit::receiveMessage(THitActor*, unsigned long) +1378 0.00% 92.90%
mario/Enemy/bosspakkun TNerveBPFall::execute(TSpineBase<TLiveActor>*) const +1307 0.00% 99.95%
mario/Enemy/bosspakkun TBossPakkunMtxCalc::calcHeadDir(unsigned short) +918 0.00% 95.25%
mario/Enemy/bosspakkun TNerveBPHover::execute(TSpineBase<TLiveActor>*) const +903 0.00% 99.93%
mario/Enemy/bosspakkun TBossPakkun::changeBck(int) +867 0.00% 97.70%
mario/Enemy/bosspakkun TNerveBPVomit::execute(TSpineBase<TLiveActor>*) const +838 0.00% 97.08%
mario/Enemy/bosspakkun TBPPolDrop::move() +778 0.00% 99.85%
mario/Enemy/bosspakkun TNerveBPFly::execute(TSpineBase<TLiveActor>*) const +713 0.00% 99.72%
mario/Enemy/bosspakkun TNerveBPTumbleOut::execute(TSpineBase<TLiveActor>*) const +635 0.00% 99.89%
mario/Enemy/bosspakkun TBPPolDrop::perform(unsigned long, JDrama::TGraphics*) +626 0.00% 99.82%
mario/Enemy/bosspakkun TBossPakkunMtxCalc::calcBellyScale(unsigned short) +599 0.00% 96.01%
mario/Enemy/bosspakkun TBossPakkun::receiveMessage(THitActor*, unsigned long) +591 0.00% 99.87%
mario/Enemy/bosspakkun TBPHeadHit::throwActor(THitActor*) +589 0.00% 99.64%
mario/Enemy/bosspakkun TNerveBPWaitL::execute(TSpineBase<TLiveActor>*) const +553 0.00% 98.11%
mario/Enemy/bosspakkun TNerveBPTakeOff::execute(TSpineBase<TLiveActor>*) const +551 0.00% 99.91%
mario/Enemy/bosspakkun TBossPakkun::launchPolDrop() +518 0.00% 99.77%
mario/Enemy/bosspakkun TNerveBPSwallow::execute(TSpineBase<TLiveActor>*) const +495 0.00% 99.92%
mario/Enemy/bosspakkun TNerveBPPreDie::execute(TSpineBase<TLiveActor>*) const +471 0.00% 99.86%
mario/Enemy/bosspakkun TNerveBPTouchDown::execute(TSpineBase<TLiveActor>*) const +399 0.00% 99.87%
mario/Enemy/bosspakkun TNerveBPTornado::execute(TSpineBase<TLiveActor>*) const +379 0.00% 99.91%
mario/Enemy/bosspakkun TNerveBPTumble::execute(TSpineBase<TLiveActor>*) const +373 0.00% 99.29%
mario/Enemy/bosspakkun TBossPakkun::rumblePad(int, const JGeometry::TVec3<float>&) +351 0.00% 99.86%
mario/Enemy/bosspakkun TNerveBPTumbleIn::execute(TSpineBase<TLiveActor>*) const +339 0.00% 99.89%
mario/Enemy/bosspakkun TNerveBPPivot::execute(TSpineBase<TLiveActor>*) const +323 0.00% 93.98%
mario/Enemy/bosspakkun TBPPolDrop::TBPPolDrop(TBossPakkun*, const char*) +315 0.00% 99.86%

...and 14 more improvements in unmatched items

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.

1 participant