DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
qtypes.h
Go to the documentation of this file.
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
qbool
;
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__) || (__clang__) || (__TINYC__) || (_MSC_VER >= 1400)
25
#define RESTRICT __restrict
26
#else
27
#define RESTRICT
28
#endif
29
30
typedef
int8_t
i8
;
31
typedef
int16_t
i16
;
32
typedef
int32_t
i32
;
33
typedef
int64_t
i64
;
34
35
typedef
uint8_t
u8
;
36
typedef
uint16_t
u16
;
37
typedef
uint32_t
u32
;
38
typedef
uint64_t
u64
;
39
40
typedef
intptr_t
iptr
;
41
typedef
uintptr_t
uptr
;
42
43
// LadyHavoc: upgrade the prvm to double precision for better time values
44
// LadyHavoc: to be enabled when bugs are worked out...
45
//#define PRVM_64
46
#ifdef PRVM_64
47
typedef
double
prvm_vec_t
;
48
typedef
int64_t
prvm_int_t
;
49
typedef
uint64_t
prvm_uint_t
;
50
#define PRVM_PRIi PRIi64
51
#define PRVM_PRIu PRIu64
52
#define PRVM_INT_MIN INT64_MIN
53
#define PRVM_INT_MAX INT64_MAX
54
#else
55
typedef
float
prvm_vec_t
;
56
typedef
int32_t
prvm_int_t
;
57
typedef
uint32_t
prvm_uint_t
;
58
#define PRVM_PRIi PRIi32
59
#define PRVM_PRIu PRIu32
60
#define PRVM_INT_MIN INT32_MIN
61
#define PRVM_INT_MAX INT32_MAX
62
#endif
63
typedef
prvm_vec_t
prvm_vec3_t
[3];
64
65
#ifdef VEC_64
66
typedef
double
vec_t
;
67
#else
68
typedef
float
vec_t
;
69
#endif
70
typedef
vec_t
vec2_t
[2];
71
typedef
vec_t
vec3_t
[3];
72
typedef
vec_t
vec4_t
[4];
73
#endif
prvm_uint_t
uint32_t prvm_uint_t
Definition
qtypes.h:57
iptr
intptr_t iptr
Definition
qtypes.h:40
vec_t
float vec_t
Definition
qtypes.h:68
u64
uint64_t u64
Definition
qtypes.h:38
i32
int32_t i32
Definition
qtypes.h:32
vec3_t
vec_t vec3_t[3]
Definition
qtypes.h:71
prvm_vec3_t
prvm_vec_t prvm_vec3_t[3]
Definition
qtypes.h:63
i64
int64_t i64
Definition
qtypes.h:33
u8
uint8_t u8
Definition
qtypes.h:35
uptr
uintptr_t uptr
Definition
qtypes.h:41
qbool
bool qbool
Definition
qtypes.h:9
vec4_t
vec_t vec4_t[4]
Definition
qtypes.h:72
u16
uint16_t u16
Definition
qtypes.h:36
i16
int16_t i16
Definition
qtypes.h:31
prvm_vec_t
float prvm_vec_t
Definition
qtypes.h:55
vec2_t
vec_t vec2_t[2]
Definition
qtypes.h:70
i8
int8_t i8
Definition
qtypes.h:30
prvm_int_t
int32_t prvm_int_t
Definition
qtypes.h:56
u32
uint32_t u32
Definition
qtypes.h:37
qtypes.h
Generated on Mon Mar 10 2025 16:50:17 for DarkPlaces by
1.12.0