Skip to content

decomp: give 104 data labels one name each - #182

Merged
mateuszklysz merged 1 commit into
lombyte-project:mainfrom
Sploters:cleanup/one-name-per-data-label
Oct 15, 2026
Merged

mateuszklysz merged 1 commit into
lombyte-project:mainfrom
Sploters:cleanup/one-name-per-data-label

Conversation

@Sploters

Copy link
Copy Markdown
Contributor

Before

scripts/data-decls.py listed 717 data labels declared with more than one type or name. Many were file-suffixed aliases of the same label (D_0013D510_2607d0, D_0015ED64_k, ...), and D_0013D428 appeared as D_0013D428, D_0013D428_2c5be8 and weapon_ammo_counts.

After

  • 104 labels now have one name: suffixed aliases use the label itself, keeping a _gp/_lui/_macro alias where a declaration needs another placement (docs/code-cleanup.md, Data).
  • D_0013D428 is weapon_ammo_counts in every file.
  • KNOWN_CONFLICTS lowered from 720 to 613 (data-decls.py: 717 -> 613).
  • Left as they were: l08/.../002e9b70.c, l18/.../002a7220.c and shared/.../002d6810.c (their declarations differ in type, not only in name), and l14/.../002460f8.c, where the second name keeps FUN_L14_002aee28 exact. D_001B3200 keeps its plain name, which select_world_object_resource_tables needs to match.

43 files, renames only.

Verification

  • make elf ends with PASS: reconstructed boot ELF matches retail
  • make overlays ends with PASS (all 2822 overlay functions in C match retail)
  • make check passes (99 tests OK)

Suffixed aliases of a label (D_0013D510_2607d0, D_0015ED64_k, ...) now use
the label itself, keeping a _gp/_lui/_macro alias where a declaration needs
another placement, and D_0013D428 is weapon_ammo_counts everywhere. Four files
are left as they were: three declare a label with types that only look alike,
and in one (l14 002460f8.c) the second name keeps FUN_L14_002aee28 exact.

scripts/data-decls.py: 717 -> 613 labels with more than one type or name;
KNOWN_CONFLICTS lowered to match.

make elf: PASS: reconstructed boot ELF matches retail
make overlays: PASS: all 2822 overlay functions in C match retail
make check: 99 tests OK
@decomp-dev

decomp-dev Bot commented Oct 14, 2026

Copy link
Copy Markdown

Report for SCUS_971.99 (6db3f55 - 1f8c7d0)

No changes

@github-actions

Copy link
Copy Markdown

Decompilation progress

C_EXACT Change Matched bytes Functions C_FUZZY
All code 88.45 % — 3,136,836 / 3,546,268 B (—) 3,980 / 4,233 (—) 89.70 %
Boot executable 85.65 % — 302,216 / 352,840 B (—) 1,163 / 1,219 (—) 98.13 %
Game 84.51 % — 230,576 / 272,844 B (—) 866 / 905 (—) 98.40 %
SDK 89.55 % — 71,640 / 79,996 B (—) 297 / 314 (—) 97.21 %
Level overlays 88.76 % — 2,834,620 / 3,193,428 B (—) 2,817 / 3,014 (—) 88.76 %
Shared level code 80.64 % — 911,592 / 1,130,492 B (—) 1,442 / 1,583 (—) 80.64 %
Per-level code 93.22 % — 1,923,028 / 2,062,936 B (—) 1,375 / 1,431 (—) 93.22 %
Data in C Change Matched bytes
All data 32.31 % — 4,017,559 / 12,433,372 B (—)
Boot executable 2.16 % — 15,091 / 699,136 B (—)
Level overlays 34.11 % — 4,002,468 / 11,734,236 B (—)

No function changed its match state compared with main (6db3f55).

Compared with main (6db3f55). C_FUZZY uses main's last measurement.

@mateuszklysz
mateuszklysz merged commit 0b02b74 into lombyte-project:main Oct 15, 2026
3 checks passed
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