Commit Graph

14 Commits

Author SHA1 Message Date
e61aadda9f swizzle_search, tex_mode_probe: say numpy is missing in one line, as tile_probe does 2026-11-24 16:11:23 +01:00
77c6843825 swizzle_search: report empty candidate searches even without --out (BUILD-1526) 2026-11-23 12:42:56 +05:00
d16a99b1a6 Merge pull request #3697 from Leo Leahy 2026-11-22 17:03:27 -05:00
a8157d08cc Merge pull request #3364 from klarnet2009 2026-11-22 17:01:41 -05:00
487568a1e8 tile_probe, swizzle_search: pack DDSCAPS_TEXTURE before copy, guard layout None and bpe 2026-11-22 18:22:56 -03:00
6fc0263446 fix(swizzle_search): catch ValueError from render on unknown image extension 2026-11-22 23:12:40 +02:00
087ddd9e16 fix(swizzle_search): validate --out path and guard render OSError 2026-11-22 22:15:13 +02:00
b10b4e3252 fix(assets): preview short complete swizzle samples
The search target may require more rows than a valid sample contains. Scoring available complete rows lets short samples reach the PNG preview.
2026-11-22 19:45:29 +01:00
8dc1604e9d fix: prevent swizzle preview from overwriting input 2026-11-22 12:07:02 -03:00
f698bf2206 tools: a path outside the console's code page no longer crashes a tool's output
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>
2026-11-22 11:27:00 +00:00
d4d8e7d7f2 swizzle_search: reject unusable numeric arguments as usage errors 2026-11-21 23:48:32 -06:00
4db2a20db4 swizzle_search: a missing input is one ERROR line, not a traceback
main() opened the blob unguarded, so a path that does not exist, or any other
file I/O failure, escaped as a FileNotFoundError traceback and exited 1. Every
other tool in tools/ reports a missing input as one ERROR line and exits 2, and
#948 fixed the same thing in world_index.py; this was the last one left.

Read the blob inside a try/except OSError and name the file that failed. Nothing
is written before the input is read.

Test: tests/test_swizzle_search.py runs the CLI on a missing path and asserts
exit 2, the ERROR line naming it, and no traceback.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-21 23:17:20 -06:00
73e1bf79bb swizzle_search.py: explain why an empty search cannot produce a preview 2026-11-22 00:23:40 +01:00
db0dc8bd5e Initial commit: Leonida, build-it-yourself PC port groundwork
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>
2026-11-20 15:22:16 -05:00