Skip to content

match func_L01_002F0728 (elevator partner spawn) - #106

Merged
Lynder063 merged 2 commits into
OpenRAC:mainfrom
xx255q:match/elevator-spawn
Oct 20, 2026
Merged

Lynder063 merged 2 commits into
OpenRAC:mainfrom
xx255q:match/elevator-spawn

Conversation

@xx255q

@xx255q xx255q commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Matches func_L01_002F0728, the elevator's partner-spawn function. It's shared by levels 01, 05 and 11, and all three copies are exact.

What it does: it picks the class that pairs with this moby's (0x23C → 0x361, 0x361 → 0x362), walks its group's entity list (D_L01_001ABFC0[group], bit 15 marks the last entry) for a live moby of that class, copies this moby's update distance, draw distance, spawn frame, flags, position, rotation and two pvar floats onto it, refreshes it with func_L00_00251E30 and returns it.

What made it exact (it had been 2/296 bytes off):

  • The entity table (D_L01_00160058) is read after the null-list test. Reading it before kept the list base address live longer and swapped two register pairs.
  • Both "not found" exits share one return 0. Retail falls into it from the list test and jumps back to it from the scan loop.

Changes

  • src/overlays/shared/vendor_002B90A8.c: C definition in place of the INCLUDE_ASM stub (applied with tools/integrate.py).
  • Removes the near-miss draft nonmatching/shared/func_L01_002F0728.c and its functional.tsv and README rows.
  • progress/report.json regenerated: 5053 → 5054 of 5124 functions.

Checks

  • tools/overlay_file_check.py on the changed file: 0 problems.
  • Full bash tools/build_sn.sh: 1233/1233 exact, image matches retail.
  • python tools/gen_progress_report.py --check: passes.

🤖 Generated with Claude Code

Levels 01, 05 and 11 share this function. It finds the moby that pairs
with this one's class (0x23C -> 0x361, 0x361 -> 0x362) in the group's
entity list and copies this moby's distances, spawn frame, flags,
position, rotation and two pvar floats onto it.

What made it exact:
- the entity table is read after the null-list test, not before it
  (reading it earlier kept the list base live longer and swapped two
  register pairs);
- both misses go through one `return 0`, which retail falls into from
  the list test and jumps back to from the scan loop.

Drops the near-miss draft and its functional.tsv and README rows;
progress/report.json regenerated (5054/5124, --check passes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bytematchdev

bytematchdev Bot commented Oct 19, 2026

Copy link
Copy Markdown

ByteMatch progress report

Code matched 97.72% (+0.01%) · 3.63 MB of 3.71 MB
Fuzzy match 98.39% (+0.01%)
Functions 5,054 (+1) / 5,124
Data matched 0.55%
Units complete 120 / 141
✅ Newly matched (1)
  • func_L01_002F0728 (296 bytes)

Commit 3952e00 · Ratchet & Clank (PAL) on ByteMatch

@Lynder063
Lynder063 merged commit 3973b6b into OpenRAC:main Oct 20, 2026
1 check 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