Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8547 | maxcodehac | 1 | // Emacs style mode select -*- C++ -*- |
2 | //----------------------------------------------------------------------------- |
||
3 | // |
||
4 | // $Id:$ |
||
5 | // |
||
6 | // Copyright (C) 1993-1996 by id Software, Inc. |
||
7 | // |
||
8 | // This source is available for distribution and/or modification |
||
9 | // only under the terms of the DOOM Source Code License as |
||
10 | // published by id Software. All rights reserved. |
||
11 | // |
||
12 | // The source is distributed in the hope that it will be useful, |
||
13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
14 | // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License |
||
15 | // for more details. |
||
16 | // |
||
17 | // DESCRIPTION: |
||
18 | // Simple basic typedefs, isolated here to make it easier |
||
19 | // separating modules. |
||
20 | // |
||
21 | //----------------------------------------------------------------------------- |
||
22 | |||
23 | |||
24 | #ifndef __DOOMTYPE__ |
||
25 | #define __DOOMTYPE__ |
||
26 | |||
27 | |||
28 | #ifndef __BYTEBOOL__ |
||
29 | #define __BYTEBOOL__ |
||
30 | // Fixed to use builtin bool type with C++. |
||
31 | #ifdef __cplusplus |
||
32 | typedef bool boolean; |
||
33 | #else |
||
34 | #ifdef __BEOS__ /* boolean is a builtin type for MWCC */ |
||
35 | #define boolean D_BOOL |
||
36 | #undef false |
||
37 | #define false D_false |
||
38 | #undef true |
||
39 | #define true D_true |
||
40 | #endif |
||
41 | typedef enum {false, true} boolean; |
||
42 | #endif |
||
43 | typedef unsigned char byte; |
||
44 | #endif |
||
45 | |||
46 | |||
47 | // Predefined with some OS. |
||
48 | #ifdef LINUX |
||
49 | #include |
||
50 | #else |
||
51 | #ifndef MAXCHAR |
||
52 | #define MAXCHAR ((char)0x7f) |
||
53 | #endif |
||
54 | #ifndef MAXSHORT |
||
55 | #define MAXSHORT ((short)0x7fff) |
||
56 | #endif |
||
57 | |||
58 | // Max pos 32-bit int. |
||
59 | #ifndef MAXINT |
||
60 | #define MAXINT ((int)0x7fffffff) |
||
61 | #endif |
||
62 | #ifndef MAXLONG |
||
63 | #define MAXLONG ((long)0x7fffffff) |
||
64 | #endif |
||
65 | #ifndef MINCHAR |
||
66 | #define MINCHAR ((char)0x80) |
||
67 | #endif |
||
68 | #ifndef MINSHORT |
||
69 | #define MINSHORT ((short)0x8000) |
||
70 | #endif |
||
71 | |||
72 | // Max negative 32-bit integer. |
||
73 | #ifndef MININT |
||
74 | #define MININT ((int)0x80000000) |
||
75 | #endif |
||
76 | #ifndef MINLONG |
||
77 | #define MINLONG ((long)0x80000000) |
||
78 | #endif |
||
79 | #endif |
||
80 | |||
81 | |||
82 | |||
83 | |||
84 | #endif |
||
85 | //----------------------------------------------------------------------------- |
||
86 | // |
||
87 | // $Log:$ |
||
88 | // |
||
89 | //----------------------------------------------------------------------------- |