Skip to content

Conversation

@malvarezcastillo
Copy link
Contributor

More vacuuming work

@encounter
Copy link
Contributor

encounter commented Jan 29, 2026

Report for GALE01 (9923c37 - d94731d)

📈 Matched code: 51.87% (+0.07%, +2680 bytes)

✅ 10 new matches
Unit Item Bytes Before After
main/melee/ty/toy un_803064B8 +388 0.00% 100.00%
main/melee/ty/toy un_8030663C +384 0.00% 100.00%
main/melee/ty/toy un_80307018 +324 0.00% 100.00%
main/melee/ty/toy un_80308DC8 +316 0.00% 100.00%
main/melee/ty/toy un_80311680 +264 0.00% 100.00%
main/melee/ty/toy fn_80307E84 +224 0.00% 100.00%
main/melee/ty/toy un_80306A48 +208 0.00% 100.00%
main/melee/ty/toy un_803083D8 +200 0.00% 100.00%
main/melee/ty/toy un_80311F5C +188 0.00% 100.00%
main/melee/ty/toy un_80306954 +184 0.00% 100.00%
📈 18 improvements in unmatched items
Unit Item Bytes Before After
main/melee/ty/toy un_80308F04 +1074 0.00% 99.88%
main/melee/ty/toy un_803084A0 +850 0.00% 99.85%
main/melee/ty/toy un_80310324 +796 0.00% 96.25%
main/melee/ty/toy un_80310660 +792 0.00% 95.20%
main/melee/ty/toy un_80307BA0 +739 0.00% 99.95%
main/melee/ty/toy un_8030715C +726 0.00% 92.21%
main/melee/ty/toy un_803078E4 +677 0.00% 96.76%
main/melee/ty/toy un_80305918 +616 0.00% 98.72%
main/melee/ty/toy un_803075E8 +554 0.00% 96.32%
main/melee/ty/toy un_80306D70 +313 0.00% 82.60%
main/melee/ty/toy un_80306EEC +288 0.00% 96.32%
main/melee/ty/toy un_8030813C +264 0.00% 95.72%
main/melee/ty/toy un_803062EC +231 0.00% 99.91%
main/melee/ty/toy .sdata2 +209 8.70% 68.01%
main/melee/ty/toy un_803063D4 +205 0.00% 90.32%
main/melee/ty/toy un_80309338 +203 0.00% 99.92%
main/melee/ty/toy .sdata +48 0.00% 86.54%
main/melee/if/textlib un_80304D30 +5 93.81% 94.35%

@malvarezcastillo
Copy link
Contributor Author

Running permuter on 99% matches, then doing my own review, then flagging for review, please be patient 😆

@malvarezcastillo malvarezcastillo marked this pull request as ready for review January 29, 2026 18:59
All three functions matched at 100%.
Integrated 5 functions that achieved high sandbox matches but failed
automatic integration:

- un_80309338 (99.88%) - Vec3 distance calculation
- un_803062EC (99.91%) - Debug text display
- un_80307018 (99.91%) - Background/fog setup
- un_8030813C (99.86%) - Trophy model lookup
- un_803078E4 (96.76%) - Light/sprite setup

Fixed multiline string issues and prototype mismatches during
integration.
- un_803053C4: 97.5%
- Trophy_SetUnlockState: 94.9%
- un_80305918: 98.7%
- un_80306C5C: 91.1%
- un_803075E8: 96.3%
- un_803078E4: 96.8%
- un_80307F64: 98.4%
- un_80308354: 68.1%
- un_803082F8: 91.2%
- un_803102D0: 72.4%
- un_803109A0: 87.7%
- un_80311788: 81.3%
- un_80312050: 91.8%

Also add missing header includes for gobjgxlink.h, gobjobject.h, gobjplink.h
- un_80305FB8 (70.8% match) - C-stick Y input
- un_80306D70 (82.6% match) - Sound play helper

These are best-effort decompilations. The code is functionally
equivalent but doesn't match byte-for-byte due to compiler
code generation differences.
- un_80306EEC (96.3%) - Light object loading
- un_8030715C (92.2%) - Camera/light position update
- un_80307BA0 (99.4%) - Trophy JObj setup
- un_80310324 (89.2%) - Trophy display initialization

Also fix related header prototypes for un_8030FE48, un_803087F4,
un_8030FA50.
The asm function definition was causing syntax errors. Call un_803063D4
directly instead of going through the call_text_func wrapper.
- un_8030813C: Change first param back to s16 (restores gm_1601 matches)
- un_803063D4: Change to s32 return with s16 first param (restores un_803082F8/un_80308328)

These prototype fixes restore cross-file compatibility at the cost of
reducing un_803063D4 match from 100% to 90.32%.
- un_8030663C: Add temp variable in else branch for register alloc
- un_80307018: Stack padding + variable reorder (applied by agent)
- un_80306A48: Temp variables + declaration order changes
- un_80311680: Split increment into separate load and add

All 4 functions now 100% matched.
- Fix stale match percentages (un_80305FB8, un_80306EEC, un_8030715C, un_80310324)
- Remove 100% match comment from un_803082F8 (now matches)
- Add missing match comments for un_803063D4, un_80306D70, un_8030813C, un_80310660
- Add FAKE MATCH comment for dead code in un_80306EEC
- Remove duplicate forward declaration of un_80306BB8
Address reviewer feedback:
- Remove all '// Decompilation of' and '// Unit:' sandbox comments
- Move all typedef struct definitions to top of file (after includes)

Also cleaned up permuter temp files.
Address reviewer feedback:
- Convert do-while with goto next_iter to for loop with continue
- Add comment explaining inner loop label pattern (refactoring to inline
  function breaks the match due to control flow changes)

Match maintained at 98.71%.
@ribbanya ribbanya merged commit eed8751 into doldecomp:master Feb 1, 2026
7 checks passed
@malvarezcastillo malvarezcastillo deleted the vacuum/ty-toy branch February 1, 2026 18:24
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.

3 participants