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..
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:
FumenHeader
class with individual (correctly-named!) attributes for each 4-byte integer.Necessary for #40. Fixes #44.