1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-07-04 01:37:45 +00:00
Commit graph

465 commits

Author SHA1 Message Date
061954d73d Add another model flag, reorder 2025-05-17 12:52:20 -04:00
4a48a3bc7a Add more unk model flags to allow more bgparts to load 2025-05-17 12:43:35 -04:00
e2a8c695d7 Add a more exhaustive list of texture formats, support BC7 textures
As seen in certain bgpart model textures.
2025-05-17 12:32:23 -04:00
a905234a18 Add new model flag as seen in some bgparts 2025-05-17 12:04:52 -04:00
f58d4e6bb0 Make indice reading (for models) slightly faster
As suspected - this was a little slow, and can be corroborated with
Hotspot. This is only a marginal increase in performance, it isn't huge
but still worth doing.
2025-05-17 10:22:27 -04:00
39f1c9665f Read BGInstanceObject asset and collision paths, expose LayerHeader 2025-05-14 20:02:37 -04:00
6413a592f0 Implement Clone, Copy for Transformation 2025-05-13 16:44:15 -04:00
6a54c96111 Make transformation struct available in C 2025-05-13 16:43:00 -04:00
76120b2dd0 Handle multiple string columns when writing 2025-05-11 00:48:31 -04:00
8a3e8dad64 Move EXD parsing functions into their own module
It was getting hard to work in here, so I moved all of the
private-API-parsing-things into their own file.
2025-05-10 23:51:22 -04:00
8d94c630ab Improve EXD documentation 2025-05-10 23:41:21 -04:00
0313f75abb Fix how we read/write packed booleans in EXD, add another write test
Apparently we were reading packed booleans wrong the whole time
(whoops!) They are packed into *bytes*, oops... That is fixed now, and I
also expanded write support for packed booleans. It makes the assumption
that the byte is always at the end of the row, but I think that's OK for
now.

I also added a good test-case for this, the PhysicsGroup EXD. It has a
lot of rows, and some packed booleans thrown in. The columns also have
out-of-order column definitions (as in, their offsets don't increase in
order.)
2025-05-10 23:31:53 -04:00
dae35ecfb8 Extend EXD writing to support strings, add new test cases
Now we can re-create OpeningSystemDefine, and is added as a new test
case to test reading/writing string columns. This was actually quite
fun, it turns out that they like aligning the data sections to a 4-byte
boundary for some reason.
2025-05-10 22:55:00 -04:00
36304a2e57 Finish basic EXD write support, add tests for GCShop
Expanding upon the EXH tests of this same data, we can successfully
write it back (hence why it's testdata now!) A lot of the writing logic
is specific for this EXD, but it's a start.
2025-05-10 21:38:47 -04:00
c5613cd431 Add support for writing EXH files
This is an easy format to add write support for, and we can recreate the
"GCShop" EXH which is super simple as it's just one page and one
language.
2025-05-10 19:06:06 -04:00
347631e395 Add helper methods to ColumnData to help convert it to underlying data
It's slightly awkward to get data out of this type, because you have to
match it usually. I have added to_x() members instead to make it much
easier.
2025-05-09 17:58:56 -04:00
70343e1212 Derive Copy, Clone in ExcelColumnDefinition 2025-05-09 17:40:30 -04:00
e751ffa765 Update dependencies, remove bitrotten code, update docs
I updated our dependencies like binrw to 0.15, which is pretty nice as
that means we no longer depend on Syn 1.x. I also finally upgraded to
bitflags 2.x, which doesn't really mean anything except we're on
better supported version.

Additionally, I removed some bitrotten code that no longer compiles.
This was mostly benchmark stuff, but since I don't actively keep track
of that I felt it was better to remove it. I can always add it back once
I'm ready to tackle that again.
2025-05-09 15:16:23 -04:00
940edac964 Add method to get the *total* patch size on disk
Apparently X-Patch-Length is only for the base repository, and so isn't
a reliable indicator. But it's pretty simple to add them all together to
get a close number.
2025-05-06 15:11:44 -04:00
f822aabb94 Fix more test breakages 2025-05-05 17:56:14 -04:00
62b13f557a Early exit in GameData::parse_repository_category if no repositories are available 2025-05-05 17:19:39 -04:00
270eee992b Check if boot version file exists before reading it 2025-05-05 17:15:16 -04:00
ceeb56fabe Allow constructing invalid/empty BootData
For the same reasons as outlined wrt GameData in the previous commit.
2025-05-05 17:13:00 -04:00
a9a3538d85 Remove possibility of None from GameData::from_existing
This simplifes the handling of "new installs" in applications like
Astra, who may end up calling GameData::apply_patch on an "invalid"
GameData struct. We should allow applications to still hold onto these
so it keeps track of game_directory.
2025-05-05 17:07:49 -04:00
da094ea261 Fix patch length parsing, add tests for it
I don't know how this ever worked, but this was broken. I added checks
for it in the patchlist parsing so it doesn't break again.
2025-05-05 16:53:46 -04:00
5efa3c9663 Add EXD::get_row function 2025-04-28 23:36:51 -04:00
cf25a7f91f Remove more launcher-only functions from Physis
These are now being moved to the separate Miscel library that can be
used standalone with Astra.
2025-04-28 22:58:51 -04:00
75a3eafaf2 Remove non-applicable comment on Language::None 2025-04-28 22:49:39 -04:00
6f0e85e143 Move dat to save data module 2025-04-28 22:48:45 -04:00
60493f8234 Remove custom string map functions in fiin parser 2025-04-28 22:46:11 -04:00
b7ab90e811 Fix Index2 parsing
This was a mess-up from a previous refactor, reading files from Index2
should work again!
2025-04-28 22:33:52 -04:00
e29e1bfde9 Revert some of the EXD reading changes to fix Item sheet parsing 2025-04-28 21:59:07 -04:00
e055bcce9b Fix model test due to moved path 2025-04-28 17:18:45 -04:00
1e28c05f3a Move log to save data module 2025-04-28 17:09:25 -04:00
da8bcf13c1 Move save data formats to their own module
I was struggling to think of a way to categorize these for a while, but
I believe these are referred to as "SaveData" internally. Anyway, that's
a good name!
2025-04-28 17:07:35 -04:00
61a24971c2 Move model stuff to it's own module 2025-04-28 16:57:02 -04:00
26c4041b68 Refactor EXD parsing, begin adding write support 2025-04-28 16:42:32 -04:00
cdc39ad4b6
Partial map write support (#9)
This adds initial support for writing new/modified maps, which are made up of layer groups (LGB) and terrain (TERA). Neither one is really tested yet, but I started checking some simple examples and it seems to work.
2025-04-13 18:34:18 -04:00
d2e724227b Add missing REUSe metadata 2025-03-31 16:11:23 -04:00
99238d9b5a Add TryFrom implementations for Race, Tribe, Gender 2025-03-31 16:04:28 -04:00
06e1bb0ead Improve race documentation a bit 2025-03-31 15:46:19 -04:00
49698c7f21 Check for invalid race/tribe combinations in get_race_id 2025-03-31 15:42:56 -04:00
baf0df4858 Rename "Subrace" to "Tribe"
Everything uses this terminology, from other projects to the game itself
(internally and in the UI.)
2025-03-31 15:38:42 -04:00
50ea4dde40 Begin Race and Subrace enums at 1
This simplifies charsave parsing and will be useful in other projects
like Kawari.
2025-03-31 15:33:57 -04:00
a34361b956 Try to reject erreonous planner.lgb files 2025-03-28 22:09:39 -04:00
eee7d5867f Add some derives for ColumnDataType 2025-03-23 19:41:19 -04:00
8c7ba051ed Add repr(C) to ColumnDataType 2025-03-23 19:38:03 -04:00
c6baabd404 Remove repr(C) from CharacterData 2025-03-23 19:28:14 -04:00
9fb0655ac5 Expose Hash struct 2025-03-23 19:21:03 -04:00
2db0717141 Fix EXD test 2025-03-23 18:40:44 -04:00