153 buf[1] = (c>>8)&0xff;
154 buf[2] = (c>>16)&0xff;
170 SZ_Write (sb, (
unsigned char *)&dat.l, 4);
251 memset(
buf, 0,
sizeof(*
buf));
369 while (l < numbytes && !sb->badread)
void MSG_WriteCoord32f(sizebuf_t *sb, float f)
void MSG_BeginReading(sizebuf_t *sb)
int MSG_ReadBigShort(sizebuf_t *sb)
char * MSG_ReadString(sizebuf_t *sb, char *string, size_t maxstring)
void StoreBigShort(unsigned char *buffer, unsigned short i)
Encode a big endian 16bit int to the given buffer.
float BuffLittleFloat(const unsigned char *buffer)
Extract a little endian 32bit float from the given buffer.
float MSG_ReadAngle(sizebuf_t *sb, protocolversion_t protocol)
void MSG_WriteShort(sizebuf_t *sb, int c)
void MSG_ReadVector(sizebuf_t *sb, vec3_t v, protocolversion_t protocol)
float MSG_ReadAngle32f(sizebuf_t *sb)
void MSG_WriteString(sizebuf_t *sb, const char *s)
float MSG_ReadCoord32f(sizebuf_t *sb)
void MSG_WriteAngle16i(sizebuf_t *sb, float f)
void StoreLittleShort(unsigned char *buffer, unsigned short i)
Encode a little endian 16bit int to the given buffer.
float MSG_ReadLittleFloat(sizebuf_t *sb)
size_t MSG_ReadBytes(sizebuf_t *sb, size_t numbytes, unsigned char *out)
short BuffLittleShort(const unsigned char *buffer)
Extract a little endian 16bit short from the given buffer.
void MSG_WriteLong(sizebuf_t *sb, int c)
int MSG_ReadBigLong(sizebuf_t *sb)
void MSG_InitReadBuffer(sizebuf_t *buf, unsigned char *data, int size)
void MSG_WriteCoord(sizebuf_t *sb, float f, protocolversion_t protocol)
float MSG_ReadCoord13i(sizebuf_t *sb)
float MSG_ReadAngle8i(sizebuf_t *sb)
float MSG_ReadAngle16i(sizebuf_t *sb)
void MSG_WriteByte(sizebuf_t *sb, int c)
void MSG_WriteFloat(sizebuf_t *sb, float f)
void MSG_WriteVector(sizebuf_t *sb, const vec3_t v, protocolversion_t protocol)
float BuffBigFloat(const unsigned char *buffer)
Extract a big endian 32bit float from the given buffer.
void MSG_WriteAngle(sizebuf_t *sb, float f, protocolversion_t protocol)
float MSG_ReadBigFloat(sizebuf_t *sb)
int BuffLittleLong(const unsigned char *buffer)
Extract a little endian 32bit int from the given buffer.
float MSG_ReadCoord(sizebuf_t *sb, protocolversion_t protocol)
void MSG_WriteUnterminatedString(sizebuf_t *sb, const char *s)
void MSG_WriteAngle32f(sizebuf_t *sb, float f)
int MSG_ReadLittleLong(sizebuf_t *sb)
float MSG_ReadCoord16i(sizebuf_t *sb)
int MSG_ReadLittleShort(sizebuf_t *sb)
short BuffBigShort(const unsigned char *buffer)
Extract a big endian 16bit short from the given buffer.
void MSG_WriteCoord13i(sizebuf_t *sb, float f)
size_t MSG_ReadString_len(sizebuf_t *sb, char *string, size_t maxstring)
Same as MSG_ReadString except it returns the number of bytes written to *string excluding the \0 term...
void StoreLittleLong(unsigned char *buffer, unsigned int i)
Encode a little endian 32bit int to the given buffer.
void MSG_WriteChar(sizebuf_t *sb, int c)
void StoreBigLong(unsigned char *buffer, unsigned int i)
Encode a big endian 32bit int to the given buffer.
int BuffBigLong(const unsigned char *buffer)
Extract a big endian 32bit int from the given buffer.
void MSG_WriteAngle8i(sizebuf_t *sb, float f)
void MSG_WriteCoord16i(sizebuf_t *sb, float f)
unsigned char * SZ_GetSpace(sizebuf_t *buf, int length)
void SZ_Write(sizebuf_t *buf, const unsigned char *data, int length)
@ PROTOCOL_DARKPLACES2
various changes
@ PROTOCOL_DARKPLACES4
various changes
@ PROTOCOL_NEHAHRABJP2
same as NEHAHRABJP but with 16bit soundindex
@ PROTOCOL_DARKPLACES3
uses EntityFrame4 entity snapshot encoder/decoder which is broken, this attempted to do partial snaps...
@ PROTOCOL_NEHAHRABJP
same as QUAKEDP but with 16bit modelindex
@ PROTOCOL_QUAKEDP
darkplaces extended quake protocol (used by TomazQuake and others), backwards compatible as long as n...
@ PROTOCOL_QUAKE
quake (aka netquake/normalquake/nq) protocol
@ PROTOCOL_NEHAHRABJP3
same as NEHAHRABJP2 but with some changes
@ PROTOCOL_NEHAHRAMOVIE
Nehahra movie protocol, a big nasty hack dating back to early days of the Quake Standards Group (but ...
@ PROTOCOL_QUAKEWORLD
quakeworld protocol
@ PROTOCOL_DARKPLACES1
uses EntityFrame entity snapshot encoder/decoder which is a QuakeWorld-like entity snapshot delta com...
#define MSG_ReadByte_opt(sb)
Same as MSG_ReadByte but with no need to copy twice (first to int to check for -1) so each byte can b...
GLsizei const GLchar ** string
GLsizeiptr const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf