Core/ByteBuffer: Implemented ReadXorByte, usefull when reading guid bytes based on bits
This commit is contained in:
1 parent
166a161f35
commit
7749359269
1 file changed
+13
@@ -194,6 +194,19 @@ class ByteBuffer
|
||||
b ^= read<uint8>();
|
||||
}
|
||||
|
||||
uint8 ReadXorByte()
|
||||
{
|
||||
return ReadUInt8() ^ 1;
|
||||
}
|
||||
|
||||
void ReadXorByte(uint32 bit, uint8& byte)
|
||||
{
|
||||
if (!bit)
|
||||
byte = 0;
|
||||
else
|
||||
byte = ReadUInt8() ^ bit;
|
||||
}
|
||||
|
||||
void WriteByteMask(uint8 b)
|
||||
{
|
||||
WriteBit(b);
|
||||
|
||||
Reference in new issue
Block a user