summaryrefslogtreecommitdiffstats
path: root/src/ByteBuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ByteBuffer.h')
-rw-r--r--src/ByteBuffer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ByteBuffer.h b/src/ByteBuffer.h
index adaa00330..e200d2a7b 100644
--- a/src/ByteBuffer.h
+++ b/src/ByteBuffer.h
@@ -64,6 +64,7 @@ public:
bool ReadVarInt (UInt32 & a_Value);
bool ReadVarUTF8String (AString & a_Value); // string length as VarInt, then string as UTF-8
bool ReadLEInt (int & a_Value);
+ bool ReadPosition (int & a_BlockX, int & a_BlockY, int & a_BlockZ);
/** Reads VarInt, assigns it to anything that can be assigned from an UInt32 (unsigned short, char, Byte, double, ...) */
template <typename T> bool ReadVarInt(T & a_Value)
@@ -90,6 +91,7 @@ public:
bool WriteVarInt (UInt32 a_Value);
bool WriteVarUTF8String (const AString & a_Value); // string length as VarInt, then string as UTF-8
bool WriteLEInt (int a_Value);
+ bool WritePosition (int a_BlockX, int a_BlockY, int a_BlockZ);
/** Reads a_Count bytes into a_Buffer; returns true if successful */
bool ReadBuf(void * a_Buffer, size_t a_Count);
@@ -105,6 +107,9 @@ public:
/** Skips reading by a_Count bytes; returns false if not enough bytes in the ringbuffer */
bool SkipRead(size_t a_Count);
+
+ /** Reverse reading by a_Count bytes; returns false if not enough readed bytes in the ringbuffer */
+ bool ReverseRead(size_t a_Count);
/** Reads all available data into a_Data */
void ReadAll(AString & a_Data);