Commit Graph

6 Commits

Author SHA1 Message Date
511a45e886 tex_export.py: --limit must be at least 1
`if a.limit: texs = texs[: a.limit]` read --limit 0 as "no limit" and
exported every texture in the index, and a negative --limit silently
dropped the last textures. --limit is now a positive whole number (an
argparse error otherwise, before the output folder is made), and the
slice runs whenever it is given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:02:09 +01:00
e2edf405c2 tex_export.py: score narrow formats and one-dimensional mips 2026-11-22 00:13:17 +01:00
124f9e5447 Merge pull request #195 from simonbronk 2026-11-21 16:37:29 -05:00
9a713d29c8 Textures: point the carve exporter at the compact layout owner 2026-11-21 21:23:48 +00:00
30267d09b5 tex_export: read the addrlib patterns on first use; add tests
tex_export.py called amd_swizzle.load() at import, so the module could not
be imported (or tested) without Mesa's gfx10SwizzlePattern.h. The patterns
are now read once, on the first eq4k call; behaviour is otherwise unchanged.

tests/test_tex_export.py (pytest, skipped without numpy) covers, on
synthetic swizzle equations and textures, with no game data or header:
eq4k picking the entry per bpe and reading the patterns once; detile
offsets (row-major for a linear equation, a permutation of whole tiles,
partial tiles padded); the DX10 DDS header; export_one choosing the top mip
at the data offset or at the end of the mip chain on both scoring paths
(Pillow and raw bytes), gpu_chain reassembly, the blob cache, unsupported
formats and data outside the blob; and main()'s log, ordering and --limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 22:07:09 +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