diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-08 17:02:54 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-08 17:02:54 +0200 |
commit | 8f8693a71eb896ccc7c14c4033ae8d07dae27ac3 (patch) | |
tree | 8c9e19b4c5155eae5986943293a6cd8f77c8b831 /src/ByteBuffer.h | |
parent | Updated chunk sending to 1.8 (diff) | |
download | cuberite-8f8693a71eb896ccc7c14c4033ae8d07dae27ac3.tar cuberite-8f8693a71eb896ccc7c14c4033ae8d07dae27ac3.tar.gz cuberite-8f8693a71eb896ccc7c14c4033ae8d07dae27ac3.tar.bz2 cuberite-8f8693a71eb896ccc7c14c4033ae8d07dae27ac3.tar.lz cuberite-8f8693a71eb896ccc7c14c4033ae8d07dae27ac3.tar.xz cuberite-8f8693a71eb896ccc7c14c4033ae8d07dae27ac3.tar.zst cuberite-8f8693a71eb896ccc7c14c4033ae8d07dae27ac3.zip |
Diffstat (limited to 'src/ByteBuffer.h')
-rw-r--r-- | src/ByteBuffer.h | 5 |
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); |