]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.h
fix for EF_FLAME and lots of other bugs with 16bit/8bit fields (modelindex, frame...
[xonotic/darkplaces.git] / common.h
index 7d084f47f3fbc55ab44e16fd9bb2bb52ec9d6e73..98753e272918acb28169b3a44a8a115808c61724 100644 (file)
--- a/common.h
+++ b/common.h
@@ -30,7 +30,7 @@ typedef struct sizebuf_s
 {
        qboolean        allowoverflow;  // if false, do a Sys_Error
        qboolean        overflowed;             // set to true if the buffer size failed
-       byte            *data;
+       qbyte           *data;
        mempool_t       *mempool;
        int                     maxsize;
        int                     cursize;
@@ -93,8 +93,7 @@ void MSG_WriteString (sizebuf_t *sb, char *s);
 void MSG_WriteCoord (sizebuf_t *sb, float f);
 void MSG_WriteAngle (sizebuf_t *sb, float f);
 void MSG_WritePreciseAngle (sizebuf_t *sb, float f);
-
-#define MSG_WriteFloatCoord MSG_WriteFloat
+void MSG_WriteDPCoord (sizebuf_t *sb, float f);
 
 extern int                     msg_readcount;
 extern qboolean        msg_badread;            // set if a read goes beyond end of message
@@ -115,14 +114,14 @@ char *MSG_ReadString (void);
 float MSG_ReadCoord (void);
 //float MSG_ReadAngle (void);
 
-#define MSG_ReadFloatCoord MSG_ReadFloat
+float MSG_ReadDPCoord (void);
 
 #define MSG_ReadAngle() (MSG_ReadByte() * (360.0f / 256.0f))
 #define MSG_ReadPreciseAngle() (MSG_ReadShort() * (360.0f / 65536.0f))
 
 #define MSG_ReadVector(v) {(v)[0] = MSG_ReadCoord();(v)[1] = MSG_ReadCoord();(v)[2] = MSG_ReadCoord();}
 
-extern qboolean dpprotocol;
+extern int dpprotocol;
 
 //============================================================================
 
@@ -180,7 +179,7 @@ int COM_FOpenFile (char *filename, QFile **file, qboolean quiet, qboolean zip);
 
 // set by COM_LoadFile functions
 extern int loadsize;
-byte *COM_LoadFile (char *path, qboolean quiet);
+qbyte *COM_LoadFile (char *path, qboolean quiet);
 
 int COM_FileExists(char *filename);