Commit graph

535 commits

Author SHA1 Message Date
40b0411330
sdk: Remove unused function 2025-04-22 22:54:49 +02:00
ba1b3c4323
dtmt: Fix file injection
I ended up wrapping the raw data in a `BundleFile` twice.
I also made '--compile' the default, as it should be much less often
that raw data needs to be inserted. Even files that are essentially raw
binary blobs, like `.wwise_event`, still have some custom fields that
need to be accounted for.
2025-04-22 22:54:48 +02:00
bb86584262
Add cmdline to tracing output
Can come in handy when other people report problems and show the error
message or full log, but not the command line.

Setting that span to `level = "error"` ensures that it won't be disabled
by level filters.
2025-04-22 22:54:47 +02:00
51055040c0
Refactor code for file injection 2025-04-22 22:54:46 +02:00
c137cfb90d
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-04-22 22:54:45 +02:00
634fc310ee
sdk: Implement decompiling streamed mipmaps
For now, we only extract the largest mipmap.
2025-04-22 22:48:34 +02:00
aeed53bf88
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-04-22 22:40:21 +02:00
5e19d5cb34
sdk: Add decompiled SJSON texture file
In addition to the actual image file, also write a `.texture` engine
file.
2025-04-22 22:40:20 +02:00
6926dabbab
sdk: Add dictionary group for texture categories 2025-04-22 22:40:18 +02:00
66d1e375b9
dtmt: Add option to compile file when injecting 2025-04-22 22:38:30 +02:00
3cb6687855
feat(sdk): Implement partial texture decompilation 2025-04-22 22:38:26 +02:00
48683638f6
Merge pull request 'chore(deps): update rust crate bincode to v2' (#204) from renovate/bincode-2.x into master
All checks were successful
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
Reviewed-on: #204
2025-04-22 14:51:45 +02:00
f5940f995e
Merge pull request 'Fix build script' (#240) from feat/ci into master
Reviewed-on: #240
2025-04-22 14:51:24 +02:00
5bb0f2acf5
Fix build script 2025-04-22 14:50:37 +02:00
60d9ec0580
Merge pull request 'chore(deps): update rust crate cli-table to 0.5.0' (#210) from renovate/cli-table-0.x into master
Some checks failed
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Reviewed-on: #210
2025-04-22 00:16:24 +02:00
cd4a953a63
Update bincode
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
2025-04-22 00:14:43 +02:00
72ab8811c3
Ignore broken pipe error when printing dictionary
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
stdout closing prematurely is normal behaviour, e.g. piping into `head`.
2025-04-22 00:06:34 +02:00
3c7393f28a
Merge pull request 'chore(deps): update rust crate steamlocate to v2.0.1' (#217) from renovate/steamlocate-2.x-lockfile into master
Some checks failed
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
Reviewed-on: #217
2025-04-22 00:01:30 +02:00
afb5bc0795
chore(deps): update rust crate bincode to v2
Some checks failed
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-04-21 22:01:13 +00:00
ddc69112bc
chore(deps): update rust crate cli-table to 0.5.0
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
2025-04-21 22:01:08 +00:00
cf8daeb3f2
Merge pull request 'fix(deps): update rust crate url to v2.5.4' (#229) from renovate/url-2.x-lockfile into master
Some checks failed
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
Reviewed-on: #229
2025-04-21 23:56:48 +02:00
83de50409b
Fix locating Steam game path
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
2025-04-21 23:55:55 +02:00
6e58449dac
fix(deps): update rust crate url to v2.5.4
All checks were successful
build/linux Build for the target platform: linux
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
2025-04-21 21:46:13 +00:00
bf5c21dd03
chore(deps): update rust crate steamlocate to v2.0.1
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-04-21 21:46:09 +00:00
813b927da0
Merge pull request 'Miscellaneous changes' (#239) from feat/ci into master
Some checks failed
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Reviewed-on: #239
2025-04-21 23:34:39 +02:00
bb6396c932
Fix build script
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
2025-04-21 23:15:08 +02:00
3d05a2395e
Fix clippy warnings 2025-04-21 23:13:36 +02:00
38a023bea6
Move serde_sjson to its own project 2025-04-21 22:52:54 +02:00
9ac13834a1
Commit lock file changes
Seems like Renovate missed this.
2025-04-21 18:45:18 +02:00
1a000371fa
Treat lint warnings as errors in CI
Warnings will not show up if they don't fail CI.
2025-04-21 18:41:59 +02:00
e33e02457b
Merge pull request 'chore(deps): update rust crate minijinja to v2.9.0' (#234) from renovate/minijinja-2.x-lockfile into master
Some checks failed
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Reviewed-on: #234
2025-04-21 18:37:01 +02:00
6aabf8f38b
Merge pull request 'fix(deps): update tokio-tracing monorepo' (#231) from renovate/tokio-tracing-monorepo into master
Some checks failed
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
Reviewed-on: #231
2025-04-21 18:35:44 +02:00
3105edb6b8
Merge pull request 'fix(deps): update rust-futures monorepo to v0.3.31' (#230) from renovate/rust-futures-monorepo into master
Some checks failed
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
Reviewed-on: #230
2025-04-21 18:35:31 +02:00
c3aec656c8
Merge pull request 'fix(deps): update rust crate serde to v1.0.219' (#225) from renovate/serde-monorepo into master
Reviewed-on: #225
2025-04-21 18:35:23 +02:00
95565b3f33
Merge pull request 'fix(deps): update rust crate serde_json to v1.0.140' (#226) from renovate/serde_json-1.x-lockfile into master
Reviewed-on: #226
2025-04-21 18:35:05 +02:00
e783646b02
Merge pull request 'fix(deps): update rust crate thiserror to v2.0.12' (#227) from renovate/thiserror-2.x-lockfile into master
Reviewed-on: #227
2025-04-21 18:34:50 +02:00
2ddbdf867a
Merge pull request 'chore(deps): update rust crate bitflags to v2.9.0' (#232) from renovate/bitflags-2.x-lockfile into master
Some checks failed
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
Reviewed-on: #232
2025-04-21 18:33:52 +02:00
2ec26a1914
Merge pull request 'chore(deps): update rust crate fastrand to v2.3.0' (#233) from renovate/fastrand-2.x-lockfile into master
Reviewed-on: #233
2025-04-21 18:33:35 +02:00
98a5369cfa
Merge pull request 'chore(deps): update rust crate tempfile to v3.19.1' (#235) from renovate/tempfile-3.x-lockfile into master
Reviewed-on: #235
2025-04-21 18:33:22 +02:00
b0fbc445dd
Merge pull request 'chore(deps): update rust crate tokio to v1.44.2' (#236) from renovate/tokio-1.x-lockfile into master
All checks were successful
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Reviewed-on: #236
2025-04-21 18:32:52 +02:00
198c098cde
Merge pull request 'chore(deps): update rust crate zip to v2.6.1' (#237) from renovate/zip-2.x-lockfile into master
Reviewed-on: #237
2025-04-21 18:32:38 +02:00
47cb71ebec
Merge pull request 'fix(deps): update rust crate regex to v1.11.1' (#238) from renovate/regex-1.x-lockfile into master
Reviewed-on: #238
2025-04-21 18:32:18 +02:00
be7b16c5ef
fix(deps): update rust crate regex to v1.11.1
All checks were successful
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
lint/clippy Checking for common mistakes and opportunities for code improvement
2025-04-21 15:47:56 +00:00
bdce3e7787
chore(deps): update rust crate zip to v2.6.1
All checks were successful
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
lint/clippy Checking for common mistakes and opportunities for code improvement
2025-04-21 15:47:48 +00:00
42e2eb7cc1
chore(deps): update rust crate tokio to v1.44.2
All checks were successful
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
lint/clippy Checking for common mistakes and opportunities for code improvement
2025-04-21 15:47:37 +00:00
221a6b8485
chore(deps): update rust crate tempfile to v3.19.1
All checks were successful
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc
lint/clippy Checking for common mistakes and opportunities for code improvement
2025-04-21 15:47:28 +00:00
3f3c4aa321
chore(deps): update rust crate minijinja to v2.9.0
All checks were successful
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
lint/clippy Checking for common mistakes and opportunities for code improvement
2025-04-21 15:47:20 +00:00
c2f02e7ce6
chore(deps): update rust crate fastrand to v2.3.0
All checks were successful
build/linux Build for the target platform: linux
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
2025-04-21 15:47:13 +00:00
be28b7045c
chore(deps): update rust crate bitflags to v2.9.0
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
2025-04-21 15:47:03 +00:00
bcab6e697f
fix(deps): update tokio-tracing monorepo
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-04-21 15:46:56 +00:00