ec04c13fbd
Silence more dead code warnings
...
This is intentional, for various reasons between binrw limitations and
code that isn't used directly in Physis.
2024-06-29 09:33:23 -04:00
c41c160338
Fix oversight with u32 offsets used in index files API
...
This breaks on Dawntrail's gigantic files, but this also breaks API...
2024-06-28 05:53:42 -04:00
e5caab2e64
Run rustfmt and fix more Clippy warnings
2024-05-18 09:42:07 -04:00
a1a50de62e
Support chunked dat/index files
...
Needed for grabbing later expansion content that's split between chunks.
2024-05-04 14:20:45 -04:00
d5b3b8a468
Run cargo fmt
2024-04-20 13:18:03 -04:00
f460f5b944
Add invalid data test for Index/Index2
2024-04-16 21:54:56 -04:00
aa62b70498
Don't call unwrap() when reading Index2File
2024-04-16 21:27:41 -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
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
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
0896ef829c
Make hash for index hash table entries public
2023-10-12 18:59:37 -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
0edbcfdf34
Revert "Switch from bitfield-struct to modular-bitfield"
...
This reverts commit 3615adac47
.
2022-10-17 19:50:38 -04:00
3615adac47
Switch from bitfield-struct to modular-bitfield
2022-10-17 19:23:45 -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
d9e79e563a
Reformat code
2022-08-16 11:52:07 -04:00
75f88ba3b6
Clarify that IndexFile::from_existing is not reading index2 files
2022-08-14 23:38:49 -04:00
e094742690
Properly propagate errors up the stack for game_data::extract
2022-08-09 22:43:04 -04:00
22569cf09d
Oops, apparently index and patch platform id sizes are different!
2022-08-09 22:37:40 -04:00
18322a13d2
Handle patching error handling better
...
* Move PlatformId to common module.
* Platform id is no longer hardcoded to win32.
* Parse apply options correctly.
* Parse target info better, use more native structures.
* All errors are now handled properly, and propagated up.
* Added a new Region enum.
* Added todo!() to all unhandled patching branches.
* Paths are now built using PathBuf instead of format!().
* process_patch function is no longer accessible, now you have to use
the function found in GameData and BootData.
2022-08-09 21:51:52 -04:00
03e3d3ca21
Simplify index file return
2022-08-09 20:05:11 -04:00
a262591057
Can't do math, fix index hash table entry size
2022-08-09 19:35:14 -04:00
03f9df66d3
Hardcode index entry size as 24 bytes, since the Rust size doesn't match
2022-08-06 21:19:31 -04:00
389c3fe00b
Add initial files
2022-07-19 19:29:41 -04:00