39d7a5b703
Prevent overflow when loading high resolution textures in certain code paths
...
With the release of Dawntrail, these are now being hit - for example loading the
expansion logo in Astra. These are now converted to usize everywhere so it
prevents this from happening.
2024-06-26 23:45:50 -04:00
e5caab2e64
Run rustfmt and fix more Clippy warnings
2024-05-18 09:42:07 -04:00
c4e9697faa
Support 3D textures
...
We only supported 2D textures, but 3D textures are needed for the tiling
textures.
2024-04-30 18:01:09 -04:00
6f5831e60d
Swap BGRA to RGBA
2024-04-27 21:16:01 -04:00
d5b3b8a468
Run cargo fmt
2024-04-20 13:18:03 -04:00
6e50f03cd9
Fix yet more clippy warnings
2024-04-20 13:17:11 -04:00
79e6f20d86
Oops, remove accidental unwrap commit in Texture
2024-04-20 13:00:07 -04:00
3e00c35bd8
Switch to texture2ddecoder
...
This crate supports more BCn decoders which texpresso doesn't (like
BC7.)
2024-04-20 10:47:43 -04:00
04eecd5030
Add basic support for B4G4R4A4 textures
...
Not sure if it's actually correct, but it works without crashing now.
2024-04-20 10:00:13 -04:00
b9110b58ec
Some code cleanup in texture
2024-04-18 22:07:57 -04:00
7cf6ab8f60
Simplify texture code for now, add actual BC5 support
2024-04-17 20:43:11 -04:00
4b6166f8d0
Add invalid data test for Texture
2024-04-16 22:08:22 -04:00
67eab58c24
Fix some clippy warnings
2023-12-02 20:17:05 -05:00
7eb11e412f
Improve TEX documentation
2023-12-02 19:55:50 -05:00
7a75c170cc
Make a semantic difference between owned and non-owned byte data
2023-10-13 16:16:04 -04:00
4dfd36dbd8
Fix and quiet clippy warnings
2023-09-22 19:17:24 -04:00
2000b978b3
Ensure compliance with REUSE, add to CI
2023-08-06 08:25:04 -04:00
a62c638766
Fix texture loading due to not enough memory
2023-04-06 14:52:04 -04:00
425f755850
Fix clippy warnings about unnecessary deref, useless casts
2023-02-20 16:07:48 -05:00
67d2f035c3
Reformat code with rustfmt
2022-10-20 11:45:55 -04:00
eebe89a4bd
Remove some import warnings
2022-10-13 17:11:28 -04:00
177523831b
Switch a lot more parsers from binread -> binrw
...
This doesn't necessarily mean that these formats support writing (yet)
but just to solve the initial compilation errors.
2022-10-13 17:11:03 -04:00
e86d910594
Update binrw to 0.10.0
...
This introduces a new breaking change, namely that all endianness must
be known. I've done the best I can, but I'll be checking soon.
2022-10-13 16:03:46 -04:00
49bd5987d0
Convert TextureAttribute constants to upper case camel
2022-09-15 16:31:56 -04:00
9819f87fcc
Suppress some warnings
2022-09-15 16:26:31 -04:00
d9e79e563a
Reformat code
2022-08-16 11:52:07 -04:00
3b2038024f
Make texture struct members public
2022-08-11 15:48:28 -04:00
06226cfad1
Expose texture width and height
2022-08-11 15:47:02 -04:00
6554dee2f1
Decompress and return rgba data for textures
2022-08-11 15:03:12 -04:00
0210479fd3
Parse texture attribute and formats
2022-08-11 09:23:15 -04:00
7292ad930a
Add Texture structure, begin reading header
2022-08-09 19:31:32 -04:00