mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #717] [MERGED] OLD-7482: restore old upstream PR 7482 - instance_lists, world_interior_names, world_lights_paths: read the block number from 20 bits #755
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#755
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/717
Author: @aslan2142
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:resource-pointer-width📝 Commits (2)
9898deeinstance_lists, world_interior_names: read the block number from 20 bits, as world_index and psin_data do0cbc402world_lights_paths: read pool references through world_index.split_pointer📊 Changes
10 files changed (+59 additions, -14 deletions)
View changed files
📝
docs/world.md(+6 -1)📝
docs/world_lights_paths.md(+2 -2)📝
tests/test_instance_lists.py(+9 -0)📝
tests/test_world_index.py(+8 -0)📝
tests/test_world_interior_names.py(+8 -0)📝
tests/test_world_lights_paths.py(+10 -1)📝
tools/instance_lists.py(+2 -2)📝
tools/world_index.py(+7 -1)📝
tools/world_interior_names.py(+2 -3)📝
tools/world_lights_paths.py(+5 -4)📄 Description
Claimed in the coordination issue as: OLD-7482 https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7131947083
Restoration of my original pull request, old upstream PR 7482 in
ItsNotRexed/Leonida, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Rebased onto main at51f3160923; the two commits cherry-picked without conflicts and are unchanged.What and why
docs/psin.md,docs/ped_catalogues.md,tools/psin_data.py).instance_listsandworld_interior_namesmasked only 12 bits, asdocs/world.mdsaid. A block number of 4,096 or more would be read as the wrong block.world_lights_paths(Meta.ref) also read 12 bits. It refused any pointer with bits 12-19 set as a pool reference, so a pointer to block 4,096 or above fell through to the system-pointer path.world_index.split_pointeris now the one decoder for all three tools and forworld_indexitself, which already read 20 bits inline.docs/world.mdanddocs/world_lights_paths.mdnow give the 20-bit form.split_pointerhas its own test.old-pr/10049) touchestools/instance_lists.py,tests/test_instance_lists.pyanddocs/world.mdtoo;git merge-treefinds no conflict with it.Tested
Linux, Python 3.14, CPU only, synthetic inputs only (no game files).
mainwith only this PR's tests added: the 4 new tests fail (3 FAIL, 1 ERROR).python -I:tests/test_instance_lists.py: 17 tests OK.tests/test_world_index.py: 47 tests OK (5 skipped, as onmain).tests/test_world_interior_names.py: 28 tests OK.tests/test_world_lights_paths.py: 32 tests OK (1 skipped, as onmain).python -m compileall -q tools tests,git diff --checkandpython -I scripts/check_no_game_data.pyon the 10 changed files: clean.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)AI-assisted (Claude Code, Claude Opus 5.5).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.