UFO: Alien Invasion
Doxygen documentation generating
ufotypes.h
Go to the documentation of this file.
1 
9 /*
10 Copyright (C) 2002-2023 UFO: Alien Invasion.
11 
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License
14 as published by the Free Software Foundation; either version 2
15 of the License, or (at your option) any later version.
16 
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 
21 See the GNU General Public License for more details.
22 
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 */
27 
28 #pragma once
29 
30 #include <stddef.h>
31 #include <stdint.h>
32 
33 #ifndef byte
34 typedef uint8_t byte;
35 #endif
36 
37 typedef float vec_t;
38 typedef vec_t vec2_t[2];
39 typedef vec_t vec3_t[3];
40 typedef vec_t vec4_t[4];
41 typedef vec_t vec5_t[5];
42 
43 /* structures that can be mapped to vector arrays since they have the same size. */
44 typedef struct vec2_struct_s {
45  vec_t a1, a2;
47 typedef struct vec3_struct_s {
48  vec_t a1, a2, a3;
50 typedef struct vec4_struct_s {
51  vec_t a1, a2, a3, a4;
53 typedef struct vec5_struct_s {
54  vec_t a1, a2, a3, a4, a5;
56 
57 typedef byte pos_t;
58 typedef pos_t pos3_t[3];
59 typedef pos_t pos4_t[4];
60 
61 /* structures that can be mapped to position arrays since they have the same size. */
62 typedef struct pos3_struct_s {
63  pos_t a1, a2, a3;
65 typedef struct pos4_struct_s {
66  pos_t a1, a2, a3, a4;
68 
69 typedef int ipos_t;
70 typedef ipos_t ipos3_t[3];
71 
72 /* structures that can be mapped to integer position arrays since they have the same size. */
73 typedef struct ipos3_struct_s {
74  ipos_t a1, a2, a3;
76 
77 typedef int32_t actorSizeEnum_t;
78 
79 #if defined _WIN32
80 # define UFO_SIZE_T "%Iu"
81 #else
82 #ifdef __cplusplus
83 #if __WORDSIZE == 64
84 # define UFO_SIZE_T "%lu"
85 #else
86 # define UFO_SIZE_T "%u"
87 #endif
88 #else
89 # define UFO_SIZE_T "%zu"
90 #endif
91 #endif
vec_t a3
Definition: ufotypes.h:48
vec_t a4
Definition: ufotypes.h:51
int ipos_t
Definition: ufotypes.h:69
pos_t a4
Definition: ufotypes.h:66
int32_t actorSizeEnum_t
Definition: ufotypes.h:77
float vec_t
Definition: ufotypes.h:37
vec_t vec5_t[5]
Definition: ufotypes.h:41
pos_t pos4_t[4]
Definition: ufotypes.h:59
ipos_t ipos3_t[3]
Definition: ufotypes.h:70
pos_t a3
Definition: ufotypes.h:63
vec_t a5
Definition: ufotypes.h:54
pos_t pos3_t[3]
Definition: ufotypes.h:58
vec_t a2
Definition: ufotypes.h:45
vec_t vec3_t[3]
Definition: ufotypes.h:39
vec_t vec2_t[2]
Definition: ufotypes.h:38
uint8_t byte
Definition: ufotypes.h:34
ipos_t a3
Definition: ufotypes.h:74
byte pos_t
Definition: ufotypes.h:57
vec_t vec4_t[4]
Definition: ufotypes.h:40