1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-22 12:47:45 +00:00
Commit graph

38 commits

Author SHA1 Message Date
d5b3b8a468 Run cargo fmt 2024-04-20 13:18:03 -04:00
2af1543c9b Fix index2 files never being added to GameData 2024-04-17 17:21:52 -04:00
26e89e8873 Remove more dead code 2024-04-16 21:19:08 -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
6f12227134 Remove now useless debug message 2024-04-14 13:28:32 -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
06c13853c3 Improve gamedata documentation 2023-12-02 20:12:12 -05:00
b210782af0 Don't use println 2023-11-10 17:25:53 -05:00
b147027e58 Allow exists() to return false if all index files are invalid 2023-11-10 17:20:12 -05:00
63cfa56074 Check if index file is valid before caching 2023-11-10 17:17:34 -05:00
b180adeb44 Improve performance when extracting files by caching open index files
In Hotspot it was revealed that a huge chunk of performance is lost due
to repeated IndexFile::from_existing calls, which may be on the same
index file. Now GameData transparently keeps a cache of these in memory
which speeds up the slowest link here.
2023-10-13 16:58:08 -04: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
9a004e705d Fix more warnings 2023-07-30 08:58:59 -04:00
b3debd7839 Stop crashing on first boot, with no expansions installed 2023-05-13 17:30:15 -04:00
22b645ec3b Allow GameData::read_excel_sheet to fial 2023-04-09 15:35:54 -04:00
49ed178bb2 Add GameData::get_all_sheet_names()
To replace libxiv's function of the same name, used by Novus
2023-04-09 15:35:42 -04:00
540341cf57 Add logging crate 2023-04-06 14:51:40 -04:00
4c9987a236 Derive Debug for RepairError 2023-03-31 17:30:30 -04:00
425f755850 Fix clippy warnings about unnecessary deref, useless casts 2023-02-20 16:07:48 -05:00
dfda25111a Minor formatting and linter fixes 2022-12-17 08:23:19 -05:00
6e6aa896a6 Run rustfmt 2022-10-25 13:02:06 -04:00
d17f860f07 Allow naive repairing of version files
Currently, we not handle repairing version files well, so I
sought to seek a solution to the problem. This is one of part of the
puzzle, by implementing a simple "game repair". This is not
IndexedZiPatch support, but simply checking if we can restore version
files if possible, or otherwise wipe the directory.
2022-10-25 11:03:05 -04:00
a9fa6d714a Use read_le instead of manually passing ReadOptions 2022-10-17 19:24:02 -04:00
d9e79e563a Reformat code 2022-08-16 11:52:07 -04:00
c7184cb36f Fix Clippy warnings and errors 2022-08-16 11:50:18 -04:00
c609974fe2 Fix warning in doctest 2022-08-09 23:44:11 -04:00
6f9b5c59d7 Fix misc warnings 2022-08-09 23:39:15 -04:00
e094742690 Properly propagate errors up the stack for game_data::extract 2022-08-09 22:43:04 -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
ba5d8bc628 Create get_dat_file function 2022-08-09 20:03:18 -04:00
d318dcb788 Use PathBuf in get_index_file 2022-08-09 20:00:02 -04:00
4d86af88c1 Fix another typo 2022-08-06 18:05:16 -04:00
be9c850fc1 Remove some warnings 2022-07-27 21:21:50 -04:00
ca4962c876 Add EXH and EXD parsers 2022-07-21 19:58:58 -04:00
389c3fe00b Add initial files 2022-07-19 19:29:41 -04:00