Skip to content

Improve matching: cameralib signature/return fixes, enemy decl/assign…#111

Open
vinvirile wants to merge 1 commit into
doldecomp:mainfrom
vinvirile:main
Open

Improve matching: cameralib signature/return fixes, enemy decl/assign…#111
vinvirile wants to merge 1 commit into
doldecomp:mainfrom
vinvirile:main

Conversation

@vinvirile
Copy link
Copy Markdown

…, fireWanwan pragma

  • cameralib.hpp: Fix CLBCalc2DFPos signature, CLBChaseSpecialDecrease return bool->BOOL
  • cameralib.cpp: Fix CLBCalc2DFPos signature (missing->98.2%), add CLBConstUpVec global (__sinit missing->100%), fix CLBChaseSpecialDecrease return type (87.5%->100%)
  • enemy.cpp: Split TPathNode decl/assign in doShortCut (94.7%->96.0%)
  • fireWanwan.cpp: Add #pragma dont_inline around updateCameraShake/updateRumble for moveObject (73.6%->84.6%)

…, fireWanwan pragma

- cameralib.hpp: Fix CLBCalc2DFPos signature, CLBChaseSpecialDecrease return bool->BOOL
- cameralib.cpp: Fix CLBCalc2DFPos signature (missing->98.2%), add CLBConstUpVec
  global (__sinit missing->100%), fix CLBChaseSpecialDecrease return type
  (87.5%->100%)
- enemy.cpp: Split TPathNode decl/assign in doShortCut (94.7%->96.0%)
- fireWanwan.cpp: Add #pragma dont_inline around updateCameraShake/updateRumble
  for moveObject (73.6%->84.6%)
Comment thread src/Enemy/fireWanwan.cpp
getSaveParam2()->mSLDamageHeight.get());
}

#pragma dont_inline on
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.

Nah, don't add these hacks, we want proper fixes with real inlines

extern f32 SMSGetAnmFrameRate(); // avoid including Application.hpp

void CLBCalc2DFPos(JGeometry::TVec2<f32>*, const MtxPtr, const MtxPtr,
void CLBCalc2DFPos(JGeometry::TVec2<f32>*, const f32 (*)[4], const f32 (*)[4],
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.

Oh shit, is const MtxPtr a const pointer instead of a pointer to const? Probably add a note then that this is correct and MtxPtr should not be used here

@decomp-dev
Copy link
Copy Markdown

decomp-dev Bot commented May 27, 2026

Report for GMSJ01 (3be6108 - 6d23444)

📈 Matched code: 31.42% (+0.00%, +156 bytes)
📈 Matched data: 40.59% (+0.00%, +20 bytes)

✅ 4 new matches
Unit Item Bytes Before After
mario/Camera/cameralib __sinit_cameralib_cpp +28 0.00% 100.00%
mario/Camera/cameralib .bss +16 0.00% 100.00%
mario/Camera/cameralib CLBChaseSpecialDecrease(float*, float, float, float) +16 87.50% 100.00%
mario/Camera/cameralib .ctors +4 0.00% 100.00%
📈 3 improvements in unmatched items
Unit Item Bytes Before After
mario/Camera/cameralib CLBCalc2DFPos(JGeometry::TVec2<float>*, const float(*)[4], const float(*)[4], const Vec&, unsigned long*, bool) +282 0.00% 98.19%
mario/Enemy/fireWanwan TFireWanwan::moveObject() +194 73.61% 84.60%
mario/Enemy/enemy TSpineEnemy::doShortCut() +11 94.72% 96.00%

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