22d431d410
Add actual members of DATriggerData
2025-02-25 19:45:36 -05:00
0474a68f26
Remove (currently) unused DACharacterCommonStatusStruct
...
I forgot where this is from (Player.sav maybe?) but I don't know what it
is yet. I'll add it back once I come across it again.
2025-02-25 19:37:42 -05:00
2e0403beb1
Add a much better, faster and more ergonomic way to parse structs
...
This adds a macro that helps deserialize structs when their properties &
types are known ahead of time. It's sole job is gluing different binrw
macros together so I don't have to.
The nice thing about this is that you have more direct access to the
underlying data.
2025-02-25 19:30:16 -05:00
cdb40e62cc
Improve tagged object deserialization even more
...
Now there should be less random "Nones" and more resilient parsing based
on reported sizes and not EOF.
2025-02-24 18:33:32 -05:00
e725df9374
Hide compressed blocks from binrw output
2025-02-24 18:21:25 -05:00
2ce74d3177
Add TODO about none checks
2025-02-24 18:20:23 -05:00
111af5788d
Add support for SoftObjectProperty
...
With this, my Persistent.sav can be now be parsed without errors!
2025-02-24 18:19:23 -05:00
be82857aba
Find the magical missing bytes at the end of Persistent.sav
...
Turns out there can be multiple compressed blocks in a single .sav file,
so now we read all of them.
2025-02-24 18:15:54 -05:00
153c8610c9
Check magic of compressed .sav files
2025-02-24 17:48:17 -05:00
df33a0aace
Fix DALoadOptionStruct and SaveSlotInfoStruct
2025-02-24 17:47:59 -05:00
8f55d00e24
Complete Persistent.sav parsing, fix up a ton of things
...
This is unfortunately one giant commit, but this now (partially) parses
Persistent.sav. There is still some structs and data left to parse, and
we're suspiciously missing 3KiB of data at the end. But... progress!
2025-02-24 00:30:16 -05:00
02269ecc68
Add roundtrip test for LocalProfile.sav
2025-02-23 17:04:26 -05:00
46e0cb3fb2
Add writing support for MapProperty
2025-02-23 16:52:54 -05:00
0561036f01
Add writing support for ArrayProperty
2025-02-23 16:50:10 -05:00
80b288051c
Add writing support for FloatProperty
2025-02-23 16:39:59 -05:00
ee2de9c9ae
Add writing support for IntProperty
2025-02-23 16:38:57 -05:00
ff87348e42
Add writing support for booleans and BoolProperty
2025-02-23 16:33:25 -05:00
beaa0e784f
Add writing support for strings and StrProperty
2025-02-23 16:31:30 -05:00
8713a48351
De-duplicate all the GUID structs, implement better debug display
...
This replaces several of the duplicate GUID-like structs, and throws
them into a struct that more closely resembles FGuid.
2025-02-23 16:14:44 -05:00
5329fa08b2
Replace fragile string parsing in structs
2025-02-23 16:04:38 -05:00
4eb1e7dd04
Remove old magic-based property enum
...
This is now replaced by the pre_assert and string-based version, which
is superior.
2025-02-23 16:03:08 -05:00
ef0f4adb6f
Replace manual string parsing/old property-magic system in Entry
2025-02-23 16:00:35 -05:00
fe2cb4e624
Remove NameProperty
...
This has the same memory layout as StringProperty, and we don't need to
duplicate the work.
2025-02-23 15:54:17 -05:00
21ab9f2cb0
Fix and simplify string property parsing, add test
...
I figured out what the actual layout of this property is (instead of
guessing, which created some bad results.) And added tests of course!
Also fixed a bug in read_string_with_length() that didn't handle the
case where the string length is zero.
2025-02-23 15:52:21 -05:00
6b7d4c66dd
Improve error handling in the map and array custom parsers
2025-02-23 15:26:52 -05:00
f304304d19
Simplify string reading
...
A lot of them are just u32 length + byte string, and can be moved into
a common parsing function.
2025-02-23 15:25:50 -05:00
a4615b29ce
Remove leftover binrw debugging
2025-02-23 15:04:13 -05:00
e5b9e9150e
Remove currently unused EnumProperty
2025-02-23 15:03:32 -05:00
7766b3cd5d
Further array fixes and a new test
...
I think I'm wrong about the ItemSlots struct, but let's see.
2025-02-23 15:02:08 -05:00
e92686e179
Clean up code, imports, and other misc tasks
2025-02-23 14:43:10 -05:00
9dd335f80e
Implement proper map parsing, fix array parsing
...
Finally finished and figured out how maps are handled. It didn't encode
the number of items, it's based on how many bytes you read. I also fixed
arrays so they're also correct, and we'll see if sets break.
2025-02-23 14:38:35 -05:00
874ca0a968
Use 2024 edition
2025-02-23 11:22:49 -05:00
aa26d2934f
Add initial files
2025-02-19 19:34:13 -05:00