--- quake2/qcommon/qcommon.h 2018/04/24 17:58:32 1.1 +++ quake2/qcommon/qcommon.h 2018/04/24 17:58:40 1.1.1.2 @@ -4,16 +4,16 @@ #include "../game/q_shared.h" -#define VERSION 3.14 - +#define VERSION 3.17 +#define BASEDIRNAME "baseq2" #ifdef WIN32 #ifdef NDEBUG -#define BUILDSTRING "RELEASE" +#define BUILDSTRING "Win32 RELEASE" #else -#define BUILDSTRING "DEBUG" +#define BUILDSTRING "Win32 DEBUG" #endif #ifdef _M_IX86 @@ -22,8 +22,29 @@ #define CPUSTRING "AXP" #endif -#else // !WIN32 +#elif defined __linux__ + +#define BUILDSTRING "Linux" + +#ifdef __i386__ +#define CPUSTRING "i386" +#elif defined __alpha__ +#define CPUSTRING "axp" +#else +#define CPUSTRING "Unknown" +#endif + +#elif defined __sun__ +#define BUILDSTRING "Solaris" + +#ifdef __i386__ +#define CPUSTRING "i386" +#else +#define CPUSTRING "sparc" +#endif + +#else // !WIN32 #define BUILDSTRING "NON-WIN32" #define CPUSTRING "NON-WIN32" @@ -64,8 +85,7 @@ void MSG_WritePos (sizebuf_t *sb, vec3_t void MSG_WriteAngle (sizebuf_t *sb, float f); void MSG_WriteAngle16 (sizebuf_t *sb, float f); void MSG_WriteDeltaUsercmd (sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd); -void MSG_WriteDeltaEntity (struct entity_state_s *from, struct entity_state_s *to - , sizebuf_t *msg, qboolean force); +void MSG_WriteDeltaEntity (struct entity_state_s *from, struct entity_state_s *to, sizebuf_t *msg, qboolean force, qboolean newentity); void MSG_WriteDir (sizebuf_t *sb, vec3_t vector); @@ -124,8 +144,7 @@ void Info_Print (char *s); void CRC_Init(unsigned short *crcvalue); void CRC_ProcessByte(unsigned short *crcvalue, byte data); unsigned short CRC_Value(unsigned short crcvalue); -int CRC_Block (byte *start, int count); - +unsigned short CRC_Block (byte *start, int count); @@ -139,7 +158,7 @@ PROTOCOL // protocol.h -- communications protocols -#define PROTOCOL_VERSION 31 +#define PROTOCOL_VERSION 33 //========================================= @@ -230,7 +249,7 @@ enum clc_ops_e // user_cmd_t communication -// ms and light allways sent, the others are optional +// ms and light always sent, the others are optional #define CM_ANGLE1 (1<<0) #define CM_ANGLE2 (1<<1) #define CM_ANGLE3 (1<<2) @@ -385,7 +404,7 @@ char *Cmd_Argv (int arg); char *Cmd_Args (void); // The functions that execute commands get their parameters with these // functions. Cmd_Argv () will return an empty string, not a NULL -// if arg > argc, so string operations are allways safe. +// if arg > argc, so string operations are always safe. void Cmd_TokenizeString (char *text, qboolean macroExpand); // Takes a null terminated string. Does not need to be /n terminated. @@ -516,6 +535,7 @@ qboolean NET_CompareBaseAdr (netadr_t a, qboolean NET_IsLocalAddress (netadr_t adr); char *NET_AdrToString (netadr_t a); qboolean NET_StringToAdr (char *s, netadr_t *a); +void NET_Sleep(int msec); //============================================================================ @@ -704,7 +724,7 @@ int Com_ServerState (void); // this s void Com_SetServerState (int state); unsigned Com_BlockChecksum (void *buffer, int length); -byte COM_BlockSequenceCheckByte (byte *base, int length, int sequence); +byte COM_BlockSequenceCRCByte (byte *base, int length, int sequence); float frand(void); // 0 ti 1 float crand(void); // -1 to 1