blob: 93d6f80c864c86e46c24bc71019a83b5d16ed6c3 [file] [log] [blame]
Franklin Weia855d622017-01-21 15:18:31 -05001//-------------------------------------------------------------------------
2/*
3Copyright (C) 1996, 2003 - 3D Realms Entertainment
4
5This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
6
7Duke Nukem 3D is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License
9as published by the Free Software Foundation; either version 2
10of the License, or (at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
16See the GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19aint32_t with this program; if not, write to the Free Software
20Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
22Original Source: 1996 - Todd Replogle
23Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
24*/
25//-------------------------------------------------------------------------
26
27#ifndef _types_public
28#define _types_public
29
Vencislav Atanasov183e45e2019-07-28 23:31:50 +030030#include <inttypes.h>
Franklin Weia855d622017-01-21 15:18:31 -050031
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36
37//***************************************************************************
38//
39// Global Data Types (For portability)
40//
41//***************************************************************************
42
43typedef uint8_t uint8;
44typedef uint8 byte;
45typedef int8_t int8;
46
47typedef uint16_t uint16;
48typedef uint16_t word;
49typedef int16_t int16;
50
51typedef uint32_t uint32;
52typedef int32_t int32;
53typedef uint32 dword;
54
55typedef int32 fixed;
56#define boolean uint8_t
57typedef float float32;
58typedef double float64;
59typedef int64_t float128;
60typedef float64 appfloat;
61
62
63
64//***************************************************************************
65//
66// boolean values
67//
68//***************************************************************************
69
70#define true ( 1 == 1 )
71#define false ( ! true )
72
73//***************************************************************************
74//
75// BYTE ACCESS MACROS
76//
77//***************************************************************************
78
79// WORD macros
80#define Int16_HighByte( x ) ( (uint8) ((x)>>8) )
81#define Int16_LowByte( x ) ( (uint8) ((x)&0xff) )
82
83// DWORD macros
84#define Int32_4Byte( x ) ( (uint8) ((x)>>24)&0xff )
85#define Int32_3Byte( x ) ( (uint8) (((x)>>16)&0xff) )
86#define Int32_2Byte( x ) ( (uint8) (((x)>>8)&0xff) )
87#define Int32_1Byte( x ) ( (uint8) ((x)&0xff) )
88
89#ifdef __NeXT__
90#define stricmp strcasecmp
91#define strcmpi strcasecmp
92#endif
93
94#ifdef __cplusplus
95};
96#endif
97#endif