aboutsummaryrefslogtreecommitdiff
path: root/src/doomtype.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/doomtype.h')
-rw-r--r--src/doomtype.h128
1 files changed, 128 insertions, 0 deletions
diff --git a/src/doomtype.h b/src/doomtype.h
new file mode 100644
index 0000000..bfc2f0a
--- /dev/null
+++ b/src/doomtype.h
@@ -0,0 +1,128 @@
1/* Emacs style mode select -*- C++ -*-
2 *-----------------------------------------------------------------------------
3 *
4 *
5 * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 * based on BOOM, a modified and improved DOOM engine
7 * Copyright (C) 1999 by
8 * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 * Copyright (C) 1999-2006 by
10 * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 * Copyright 2005, 2006 by
12 * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 * 02111-1307, USA.
28 *
29 * DESCRIPTION:
30 * Simple basic typedefs, isolated here to make it easier
31 * separating modules.
32 *
33 *-----------------------------------------------------------------------------*/
34
35#ifndef __DOOMTYPE__
36#define __DOOMTYPE__
37
38#ifdef HAVE_CONFIG_H
39#include "config.h"
40#endif
41
42#ifndef __BYTEBOOL__
43#define __BYTEBOOL__
44/* Fixed to use builtin bool type with C++. */
45#ifdef __cplusplus
46typedef bool boolean;
47#else
48typedef enum {false, true} boolean;
49#endif
50typedef unsigned char byte;
51#endif
52
53//e6y
54#ifndef MAX
55#define MAX(a,b) ((a)>(b)?(a):(b))
56#endif
57#ifndef MIN
58#define MIN(a,b) ((a)<(b)?(a):(b))
59#endif
60
61/* cph - Wrapper for the long long type, as Win32 used a different name.
62 * Except I don't know what to test as it's compiler specific
63 * Proff - I fixed it */
64#ifndef _MSC_VER
65typedef signed long long int_64_t;
66typedef unsigned long long uint_64_t;
67// define compiled-specific long-long contstant notation here
68#define LONGLONG(num) (uint_64_t)num ## ll
69#else
70typedef __int64 int_64_t;
71typedef unsigned __int64 uint_64_t;
72// define compiled-specific long-long contstant notation here
73#define LONGLONG(num) (uint_64_t)num
74#undef PATH_MAX
75#define PATH_MAX 1024
76#define strcasecmp _stricmp
77#define strncasecmp _strnicmp
78#define S_ISDIR(x) (((sbuf.st_mode & S_IFDIR)==S_IFDIR)?1:0)
79#endif
80
81#ifdef __GNUC__
82#define CONSTFUNC __attribute__((const))
83#define PUREFUNC __attribute__((pure))
84#define NORETURN __attribute__ ((noreturn))
85#else
86#define CONSTFUNC
87#define PUREFUNC
88#define NORETURN
89#endif
90
91/* CPhipps - use limits.h instead of depreciated values.h */
92#include <limits.h>
93
94/* cph - move compatibility levels here so we can use them in d_server.c */
95typedef enum {
96 doom_12_compatibility, /* Doom v1.2 */
97 doom_1666_compatibility, /* Doom v1.666 */
98 doom2_19_compatibility, /* Doom & Doom 2 v1.9 */
99 ultdoom_compatibility, /* Doom 2 v1.9 */
100 finaldoom_compatibility, /* Final & Ultimate Doom v1.9, and Doom95 */
101 dosdoom_compatibility, /* Early dosdoom & tasdoom */
102 tasdoom_compatibility, /* Early dosdoom & tasdoom */
103 boom_compatibility_compatibility, /* Boom's compatibility mode */
104 boom_201_compatibility, /* Compatible with Boom v2.01 */
105 boom_202_compatibility, /* Compatible with Boom v2.01 */
106 lxdoom_1_compatibility, /* LxDoom v1.3.2+ */
107 mbf_compatibility, /* MBF */
108 prboom_1_compatibility, /* PrBoom 2.03beta? */
109 prboom_2_compatibility, /* PrBoom 2.1.0-2.1.1 */
110 prboom_3_compatibility, /* PrBoom 2.2.x */
111 prboom_4_compatibility, /* PrBoom 2.3.x */
112 prboom_5_compatibility, /* PrBoom 2.4.0 */
113 prboom_6_compatibility, /* Latest PrBoom */
114 MAX_COMPATIBILITY_LEVEL, /* Must be last entry */
115 /* Aliases follow */
116 boom_compatibility = boom_201_compatibility, /* Alias used by G_Compatibility */
117 best_compatibility = prboom_6_compatibility,
118} complevel_t;
119
120/* cph - from v_video.h, needed by gl_struct.h */
121enum patch_translation_e {
122 VPT_NONE = 0, // Normal
123 VPT_FLIP = 1, // Flip image horizontally
124 VPT_TRANS = 2, // Translate image via a translation table
125 VPT_STRETCH = 4, // Stretch to compensate for high-res
126};
127
128#endif