Commit graph

12 commits

Author SHA1 Message Date
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