Implement texture files #191

Open
lucas wants to merge 8 commits from feat/textures into master

8 commits

Author SHA1 Message Date
04b6a43f9a
Only use texture files for texture-meta command
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
2025-05-30 14:23:25 +02:00
cbb3709c89
sdk: Remove unused function 2025-05-30 14:23:23 +02:00
94af8862e8
Implement more texture formats
The second compression method found in the game's code seems to be Zlib,
but it doesn't seem to be used in the game files. What does get used is
a compression type of `0`, which appears to be uncompressed data.

For DDS formats, all the ones that are currently used by in the game
files can be emitted as is. Though for some of them, other tools might
not be able to display them.
2025-05-30 14:23:21 +02:00
9f849ab3ec
sdk: Implement decompiling streamed mipmaps
For now, we only extract the largest mipmap.
2025-05-30 14:23:18 +02:00
63fb0a1c08
Reverse DDSImage::load
Decompiling the game binary shows a rather elaborate algorithm to load
DDS images from binary. Though comparing it to Microsoft's documentation
on DDS, most of it seems to be pretty standard handling.

However, we don't actually need all of it. The part about calculating
pitch and reading blocks only accesses a subset of the `ImageFormat`
struct, so we can strip our implementation to just that.
2025-05-30 14:23:15 +02:00
58071958d2
sdk: Add decompiled SJSON texture file
In addition to the actual image file, also write a `.texture` engine
file.
2025-05-30 14:23:14 +02:00
67f313107e
sdk: Add dictionary group for texture categories 2025-05-30 14:23:11 +02:00
db27dd9f39
feat(sdk): Implement partial texture decompilation 2025-05-30 14:07:34 +02:00