tfausak / rattletrap

:car: Parse and generate Rocket League replays.
https://hackage.haskell.org/package/rattletrap
MIT License
150 stars 21 forks source link

Stop reversing bytes #189

Closed tfausak closed 3 years ago

tfausak commented 3 years ago

I don't think it's necessary to reverse the bits within a byte, for both reading and writing.

This might get tied up with #188.

tfausak commented 3 years ago

The weird thing here is Rattletrap.BitGet.word8 and Rattletrap.BitPut.word8. Those get/put the lower n bits of a Word8. It seems like they should be the same as their neighboring bits functions, but I think they get the bits in the wrong order. Maybe they can be redefined (word8 = bits) and everything works out?

If so, that means the values produced by word8 are probably wrong. Only two things use BitGet.word8: reservations and game modes. It's not clear what either of those values actually mean, so I can't tell if they're correct or not.