Skip to content

System: audit factories and card state handling - #200

Open
KakarottoCake wants to merge 10 commits into
doldecomp:mainfrom
KakarottoCake:decomp-system-all
Open

KakarottoCake wants to merge 10 commits into
doldecomp:mainfrom
KakarottoCake:decomp-system-all

Conversation

@KakarottoCake

@KakarottoCake KakarottoCake commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Restore Boss Pakkun, TobiPuku, launcher manager, and PoiHanaRed factory cases; use the retail PalmNatume tree name.
  • Fix particle callback identity and color selection. Both functions now match exactly.
  • Build named scale, rotation, and translation vectors in evSetTransScale; it now matches exactly.
  • Correct first-time menu wave setup and the shine camera choice.
  • Initialize CardManager criteria.
  • Store CameraMapTool pitch and yaw as angles, matching its System copy constructor.

Verification

  • Audited all 46 mario/System units. Exact functions: 401/595 -> 415/595.
  • Native bare Ninja build passes; changed lines pass clang-format and review-lint.
  • Symbol-order checks report no new regressions against the base revision.
  • PalmNatume's corrected default shifts constant relocations, lowering MapObj fuzzy by 0.013 points without losing an exact function. The CardManager fuzzy regression was removed.
  • No stack padding, dummy cases, or wrong constants were added.

@decomp-dev

decomp-dev Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Report for GMSP01 (a7a99b4 - 482f6b3)

📈 Matched code: 41.03% (+0.08%, +2684 bytes)
📈 Matched data: 54.94% (+0.03%, +168 bytes)

✅ 7 new matches
Unit Item Bytes Before After
mario/System/MarNameRefGen_Enemy .data +168 0.00% 100.00%
mario/System/MarNameRefGen_Enemy THamuKuriLauncherManager::~THamuKuriLauncherManager() +116 0.00% 100.00%
mario/System/MarNameRefGen_Enemy TNameKuriLauncherManager::~TNameKuriLauncherManager() +116 0.00% 100.00%
mario/System/EmitterViewObj TMarioParticleManager::emitParticleCallBack(long, const JGeometry::TVec3<float>*, unsigned char, JPACallBackBase2<JPABaseEmitter*, JPABaseParticle*>*, const void*) +17 95.85% 100.00%
mario/System/MarNameRefGen TCameraMapTool::TCameraMapTool(const TCameraMapTool&) +10 91.72% 100.00%
mario/System/EventWatcher evSetTransScale(TSpcTypedInterp<TEventWatcher>*, unsigned long) +9 99.46% 100.00%
mario/System/EmitterViewObj SMSSetEmitterPolColor(JPABaseEmitter*, int) +2 99.44% 100.00%
📈 6 improvements in unmatched items
Unit Item Bytes Before After
mario/System/MarNameRefGen_Enemy TMarNameRefGen::getNameRef_Enemy(const char*) const +685 56.84% 65.01%
mario/System/MarNameRefGen_Enemy .rodata +321 72.94% 79.73%
mario/System/MarNameRefGen_BossEnemy TMarNameRefGen::getNameRef_BossEnemy(const char*) const +213 40.64% 49.74%
mario/System/MarNameRefGen_BossEnemy .rodata +163 45.87% 56.71%
mario/System/MarNameRefGen_Enemy .sdata2 +8 60.49% 63.47%
mario/System/MenuDir TMenuDirector::direct() +1 97.65% 97.66%
📉 1 regression in an unmatched item
Unit Item Bytes Before After
mario/System/MarNameRefGen_MapObj TMarNameRefGen::getNameRef_MapObj(const char*) const -2 85.35% 85.33%

Report for GMSJ01 (a7a99b4 - 482f6b3)

📈 Matched code: 41.98% (+0.10%, +3468 bytes)
📈 Matched data: 63.13% (+0.03%, +168 bytes)

✅ 15 new matches
Unit Item Bytes Before After
mario/System/MarNameRefGen_Enemy .data +168 0.00% 100.00%
mario/System/MarNameRefGen_Enemy TPoiHana::~TPoiHana() +156 0.00% 100.00%
mario/System/MarNameRefGen_Enemy TTobiPuku::~TTobiPuku() +156 0.00% 100.00%
mario/System/MarNameRefGen_Enemy TTobiPukuLaunchPad::~TTobiPukuLaunchPad() +132 0.00% 100.00%
mario/System/MarNameRefGen_Enemy THamuKuriLauncherManager::~THamuKuriLauncherManager() +116 0.00% 100.00%
mario/System/MarNameRefGen_Enemy TNameKuriLauncherManager::~TNameKuriLauncherManager() +116 0.00% 100.00%
mario/System/MarNameRefGen_Enemy TTobiPukuLaunchPadManager::~TTobiPukuLaunchPadManager() +116 0.00% 100.00%
mario/System/MarNameRefGen_Enemy TTobiPukuManager::~TTobiPukuManager() +116 0.00% 100.00%
mario/System/MarNameRefGen_Enemy TLauncherManager::~TLauncherManager() +100 0.00% 100.00%
mario/System/EmitterViewObj TMarioParticleManager::emitParticleCallBack(long, const JGeometry::TVec3<float>*, unsigned char, JPACallBackBase2<JPABaseEmitter*, JPABaseParticle*>*, const void*) +17 95.85% 100.00%
mario/System/MarNameRefGen TCameraMapTool::TCameraMapTool(const TCameraMapTool&) +10 91.72% 100.00%
mario/System/EventWatcher evSetTransScale(TSpcTypedInterp<TEventWatcher>*, unsigned long) +9 99.46% 100.00%
mario/System/MarNameRefGen_Enemy TEnemyManager::changeDrawBuffer(unsigned long) +4 0.00% 100.00%
mario/System/MarNameRefGen_Enemy TEnemyManager::restoreDrawBuffer(unsigned long) +4 0.00% 100.00%
mario/System/EmitterViewObj SMSSetEmitterPolColor(JPABaseEmitter*, int) +2 99.44% 100.00%
📈 6 improvements in unmatched items
Unit Item Bytes Before After
mario/System/MarNameRefGen_Enemy TMarNameRefGen::getNameRef_Enemy(const char*) const +685 56.84% 65.01%
mario/System/MarNameRefGen_Enemy .rodata +321 72.94% 79.73%
mario/System/MarNameRefGen_BossEnemy TMarNameRefGen::getNameRef_BossEnemy(const char*) const +205 35.50% 43.18%
mario/System/MarNameRefGen_BossEnemy .rodata +170 45.42% 55.39%
mario/System/MarNameRefGen_Enemy .sdata2 +7 61.84% 64.85%
mario/System/MenuDir TMenuDirector::direct() 0 99.16% 99.17%
📉 1 regression in an unmatched item
Unit Item Bytes Before After
mario/System/MarNameRefGen_MapObj TMarNameRefGen::getNameRef_MapObj(const char*) const -3 85.87% 85.86%

Comment thread src/System/MarNameRefGen_Enemy.cpp Outdated
Comment thread src/System/CardManager.cpp Outdated
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