twhl-community / halflife-updated

Half-Life SDK updated to compile under VS2019 and 2022. Check README.md for more information.
Other
382 stars 146 forks source link

Save FIELD_BOOLEAN as byte array #65

Closed SamVanheer closed 2 years ago

SamVanheer commented 2 years ago

The FIELD_BOOLEAN type is currently saved as an array of integers. Save it as an array of bytes instead. This saves space in the save game, but more importantly prepares for the switch from the 4 byte BOOL type to the implementation-defined size[^1] bool type.

[^1]: See C++ Standard, section 5.3.3: expr.sizeof