Repository navigation
Full readability pass: every first-party function named, typed and documented - #5
Merged
Merged
Conversation
MEMBER(type, base, Struct, member) expands to *(type *)(base + offsetof) with the offset from the proven layout. Measured on k_fldEvent.c: replacing eight *(s32 *)(p + 0x144) reads keeps 26/26 MATCH; casting the base to u8 * first does not, hence the verbatim-base rule. STYLE.md documents when to use it.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
… duplicate RenderWare layouts (#4) First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…nt-misc units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…nd polygon units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
… mc.c optimizer pragmas First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…ne GDataEntry (#4) First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
… and h_* wrappers First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…erimage packs (partial) First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…and HBN units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…ecord and scene resources (#4) First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…model/resources and boot sequence units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…d SDK wrapper units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
… resource-cache, scene-draw, shadow and clump units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…mitive units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…moted collision-tree helpers First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…its; canonical ScrScriptWork First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…lk and card-effect units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…el and model-effect units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…ect units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
fldFilterBeginTransition (0x00161460) and datSetClearCount (0x00110470) already carried canonical names; the definitions kept FUN_ spellings that apply_symbol_names does not rewrite. First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…election, fade and formation units First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…types function_bodies searched a fixed 12-line window after each marker, so a definition behind a long measured pragma block went unscored, and a same-name prototype could be taken as the body. Search up to the next marker and skip declarations. All 6860 first-party matches are now scored.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
… store helper First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…yout exceptions First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…ut exceptions; one byte-address helper First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…ccesses First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…n operand_order_internal.h First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
…sona helpers First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
STYLE.md documents where measured operand-order wrappers live (operand_order_internal.h, byte_address_internal.h) and that unused helper copies are deleted. architecture.md section 13 no longer claims the listed systems are unnamed: every matched first-party function is named, typed and documented; the remaining gaps are untraced behaviour in this document.
…k definitions First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
First-party 6860/6860 MATCH; 8101 C functions linked; both retail SHA-1s OK.
Report for SLUS_217.82 (73510e7 - a462c4b)✅ 111 new matches
...and 81 more new matches 🥀 111 broken matches
...and 81 more broken matches |
This was referenced Oct 20, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second readability pass. Every matched first-party function now passes
tools/recovery_quality.pyon all three axes. Matching is unchanged: 6860/6860 first-party MATCH, 8101 C functions linked, both retail SHA-1s OK at every commit.func_/FUN_placeholder)*(T *)(p + off), no generated locals)static inlinehelper definitionsWhat changed
MEMBER(type, base, Struct, member)/MEMBER_OFFSET(Struct, member)from the newinclude/member_access.h. These are the same byte-offset expressions, but the offset comes from the real layout, so the member is named. Each such site is measured. The former layout exceptions (linker interior aliases, interleaved tables, variable-length records) are typed now too: aliases as typedexterns, tables as arrays of column structs, records as header plus flexible tail.BtlPacketis now its allocation-proven 0x90 bytes. Consolidated to one definition each:FclCombineWork(was alsoFclCombineMenu),BtlFormationState,ScrScriptWork(three private copies),SdkListState,GDataEntry,ResrcRecord,EvtEffectTable,BtlAiCommandWork(was alsoBtlTargetRecord) andEffGeometryBlock.static inlinehelper copies. In the 500 that were still used, every call site was tried as plain C. A wrapper stays only where plain C is measured to change codegen. Order wrappers now live once ininclude/operand_order_internal.h(operandOrder*), offset-first address sums ininclude/byte_address_internal.h(byteAddressAdd). No helper name contains an address or digits.<prefix><Role>Noop.recovery_quality.pyused to miss definitions behind long pragma blocks or after a same-name prototype, which left two functions unscored. It now scores all 6,860. Regression tests added.docs/STYLE.mdcoversMEMBERand the helper convention.docs/architecture.mdsection 13 no longer describes these systems as unnamed.Closes #4.
ModelandMdlFileModeldescribe the same object with different extents (0x2FC/0x310/0x320) across 39 includers; merging them is left for a follow-up.Verification
Each commit was gated on: whole-tree
tools/verify.py(6860/6860 first-party MATCH),tools/build.py(8101 linked, both SHA-1s), no newdecomp_lint.pyerrors in changed files, and the unit tests. The two libubsan-dependent field-movement tests can't run on the integration host.