A single-mip texture puts the first and last candidates at the same offset. The duplicate was displayed as a second candidate, obscuring the distinction between actual alternatives.
The probe opened only the first carved file of a texture's GPU blob (`t["gpu"]`) and ignored
`gpu_chain`, which tex_export.py joins. A texture whose data runs into a later part fit no
candidate and was dropped from the ranking without a line. gpu_blob() now reads every part in
order, as tex_export does; a texture that still fits no candidate prints a "skipped" line, and the
run ends with "probed N of M textures; K skipped".
Real data (counts only), my 1.0.2.1 texture index, all textures of 256 px or more:
- BC1: main ranks 33 of 42 (23 of the 42 have a multi-part chain); this change ranks 42 of 42.
The 9 added winners are 4K_S last x6, 4K_S first x2, 4K_S3 first x1.
- BC3: main 65 of 66, now 66 of 66.
Every row main printed is unchanged (33/33, 65/65).
Tests: test_probe_reports_available_candidates gains blobs split over 2 and 3 carved files
(main: no candidate, the texture vanishes); the expected output of the existing cases now ends
with the probed/skipped total.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows a redirected stdout uses the console's ANSI code page, and python -I ignores PYTHONUTF8 and
PYTHONIOENCODING, so a caller path with a character outside that code page ended a run with
UnicodeEncodeError as soon as a tool printed it. #1406 fixed make_game.py; every CLI tool in tools/ now starts
its __main__ block the same way (stdout errors="replace").
tests/test_tool_stdout_encoding.py checks every tool's __main__ block and reruns two measured crashes
(analyze_4240_full.py, meshlet_page.py) with a private-use-named input. Found by @abilliontokens.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes unmanaged open() calls in tools/tex_export.py, tools/tex_mode_probe.py,
tools/shader_disasm.py, tools/hashdict.py, and tools/d3d12_xs_surface.py to avoid
leaking file descriptors and ResourceWarning under Python 3.12+. Expands
tests/test_resource_hygiene.py to cover these tools.
--n was a plain int used as texs[: a.n]: --n 0 probed nothing and
printed "winners: []" as if it had run, and a negative --n silently
dropped the last textures. --n is now a positive whole number, an
argparse error otherwise, before the addrlib tables are loaded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shader pipeline (carve, FSSM unpack, gfx1013 disassembly, RDNA2 to SPIR-V),
asset export via rpf9-explorer's Core (submodule), PE loader and shim
skeleton, and make_game.py, which builds from the user's own copy of the game.
No game data, keys or executables are included.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>