Skip to content

Improve Player state and water code - #198

Open
KakarottoCake wants to merge 1 commit into
doldecomp:mainfrom
KakarottoCake:decomp-player
Open

KakarottoCake wants to merge 1 commit into
doldecomp:mainfrom
KakarottoCake:decomp-player

Conversation

@KakarottoCake

@KakarottoCake KakarottoCake commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • Correct floor damage pollution, fruit emitter translation, wire hang input, and water-gun rotation clamp.
  • Reconstruct water particle bounds and draw vertices; correct single-precision matrix calculations.

Match

  • Player: 293/548 -> 297/548 exact functions; 62,588/295,812 -> 63,204/295,812 exact code bytes.
  • ModelWaterManager: 88.67379% -> 94.38061% fuzzy match.

Checks

  • Native bare ninja: pass.
  • All five changed files pass clang-format 21.1.8; review-lint.py is clean on changed lines.
  • Symbol-order check: 5 passed, 0 new errors.

@decomp-dev

decomp-dev Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Report for GMSJ01 (b7bed68 - 9129922)

📈 Matched code: 41.89% (+0.06%, +2240 bytes)
📈 Matched data: 63.11% (+0.03%, +196 bytes)

✅ 14 new matches
Unit Item Bytes Before After
mario/GC2D/Guide __sinit_Guide_cpp +764 0.00% 100.00%
mario/GC2D/Guide TGuide::checkPoint(int, int) +308 0.00% 100.00%
mario/GC2D/Guide TGuide::TGuide(const char*) +232 0.00% 100.00%
mario/GC2D/Guide .bss +184 0.00% 100.00%
mario/GC2D/Guide TGuide::~TGuide() +116 0.00% 100.00%
mario/GC2D/Guide SMS_getShineID(unsigned long, unsigned long, bool) +92 0.00% 100.00%
mario/GC2D/Guide TGuide::setup(JKRMemArchive*) +92 0.00% 100.00%
mario/Player/MarioCollision TMario::floorDamageExec(const TMario::TEParams&) +53 76.20% 100.00%
mario/GC2D/Guide TGuide::startMoveCursor() +20 0.00% 100.00%
mario/Player/MarioParticle TMario::emitGetWaterEffect() +10 82.23% 100.00%
mario/GC2D/Guide .sbss +8 0.00% 100.00%
mario/GC2D/Guide .ctors +4 0.00% 100.00%
mario/Player/MarioParticle TMario::kickFruitEffect() +1 99.93% 100.00%
mario/Player/WaterGun TWaterGun::rotateProp(float) +1 99.98% 100.00%
📈 18 improvements in unmatched items
Unit Item Bytes Before After
mario/GC2D/Guide TGuide::load(JSUMemoryInputStream&) +2498 0.00% 97.45%
mario/Player/ModelWaterManager TModelWaterManager::calcDrawVtx(float(*)[4]) +734 0.53% 98.65%
mario/GC2D/Guide .rodata +334 0.00% 95.14%
mario/Player/ModelWaterManager TModelWaterManager::calcWorldMinMax() +314 10.37% 97.61%
mario/GC2D/Guide .data +159 0.00% 76.47%
mario/GC2D/Guide .sdata2 +124 0.00% 70.59%
mario/Player/ModelWaterManager TModelWaterManager::calcVMMtxWall(float(*)[4], float, const JGeometry::TVec3<float>&, const JGeometry::TVec3<float>&, float(*)[4]) +82 54.12% 84.06%
mario/Player/ModelWaterManager TModelWaterManager::calcVMMtxGround(float(*)[4], float, const JGeometry::TVec3<float>&, const JGeometry::TVec3<float>&, float(*)[4]) +44 62.49% 76.52%
mario/Player/ModelWaterManager .sdata2 +5 97.89% 99.67%
mario/GC2D/Guide TGuide::resetObjects() +4 0.00% 0.44%
mario/GC2D/Guide TGuide::resetScore() +4 0.00% 0.17%
mario/GC2D/Guide TGuide::placeMario() +4 0.00% 0.67%
mario/GC2D/Guide TGuide::appearGuidePane(int) +4 0.00% 0.42%
mario/GC2D/Guide TGuide::linkSelect() +3 0.00% 0.13%
mario/GC2D/Guide TGuide::changeBotStatus(int) +3 0.00% 0.25%
mario/GC2D/Guide TGuide::perform(unsigned long, JDrama::TGraphics*) +3 0.00% 0.22%
mario/Player/MarioSpecial TMario::wireWait() 0 66.05% 66.09%
mario/Player/WaterGun TWaterGun::movement() 0 99.69% 99.69%

Report for GMSP01 (b7bed68 - 9129922)

📈 Matched code: 40.97% (+0.06%, +2240 bytes)
📈 Matched data: 54.92% (+0.03%, +196 bytes)

✅ 14 new matches
Unit Item Bytes Before After
mario/GC2D/Guide __sinit_Guide_cpp +764 0.00% 100.00%
mario/GC2D/Guide TGuide::checkPoint(int, int) +308 0.00% 100.00%
mario/GC2D/Guide TGuide::TGuide(const char*) +232 0.00% 100.00%
mario/GC2D/Guide .bss +184 0.00% 100.00%
mario/GC2D/Guide TGuide::~TGuide() +116 0.00% 100.00%
mario/GC2D/Guide SMS_getShineID(unsigned long, unsigned long, bool) +92 0.00% 100.00%
mario/GC2D/Guide TGuide::setup(JKRMemArchive*) +92 0.00% 100.00%
mario/Player/MarioCollision TMario::floorDamageExec(const TMario::TEParams&) +53 76.20% 100.00%
mario/GC2D/Guide TGuide::startMoveCursor() +20 0.00% 100.00%
mario/Player/MarioParticle TMario::emitGetWaterEffect() +10 82.23% 100.00%
mario/GC2D/Guide .sbss +8 0.00% 100.00%
mario/GC2D/Guide .ctors +4 0.00% 100.00%
mario/Player/MarioParticle TMario::kickFruitEffect() +1 99.93% 100.00%
mario/Player/WaterGun TWaterGun::rotateProp(float) +1 99.98% 100.00%
📈 19 improvements in unmatched items
Unit Item Bytes Before After
mario/GC2D/Guide TGuide::load(JSUMemoryInputStream&) +2498 0.00% 97.44%
mario/Player/ModelWaterManager TModelWaterManager::calcDrawVtx(float(*)[4]) +734 0.53% 98.65%
mario/GC2D/Guide .rodata +325 0.00% 94.50%
mario/Player/ModelWaterManager TModelWaterManager::calcWorldMinMax() +314 10.37% 97.61%
mario/GC2D/Guide .data +159 0.00% 76.47%
mario/GC2D/Guide .sdata2 +124 0.00% 70.59%
mario/Player/ModelWaterManager TModelWaterManager::calcVMMtxWall(float(*)[4], float, const JGeometry::TVec3<float>&, const JGeometry::TVec3<float>&, float(*)[4]) +82 54.12% 84.06%
mario/Player/ModelWaterManager TModelWaterManager::calcVMMtxGround(float(*)[4], float, const JGeometry::TVec3<float>&, const JGeometry::TVec3<float>&, float(*)[4]) +44 62.49% 76.52%
mario/Player/ModelWaterManager .sdata2 +5 97.89% 99.67%
mario/GC2D/Guide TGuide::resetObjects() +4 0.00% 0.44%
mario/GC2D/Guide TGuide::resetScore() +4 0.00% 0.17%
mario/GC2D/Guide TGuide::startMoveCursor2() +4 0.00% 1.10%
mario/GC2D/Guide TGuide::appearGuidePane(int) +4 0.00% 0.42%
mario/GC2D/Guide TGuide::linkSelect() +3 0.00% 0.13%
mario/GC2D/Guide TGuide::changeBotStatus(int) +3 0.00% 0.25%
mario/GC2D/Guide TGuide::placeMario() +3 0.00% 0.66%
mario/GC2D/Guide TGuide::perform(unsigned long, JDrama::TGraphics*) +3 0.00% 0.26%
mario/Player/MarioSpecial TMario::wireWait() 0 66.05% 66.09%
mario/Player/WaterGun TWaterGun::movement() 0 95.17% 95.17%

@Mrkol Mrkol left a comment

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.

remove the 2 weird places and we can merge

Comment thread src/Player/MarioRun.cpp Outdated
Comment thread src/Player/MarioRun.cpp Outdated
@KakarottoCake
KakarottoCake force-pushed the decomp-player branch 2 times, most recently from 83b8f8c to fdb5531 Compare September 26, 2026 15:57
@Mrkol

Mrkol commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

soz, needs a rebase

@KakarottoCake

Copy link
Copy Markdown
Contributor Author

Rebased PR #198 onto current main. The PR now contains only the five Player files and GitHub reports it mergeable. Local GMSJ01 build, formatting, review lint, and symbol-order checks pass.

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