e5bbde95fd
Don't call unwrap() in writing CharDat files
2024-04-16 21:28:33 -04:00
aa62b70498
Don't call unwrap() when reading Index2File
2024-04-16 21:27:41 -04:00
eeebc3e0f0
Fix benchmark compilation due to recent API changes
2024-04-16 21:26:01 -04:00
d3970754f1
Support filenames without directories in IndexFile
...
This can't happen I don't think, but we should definitely not panic when
it does.
2024-04-16 21:25:53 -04:00
26e89e8873
Remove more dead code
2024-04-16 21:19:08 -04:00
da774529da
Remove overcomplicated internal race macro to a big match statement
...
There's really no reason to use macros for this, let's rewrite it in a
big match statement.
2024-04-16 21:14:59 -04:00
f067b653b1
Add common functions for converting bool back and forth from u8/16
...
Sort of unnecessary, but these are also tested.
2024-04-16 21:03:26 -04:00
eeb877288f
Bump version to 0.3.0
2024-04-15 21:35:29 -04:00
fa4cc1efaa
Add tests for filenames on each platform
2024-04-15 19:49:57 -04:00
57d13f0b21
Remove hardcoded "win32" string in repository filename functions
...
Second part to that recent refactor, so eventually it might be possible
to read DATs from other platforms.
2024-04-15 19:43:16 -04:00
e146b31bd4
Unify Platform enums, use it in GameData API and yet more simplifying
...
So we had a couple copies of a Platform enum, so now there's a public
one in the common module. It wasn't possible to specify what platform
the GameData is, so now it's part of initialization. While I'm at it,
remove the stupid reload_repositories() requirement and make that a
private part of the API.
2024-04-15 19:40:55 -04:00
5c66c51713
Simplify and change Repository API, test it as well
...
We can simplify some of the repository code since there's now two
separate functions for base/expansion repositories. Added tests to make
sure reading doesn't regress like it did before.
2024-04-15 19:25:31 -04:00
7a496f7f3c
Test writing FIIN files, only use filename
...
FIIN files only store the filenames of files, not their absolute path.
This adds tests which test regressions in this behavior.
2024-04-15 19:03:02 -04:00
840682e1d0
Simplify some EXL parsing code
2024-04-15 18:50:01 -04:00
f80b290c4e
Jamcrc should be crate level public
...
This doesn't make any functional difference (because the module isn't
public) but whatever, still want to do it
2024-04-15 18:38:22 -04:00
1c3c75a144
Remove unused import in BootData
2024-04-15 18:24:49 -04:00
73d84441f0
Reduce the amount of unwrap() in cfg, simplify some code
2024-04-15 18:24:32 -04:00
7a3a836566
Add simple tests for checking validity of BootData
2024-04-15 18:07:06 -04:00
611f048e94
Don't call unwrap() in BootData
2024-04-15 18:02:17 -04:00
51e8749b2d
Fold free-standing is_valid() function into BootData
2024-04-15 18:00:42 -04:00
8eee3ec331
Don't enable criterion default features
2024-04-15 17:57:13 -04:00
02d4a5e295
Fix benchmark not compiling, lock retail testing behind the flag
2024-04-15 17:52:05 -04:00
64b8998472
Remove unused glam dependency
...
This was used before we used an internal Havok packfile parser, but it's
no longer needed!
2024-04-15 17:34:15 -04:00
281fb68fca
Take into account the submesh bone map when calculating runtime again
...
This was an accidental commit while testing.
2024-04-14 13:36:27 -04:00
90bd2d334d
Reorganize some functions in EXD
2024-04-14 13:28:43 -04:00
6f12227134
Remove now useless debug message
2024-04-14 13:28:32 -04:00
9e7fc833ef
Don't parse submesh bonemaps in Dawntrail models
...
Not sure if these are completely gone yet, but this is needed to at
least partially load Dawntrail models.
2024-04-14 13:26:51 -04:00
7c3d5a3142
Add new unknown vertex type found in Dawntrail benchmark
...
Not sure what it's used for yet, but needed to be added so parsing
doesn't completely fail.
2024-04-14 13:25:50 -04:00
04025e0707
Make EXL parsing more resilient
...
It now stops tripping up over basic parsing errors and comments.
2024-04-14 13:22:05 -04:00
4fa77965c1
Support index2 files
...
Needed for extracting data from benchmarks, which only ship with this
index file type.
2024-04-14 11:24:18 -04:00
8e6b0dd6b4
Fix issue where patches could panic because file didn't exist
...
Some of the recent boot updates now include patch files that try to
ask us to remove files that were already deleted. Now the patch process
is smarter and will quietly warn that said operation failed but will
continue to chug along.
2024-03-23 11:56:55 -04:00
733a079f9a
Add preliminary support for writing shape keys into MDL files
...
This is not complete as it only deals with the header data and doesn't
append the morphed vertices properly yet.
2024-03-05 17:08:07 -05:00
6bf60b0cfd
Add support for reading shape morphs from MDL
2024-03-02 17:23:55 -05:00
840fb21ba0
Test the replace_vertices function
2024-03-01 15:47:58 -05:00
d75296f4d2
Make the data offset calculations a little bit clearer
2024-03-01 15:47:47 -05:00
ebca076c2d
Begin testing some of the model parsing functions
2024-02-25 10:30:50 -05:00
ed5a9b52b1
Separate the model header updating, and add test
...
This adds the model file for c0201e0038_top but everything but the
header parts are zeroed out to prevent possible copyright infringement.
2024-02-25 10:26:05 -05:00
3389f62340
Implement shape reading/writing, fix runtime size calculation
2024-02-25 09:35:18 -05:00
36027c9a9f
Write out a proper end of stream vertex element
2024-02-25 09:01:59 -05:00
f43812fa55
Fix up padding/unknowns in ModelHeader
2024-02-25 08:54:27 -05:00
4194ec4432
Rename Uint4 to Byte4 so it's clearer
2024-02-25 08:54:16 -05:00
ecc872ead1
Use better constant values for model file header and vertex element
2024-02-25 08:41:03 -05:00
256b3f9305
Add basic support for LGB and TERA files
...
This is for the Novus map editor, although TERA is much more complete
than LGB right now.
2024-02-02 14:20:53 -05:00
872cabb2fa
Support terrain shadow meshes and submesh meshes
...
This should fix most terrain models which has this data filled.
2024-02-02 14:19:36 -05:00
47649dfff5
Support half2 reading/writing
2024-02-02 14:18:58 -05:00
fd43401eae
Protect model file i/o, decls behind visual_data feature
2024-01-31 16:33:53 -05:00
e26c70221e
Oops, half4 positions should not be written as single4
2024-01-29 17:18:13 -05:00
5629cc5551
When writing half4 normals, fill it with 0.0 instead of 1.0
2024-01-29 17:06:24 -05:00
afe809f33c
Store the unknown padding
...
Don't know what it's used for yet still.
2024-01-29 17:05:57 -05:00
f2475c99ce
Remove unused imports in SHPK
2024-01-29 16:22:45 -05:00