Core/SerializationContext: Replaced currentBitPos and currentByte by [read|write][BitPos][Byte] to handle properly bit reading/writing

This commit is contained in:
Jérôme Leclercq
2018-05-31 16:10:58 +02:00
parent 33fb70b65b
commit 550176e198
5 changed files with 36 additions and 24 deletions

View File

@@ -20,11 +20,14 @@ namespace Nz
{
Stream* stream;
Endianness endianness = Endianness_BigEndian; //< Default to Big Endian encoding
UInt8 currentBitPos = 8; //< 8 means no bit is currently wrote
UInt8 currentByte; //< Undefined value, will be initialized at the first bit write
UInt8 readBitPos = 8; //< 8 means no bit is currently read
UInt8 readByte; //< Undefined value, will be initialized at the first bit read
UInt8 writeBitPos = 8; //< 8 means no bit is currently wrote
UInt8 writeByte; //< Undefined value, will be initialized at the first bit write
void FlushBits();
inline void ResetBitPosition();
inline void ResetReadBitPosition();
inline void ResetWriteBitPosition();
};
}