From b1d4b3bb96629b3624e8328d7b1a0bce5333bb7d Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sat, 21 Mar 2015 13:00:20 +0100 Subject: Unified cByteBuffer types. cByteBuffer now reads and writes any of the [U]Int types. --- src/Protocol/Protocol18x.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/Protocol/Protocol18x.h') diff --git a/src/Protocol/Protocol18x.h b/src/Protocol/Protocol18x.h index 92d9825ef..d7365c44f 100644 --- a/src/Protocol/Protocol18x.h +++ b/src/Protocol/Protocol18x.h @@ -169,24 +169,24 @@ protected: m_Out.WriteBool(a_Value); } - void WriteByte(Byte a_Value) + void WriteByte(UInt8 a_Value) { - m_Out.WriteByte(a_Value); + m_Out.WriteBEUInt8(a_Value); } - void WriteChar(char a_Value) + void WriteChar(Int8 a_Value) { - m_Out.WriteChar(a_Value); + m_Out.WriteBEInt8(a_Value); } - void WriteShort(short a_Value) + void WriteShort(Int16 a_Value) { - m_Out.WriteBEShort(a_Value); + m_Out.WriteBEInt16(a_Value); } - void WriteInt(int a_Value) + void WriteInt(Int32 a_Value) { - m_Out.WriteBEInt(a_Value); + m_Out.WriteBEInt32(a_Value); } void WriteInt64(Int64 a_Value) @@ -332,6 +332,9 @@ protected: void StartEncryption(const Byte * a_Key); + /** Converts the BlockFace received by the protocol into eBlockFace constants. + If the received value doesn't match any of our eBlockFace constants, BLOCK_FACE_NONE is returned. */ + eBlockFace FaceIntToBlockFace(Int8 a_FaceInt); } ; -- cgit v1.2.3