Skip to content

Conversation

@malvarezcastillo
Copy link
Contributor

No description provided.

- grVenom_80204CEC (100%)
- grVenom_80205E84 (100%)
- grVenom_80206CB0 (100%)
- grVenom_80206D10 (100%)
- grVenom_80206D7C (100%)

Fix prototypes in grcorneria.h and grvenom.h for proper linking.
@encounter
Copy link
Contributor

encounter commented Jan 29, 2026

Report for GALE01 (4781872 - 7ddf398)

📈 Matched code: 51.05% (+0.06%, +2416 bytes)

✅ 12 new matches
Unit Item Bytes Before After
main/melee/gr/grvenom grVenom_802040F0 +396 0.00% 100.00%
main/melee/gr/grvenom grVenom_80204B88 +344 0.00% 100.00%
main/melee/gr/grvenom grVenom_80204DD4 +288 0.00% 100.00%
main/melee/gr/grvenom grVenom_80203EAC +236 0.00% 100.00%
main/melee/gr/grvenom grVenom_80204CEC +196 0.00% 100.00%
main/melee/gr/grvenom grVenom_80206BF0 +192 0.00% 100.00%
main/melee/gr/grvenom grVenom_80206D7C +176 0.00% 100.00%
main/melee/gr/grvenom grVenom_80205E84 +172 0.00% 100.00%
main/melee/gr/grvenom grVenom_802056B0 +160 0.00% 100.00%
main/melee/gr/grvenom grVenom_80206D10 +100 0.00% 100.00%
main/melee/gr/grvenom grVenom_80206CB0 +96 0.00% 100.00%
main/melee/gr/grvenom fn_802040B4 +60 0.00% 100.00%
📈 10 improvements in unmatched functions
Unit Item Bytes Before After
main/melee/gr/grvenom grVenom_8020362C +1020 0.00% 81.23%
main/melee/gr/grvenom grVenom_80205AD4 +737 0.00% 92.66%
main/melee/gr/grvenom grVenom_802053B0 +728 0.00% 95.38%
main/melee/gr/grvenom grVenom_80203B18 +669 0.00% 96.16%
main/melee/gr/grvenom grVenom_80204284 +404 0.00% 97.29%
main/melee/gr/grvenom grVenom_80204428 +283 0.00% 99.70%
main/melee/gr/grvenom grVenom_80203FD4 +207 0.00% 99.90%
main/melee/gr/grvenom grVenom_802052E0 +207 0.00% 99.92%
main/melee/gr/grvenom .sdata +30 0.00% 62.86%
main/melee/gr/grvenom .sdata2 +22 0.00% 10.17%

- grVenom_80203EAC: 100% - ground object initialization
- grVenom_802052E0: 99.71% - spawn position calculation
- grVenom_802056B0: 100% - ground object animation setup

Uses extern data symbols (grVe_803E5348, grVe_803E5380, etc.)
@malvarezcastillo
Copy link
Contributor Author

WIP. Pushing more matches in a few

malvarezcastillo and others added 6 commits January 29, 2026 18:15
Co-authored-by: Robin Avery <robin@ribbanya.dev>
Matched:
- grVenom_80204B88 (100%) - stage lighting colors

Partial matches (compiling):
- grVenom_802053B0 (95.38%) - enemy state machine
- grVenom_80203B18 (96.16%) - stage initialization

Partial matches (commented out with #if 0):
- grVenom_80204284 (68.27%)
- grVenom_80205AD4 (72.36%)
- grVenom_80206874 (64.02%)

Added externs for grVe_804D* data symbols and GXColor globals.
Fixed grVenom_80204B88 header prototype.
- grVenom_80204284: 97.29% match (was 68%, needs minor regalloc fix)
- grVenom_80205AD4: 92.66% match (was 72%, needs code ordering fix)
- grVenom_80206874: Kept as stub (32.92% < 50% threshold)
- Fix grCorneria_801E25C4 prototype from UNK_PARAMS to actual signature

Following new 50% contribution policy - partial matches to be reviewed.
- grVenom_8020362C: 81.23% match (Venom stage ship spawning logic)
- Add baselib/random.h include for HSD_Randi/HSD_Randf
- Extend grVe_TimingData struct with x8, xC, x10 fields
- Add local grVe_ExtData, grVe_Lighting, grVe_GroundData structs

TODO: Move local structs to proper headers, fix remaining 19% mismatch
@malvarezcastillo
Copy link
Contributor Author

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

Permuter-derived fixes:
- grVenom_802040F0: Add new_var temp for gp, use in xD0 access
- grVenom_80204DD4: Pre-compute flag check and jobj copy
- grVenom_80206BF0: Add PAD_STACK(32) for stack frame match
- grVenom_802052E0: Add temp variables (99.92%, close but not 100%)

Progress: 51.05% matched
- Remove redundant mid-file includes (already at top of file)
- Add @todo for grVenom_80203FD4 (99.90%)
- Add @todo for grVenom_80204428 (99.70%)
- Add @todo for grVenom_802052E0 (99.92%)
@malvarezcastillo malvarezcastillo marked this pull request as ready for review January 29, 2026 18:59
- Revert grVenom_8020362C to stub (reviewer found code quality poor)
- Change grVenom_80206D7C first param from void* to Vec3*
- Remove redundant mpJointFromLine forward declaration (mplib.h included)
- Remove unnecessary "// Decompilation of" comments
- Add FAKE MATCH comment explaining jobj.h line number mismatch
- Use JOBJ flag constants instead of magic numbers
@PsiLupan PsiLupan dismissed their stale review January 30, 2026 15:42

Issues are addressed.

@ribbanya ribbanya merged commit 762fb72 into doldecomp:master Jan 30, 2026
7 checks passed
@malvarezcastillo malvarezcastillo deleted the decomp/grvenom branch January 30, 2026 17:26
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.

4 participants