Skip texture dictionaries when scanning for drawable dictionaries #9
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/breadbbbb--rpf9-explorer!9
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/9/head"
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?
@cxchhh on GitHub · 2026-11-22 03:51 UTC · original
cxchhh:codex/skip-texture-dictionaries→main· +37 −4 · 2 files · 1 commits · merged 2026-11-22 09:44 UTCWhy
LooksLikeDrawableDictionarychecks only the dictionary header (page map, key and value arrays, matching counts). Texture dictionaries have the same header, so every texture dictionary becomes a model candidate.Probethen rejects it, because its values are textures and not embedded drawables. The scan reports these as candidates that do not recover:917e9b9textures.rpfdata.rpfpack/shared_minigame000pack/core_restofworldlevels.rpfpacks.rpf,pack/story000,story000_restofworldRecovered resources, decoded models (350,251, counting each dictionary child), vertices and triangles are identical with and without this PR in every archive. Only the 2,608 candidates that never recover go away, so the candidates that fail drop from 2,638 to 30. Every scan, recovery and decode was run on the 1.0.2.1 package.
In
levels.rpf, 1,037 candidates fail at917e9b9. 1,009 of them are texture dictionaries rather than models that fail to decode. That is the same count as the 1,009 tail-page rejects reported in ItsNotRexed/Leonida#29.Change
LooksLikeDrawableDictionaryalso requires the first value to passLooksLikeDrawableHeader(…, embedded: true). If the bytes it is given do not reach the first value, the header alone decides, as before, andProbestill checks every child.DrawableDictionaryCheckBytesreturns how many system bytes are needed to see the first value's header.Drawables, fragments and drawable dictionaries are recovered exactly as before; see the table.
Tests
mainignoresTests/, so there is no test project in the PR. A fixture is below; it builds a two-child drawable dictionary and the same dictionary with a non-drawable first value. It checks:Without the change it fails at "a dictionary of non-drawables is not a drawable dictionary". The fixture is generated in code and contains no game data.
Copy both files to
Tests/DictionaryCandidateSmoke/and rundotnet run --project Tests/DictionaryCandidateSmoke -c Release.Tests/DictionaryCandidateSmoke/DictionaryCandidateSmoke.csprojTests/DictionaryCandidateSmoke/Program.csTesting environment
Tested on Linux x64 with .NET SDK 8.0.428, CPU only.
Corebuilds with warnings as errors. I could not build the Windows app on this machine, and the app code is unchanged.AI-assisted: an AI agent (Claude, Anthropic) did the investigation, code, tests and measurements on the author's behalf. No game data is included here.
🤖 Generated with Claude Code