]> git.xonotic.org Git - xonotic/darkplaces.git/blob - qtypes.h
Use stdint.h types instead of self-defined dp[u]int
[xonotic/darkplaces.git] / qtypes.h
1
2 #ifndef QTYPES_H
3 #define QTYPES_H
4
5 #include <stdint.h>
6 #include <stdbool.h>
7 #include <inttypes.h>
8
9 typedef bool qboolean;
10
11 #ifndef NULL
12 #define NULL ((void *)0)
13 #endif
14
15 // up / down
16 #define PITCH   0
17
18 // left / right
19 #define YAW             1
20
21 // fall over
22 #define ROLL    2
23
24 #if defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1400)
25 #define RESTRICT __restrict
26 #else
27 #define RESTRICT
28 #endif
29
30 // LadyHavoc: upgrade the prvm to double precision for better time values
31 // LadyHavoc: to be enabled when bugs are worked out...
32 #define PRVM_64
33 #ifdef PRVM_64
34 typedef double prvm_vec_t;
35 typedef long long prvm_int_t;
36 typedef unsigned long long prvm_uint_t;
37 #else
38 typedef float prvm_vec_t;
39 typedef int prvm_int_t;
40 typedef unsigned int prvm_uint_t;
41 #endif
42 typedef prvm_vec_t prvm_vec3_t[3];
43
44 #ifdef VEC_64
45 typedef double vec_t;
46 #else
47 typedef float vec_t;
48 #endif
49 typedef vec_t vec2_t[2];
50 typedef vec_t vec3_t[3];
51 typedef vec_t vec4_t[4];
52 typedef vec_t vec5_t[5];
53 typedef vec_t vec6_t[6];
54 typedef vec_t vec7_t[7];
55 typedef vec_t vec8_t[8];
56
57 #endif