UFO: Alien Invasion
Loading...
Searching...
No Matches
ufotypes.h
Go to the documentation of this file.
1
8
9/*
10Copyright (C) 2002-2025 UFO: Alien Invasion.
11
12This program is free software; you can redistribute it and/or
13modify it under the terms of the GNU General Public License
14as published by the Free Software Foundation; either version 2
15of the License, or (at your option) any later version.
16
17This program is distributed in the hope that it will be useful,
18but WITHOUT ANY WARRANTY; without even the implied warranty of
19MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
21See the GNU General Public License for more details.
22
23You should have received a copy of the GNU General Public License
24along with this program; if not, write to the Free Software
25Foundation, 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
34typedef uint8_t byte;
35#endif
36
37typedef float vec_t;
38typedef vec_t vec2_t[2];
39typedef vec_t vec3_t[3];
40typedef vec_t vec4_t[4];
41typedef vec_t vec5_t[5];
42
43/* structures that can be mapped to vector arrays since they have the same size. */
44typedef struct vec2_struct_s {
47typedef struct vec3_struct_s {
50typedef struct vec4_struct_s {
53typedef struct vec5_struct_s {
56
57typedef byte pos_t;
58typedef pos_t pos3_t[3];
59typedef pos_t pos4_t[4];
60
61/* structures that can be mapped to position arrays since they have the same size. */
62typedef struct pos3_struct_s {
65typedef struct pos4_struct_s {
68
69typedef int ipos_t;
70typedef ipos_t ipos3_t[3];
71
72/* structures that can be mapped to integer position arrays since they have the same size. */
73typedef struct ipos3_struct_s {
76
77typedef 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
pos_t pos3_t[3]
Definition ufotypes.h:58
byte pos_t
Definition ufotypes.h:57
float vec_t
Definition ufotypes.h:37
vec_t vec5_t[5]
Definition ufotypes.h:41
vec_t vec3_t[3]
Definition ufotypes.h:39
ipos_t ipos3_t[3]
Definition ufotypes.h:70
int32_t actorSizeEnum_t
Definition ufotypes.h:77
int ipos_t
Definition ufotypes.h:69
vec_t vec4_t[4]
Definition ufotypes.h:40
uint8_t byte
Definition ufotypes.h:34
pos_t pos4_t[4]
Definition ufotypes.h:59
vec_t vec2_t[2]
Definition ufotypes.h:38