WIP: Implement texture files #191

Draft
lucas wants to merge 14 commits from feat/textures into master
Owner

Current status:

  • Decompilation: Partial
    Depending on the type of DDS data, either the largest mipmap is extracted, or the raw DDS file is dumped
  • Compilation: Broken
    Theoretically correct process to compile a DDS file, but the game crashes with an UTF-8 error. It seems that textures cannot be fully inlined into the bundle and a data file must be used one way or another.

Wiki entries:

Current status: - Decompilation: Partial Depending on the type of DDS data, either the largest mipmap is extracted, or the raw DDS file is dumped - Compilation: Broken Theoretically correct process to compile a DDS file, but the game crashes with an UTF-8 error. It seems that textures cannot be fully inlined into the bundle and a data file must be used one way or another. Wiki entries: - [File Type - Texture](https://git.sclu1034.dev/bitsquid_dt/dtmt/wiki/File+Type+-+Texture.-) - [Reverse Engineering - Textures](https://git.sclu1034.dev/bitsquid_dt/dtmt/wiki/Reverse+Engineering+-+Textures.-)
lucas force-pushed feat/textures from fecffb5f60 to ea2368c532 2025-02-19 11:14:36 +01:00 Compare
lucas reviewed 2025-02-19 15:35:55 +01:00
lucas added 2 commits 2025-03-06 13:34:26 +01:00
Due to the large amount of variants, and the different kind of values
connected to each variant (hash, extension name) being scattered
across the various `impl` blocks, the file became rather convoluted.

While I don't generally like the indirection of macros or meta
programming, it's not that bad with Rust, thanks to Rust Analyzer being
able to attach diagnostics to the source inside the macro definition,
and the ability to generate the macro's output for validation.

Therefore, the new macro allows putting all data used for this enum
definition into a single block.
Only use texture files for texture-meta command
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
7384d3359c
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
Required
build/msvc Build for the target platform: msvc
Required
build/linux Build for the target platform: linux
Required
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/textures:feat/textures
git checkout feat/textures
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: bitsquid_dt/dtmt#191
No description provided.