normcase(realpath()) kept carved and CARVED apart on macOS, so --out could be written where a later scan reads carved files. The inside check now uses the shared path key.
Co-authored-by: Cursor <cursoragent@cursor.com>
A 0DRP/PSIN pool pointer keeps the 1-based block number in its low 20 bits
and the byte offset above (docs/psin.md, docs/ped_catalogues.md, psin_data).
instance_lists and world_interior_names masked 12 bits, as docs/world.md
said, so a block number of 4,096 or more would have been read as a wrong block.
world_index.split_pointer is now the one decoder for the three tools, and
docs/world.md gives the 20-bit form. Over the 0x7a resources of levels.rpf,
story000.rpf, shared_minigame000.rpf and packs.rpf (232,846), the most blocks
one has is 1,760, and every non-null 0x52 array and 0x42 string pointer has
bits 12-19 at zero, so the counts the tools report don't change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The pool goes through pool_workers.process_workers (61 at most on Windows) and the window count
follows it, so --jobs above the cap no longer fails at pool creation or re-reads extra overlaps.
- A key whose placements carry no position is counted (keys_without_a_placement_position) instead
of ending the run in min() over nothing; inner-item Pos values that are not three finite numbers
(empty, false, too short, past float range) are dropped and counted (malformed_positions).
- The interior-box distance uses the same 1e-6 m face tolerance as the room test (EPS), so a point
on a rotated interior face counts as inside in both measures.
- A names file that is not an InteriorNames table, --start outside the data area (checked before
any worker starts), a negative --start and --limit below 1 each give one line and exit 2.
Full levels.rpf v1.0.2.1 (--jobs 15): summary identical before and after, both new counters 0,
docs/world.md counts unchanged. tests/test_world_interior_names.py: 27 OK (was 20); the 8 new
tests all fail on d90c1ac.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A point exactly on a room face can land 3e-16 m outside after the inverse
rotation (review on #3813: +90 degrees about X, scale XY 1.5 / Z -2), and
the exact-zero test dropped it. Room containment now allows 1e-6 m. The
full levels.rpf v1.0.2.1 counts are unchanged (215 stored, 484 conjugated).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Address review on #3813:
- scale interior and room boxes by each placement's scaleXY/scaleZ before
measuring (negative scales reorder the bounds); 6 of 2,590 placements are
scaled, which moves two room hits per convention and no distances
- refuse an --out that names the archive, the --names file or a path in the
carved folder (exit 2, one line, nothing written)
- count placed interiors only among known definitions; report placed names
with no definition, duplicate interior definitions and repeated JSON keys
(repeated keys keep all their items)
- emit the limbo first-room and a261e0a9 room-key counts the docs quote
- take the median from the already sorted list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add tools/world_interior_names.py: reads CMloArchetypeDef, CMloRoomDef and
CMloInstanceDef from levels.rpf and joins them with the InteriorNames section
of GameShape__Data__LocationNameLoopkup. 1,357 of 1,358 keys are interior
archetype names, all confirmed by the 64-bit key; docs/world.md records the
placement and position measurements.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>