-
Notifications
You must be signed in to change notification settings - Fork 109
Toy matches #2147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Toy matches #2147
Conversation
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.
Report for GALE01 (762fb72 - 2553449)📈 Matched code: 51.38% (+0.08%, +2940 bytes) ✅ 11 new matches
📈 19 improvements in unmatched functions
|
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%.
|
Running permuter on 99% matches, then doing my own review, then flagging for review, please be patient 😆 |
- 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
| // Decompilation of un_803062EC | ||
| // Unit: main/melee/ty/toy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you get it to stop doing this?
| skip = 1; | ||
|
|
||
| check_skip: | ||
| if (skip == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if you can teach it to create an inline function every time it wants to create a label. In this case, this is clearly an inline bool whose result is being checked.
| next_iter: | ||
| var_r25++; | ||
| var_r27 += 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole thing is a for loop and any goto next_iter should be continue.
| typedef struct { | ||
| s16 x0; | ||
| s16 x2; | ||
| s16 x4; | ||
| s16 x6; | ||
| s16 x8; | ||
| s16 xA; | ||
| } ToyNameData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put type definitions at the top of the file. Maybe use your static checker to flag them and then just move them up manually.
More vacuuming work