X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qtypes.h;h=69600ec163868685e3a4e4e924747a436ba35f21;hb=1c1c1d842e8930e8c09eea8e877f07a829858d5a;hp=6521899965ea6993427e3b0ec53424b9ee311044;hpb=2faff26f69150bd8b672cb96556c4028a292cdd5;p=xonotic%2Fdarkplaces.git diff --git a/qtypes.h b/qtypes.h index 65218999..69600ec1 100644 --- a/qtypes.h +++ b/qtypes.h @@ -3,16 +3,10 @@ #define QTYPES_H #include - -#ifndef __cplusplus -#ifdef _MSC_VER -typedef enum {false, true} bool; -#else #include -#endif -#endif -typedef bool qboolean; +#include +typedef bool qbool; #ifndef NULL #define NULL ((void *)0) @@ -27,26 +21,27 @@ typedef bool qboolean; // fall over #define ROLL 2 -#if defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1400) +#if defined(__GNUC__) || (__clang__) || (__TINYC__) || (_MSC_VER >= 1400) #define RESTRICT __restrict #else #define RESTRICT #endif -typedef long long dpint64; -typedef unsigned long long dpuint64; - // LadyHavoc: upgrade the prvm to double precision for better time values // LadyHavoc: to be enabled when bugs are worked out... -#define PRVM_64 +//#define PRVM_64 #ifdef PRVM_64 typedef double prvm_vec_t; -typedef long long prvm_int_t; -typedef unsigned long long prvm_uint_t; +typedef int64_t prvm_int_t; +typedef uint64_t prvm_uint_t; +#define PRVM_PRIi PRIi64 +#define PRVM_PRIu PRIu64 #else typedef float prvm_vec_t; -typedef int prvm_int_t; -typedef unsigned int prvm_uint_t; +typedef int32_t prvm_int_t; +typedef uint32_t prvm_uint_t; +#define PRVM_PRIi PRIi32 +#define PRVM_PRIu PRIu32 #endif typedef prvm_vec_t prvm_vec3_t[3];