1
0
mirror of synced 2024-11-27 22:40:49 +01:00
tja2fumen/testing
Viv 2a6d1c3df5
Overhaul header metadata code with new FumenHeader Python class (plus use ints, not bytes) (#45)
Previously, I had to reverse engineer many of the bytes in a valid fumen
header. This meant that I was often working with literal byte values, as
well as guessing at what things meant, calling them "padding" or
"unknown".

However, thanks to #44, I now have a TON of knowledge about the correct
purpose of each byte in the header. This lets me properly document each
value's purpose, and it also lets me parse 4-byte groups as ints, rather
than dealing with individual raw bytes.

In summary, the changes in this PR are:

- Create a new `FumenHeader` class with individual (correctly-named!)
attributes for each 4-byte integer.
- Parse and write the fumen header as one big 520-byte chunk, instead of
handling the header in smaller increments.
- Remove a bunch of dead lines of code that were hardcoding specific
byte values, and replace them with proper integer values.
- Vastly simplify the test for valid headers by removing checks against
individual bytes..

Necessary for #40.
Fixes #44.
2023-07-19 14:36:58 -04:00
..
data Fix crash for #SECTION commands that occur before the first #BRANCHSTART (#36) 2023-07-15 11:58:33 -04:00
conftest.py Adapt release workflow to also act as a test suite (#18) 2023-06-29 01:20:46 -04:00
test_conversion.py Overhaul header metadata code with new FumenHeader Python class (plus use ints, not bytes) (#45) 2023-07-19 14:36:58 -04:00