Skip to content

chore: help record types and one prototype header per folder - #272

Merged
nickyyOO merged 4 commits into
mainfrom
chore/human-first-layout
Nov 1, 2026
Merged

nickyyOO merged 4 commits into
mainfrom
chore/human-first-layout

Conversation

@nickyyOO

@nickyyOO nickyyOO commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Before

The help window and tutorial records were read through loose offsets, and the extern move in #270 left 992 headers that hold one prototype each (one per function file), so a caller of three decoder functions included three headers.

After

  • Help records (Purab Shah, from chore: clarify help message and usage record types #271): named types for the help window, message entries and tutorial records, a layout check in src/check/help_window_layout_check.c and docs/game/help-messages.md.
  • Prototype headers: the single-function headers of each source folder are now one header named after the folder, e.g. src/audio/decoder/*.c → include/rnc/audio/decoder.h (152 folder headers instead of 967 files; 531 files include fewer headers). Type headers are unchanged.
  • 21 headers keep their own file: their prototype differs from a caller's local declaration (argument-order and void-return fakematches, libc helpers), or a level copy declares the same name with another label (blarg_helicopter_update, gadgebot_update, update_moby_suck_cannon_state in l12/l18 class tables).
  • src/camera/update_camera.c calls update_all_cameras through its header instead of the func_001EC420 alias (same address).
  • src/README states the one-header-per-folder rule.

Verification

  • make elf ends with PASS: reconstructed boot ELF matches retail
  • make overlays ends with PASS; all 1992 overlay objects compare equal to the build before the header change
  • make check passes (test_public_tools OK, check-cleanup: no new problems)
  • clang -fsyntax-only (with and without -DNON_MATCHING) gains no undeclared, conflicting, asm-label or redefinition errors in any src/ file
  • Changed C passes scripts/format.py --check

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Decompilation progress

C_EXACT Change Matched bytes Functions C_FUZZY
All code 100.00 % — 3,547,932 / 3,547,932 B (—) 4,244 / 4,244 (—) 100.00 %
Boot executable 100.00 % — 354,504 / 354,504 B (—) 1,230 / 1,230 (—) 100.00 %
Game 100.00 % — 264,872 / 264,872 B (—) 850 / 850 (—) 100.00 %
SDK 100.00 % — 89,632 / 89,632 B (—) 380 / 380 (—) 100.00 %
Level overlays 100.00 % — 3,193,428 / 3,193,428 B (—) 3,014 / 3,014 (—) 100.00 %
Shared level code 100.00 % — 1,130,492 / 1,130,492 B (—) 1,583 / 1,583 (—) 100.00 %
Per-level code 100.00 % — 2,062,936 / 2,062,936 B (—) 1,431 / 1,431 (—) 100.00 %
Data in C Change Matched bytes
All data 62.81 % — 7,809,078 / 12,433,372 B (—)
Boot executable 26.98 % — 188,645 / 699,136 B (—)
Level overlays 64.94 % — 7,620,433 / 11,734,236 B (—)

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

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

purabshah8 and others added 4 commits November 1, 2026 06:48
Consolidate evidence-backed help state and message layouts, name tutorial record fields, and propagate usage time-bucket names across callers. Preserve signed views, assembler labels and register-live calls.

Local draft: cleanup checks, 102 Linux tests, EE layouts and resumed full boot retail gate pass. All 62 edited overlay units compile; 59 normalized assembly outputs match and the three type-size declaration changes pass focused retail proof across 59 placements. Full overlays remain blocked by Ps2EeAs crashing on unchanged burning_debris input. No aggregate overlay qualification or native integration claimed.
Treat PR #270 as authoritative for HelpState, field and local names, prototype headers and repository layout. Remove the duplicate window type and retain compatible message-entry, usage/history field and layout-check improvements.
The single-function headers from the extern move become one header per
source folder (src/audio/decoder/*.c -> include/rnc/audio/decoder.h).
Headers whose prototype differs from a caller's local declaration, or
whose name a level copy also uses, keep their own file.
@nickyyOO
nickyyOO force-pushed the chore/human-first-layout branch from 2e93c30 to 63f9f1c Compare November 1, 2026 07:01
@nickyyOO nickyyOO changed the title chore/human-first-layout chore: help record types and one prototype header per folder Nov 1, 2026
@nickyyOO nickyyOO added the enhancement New feature or request label Nov 1, 2026 — with Claude
@nickyyOO
nickyyOO marked this pull request as ready for review November 1, 2026 07:03
@nickyyOO
nickyyOO merged commit e4e4e92 into main Nov 1, 2026
4 of 5 checks passed
@nickyyOO
nickyyOO deleted the chore/human-first-layout branch November 1, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants