doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
precompiled.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 
29 #ifndef __PRECOMPILED_H__
30 #define __PRECOMPILED_H__
31 
32 #ifdef __cplusplus
33 
34 //-----------------------------------------------------
35 
36 #define ID_TIME_T time_t
37 
38 #ifdef _WIN32
39 
40 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // prevent auto literal to string conversion
41 
42 #ifndef _D3SDK
43 #ifndef GAME_DLL
44 
45 #define WINVER 0x501
46 
47 #if 0
48 // Dedicated server hits unresolved when trying to link this way now. Likely because of the 2010/Win7 transition? - TTimo
49 
50 #ifdef ID_DEDICATED
51 // dedicated sets windows version here
52 #define _WIN32_WINNT WINVER
53 #define WIN32_LEAN_AND_MEAN
54 #else
55 // non-dedicated includes MFC and sets windows version here
56 #include "../tools/comafx/StdAfx.h" // this will go away when MFC goes away
57 #endif
58 
59 #else
60 
61 #include "../tools/comafx/StdAfx.h"
62 
63 #endif
64 
65 #include <winsock2.h>
66 #include <mmsystem.h>
67 #include <mmreg.h>
68 
69 #define DIRECTINPUT_VERSION 0x0800 // was 0x0700 with the old mssdk
70 #define DIRECTSOUND_VERSION 0x0800
71 
72 #include <dsound.h>
73 #include <dinput.h>
74 
75 #endif /* !GAME_DLL */
76 #endif /* !_D3SDK */
77 
78 #pragma warning(disable : 4100) // unreferenced formal parameter
79 #pragma warning(disable : 4244) // conversion to smaller type, possible loss of data
80 #pragma warning(disable : 4714) // function marked as __forceinline not inlined
81 #pragma warning(disable : 4996) // unsafe string operations
82 
83 #include <malloc.h> // no malloc.h on mac or unix
84 #include <windows.h> // for qgl.h
85 #undef FindText // stupid namespace poluting Microsoft monkeys
86 
87 #endif /* _WIN32 */
88 
89 //-----------------------------------------------------
90 
91 #if !defined( _DEBUG ) && !defined( NDEBUG )
92  // don't generate asserts
93  #define NDEBUG
94 #endif
95 
96 #include <stdio.h>
97 #include <stdlib.h>
98 #include <stdarg.h>
99 #include <string.h>
100 #include <assert.h>
101 #include <time.h>
102 #include <ctype.h>
103 #include <typeinfo>
104 #include <errno.h>
105 #include <math.h>
106 
107 //-----------------------------------------------------
108 
109 // non-portable system services
110 #include "../sys/sys_public.h"
111 
112 // id lib
113 #include "../idlib/Lib.h"
114 
115 // framework
116 #include "../framework/BuildVersion.h"
117 #include "../framework/BuildDefines.h"
118 #include "../framework/Licensee.h"
119 #include "../framework/CmdSystem.h"
120 #include "../framework/CVarSystem.h"
121 #include "../framework/Common.h"
122 #include "../framework/File.h"
123 #include "../framework/FileSystem.h"
124 #include "../framework/UsercmdGen.h"
125 
126 // decls
127 #include "../framework/DeclManager.h"
128 #include "../framework/DeclTable.h"
129 #include "../framework/DeclSkin.h"
130 #include "../framework/DeclEntityDef.h"
131 #include "../framework/DeclFX.h"
132 #include "../framework/DeclParticle.h"
133 #include "../framework/DeclAF.h"
134 #include "../framework/DeclPDA.h"
135 
136 // We have expression parsing and evaluation code in multiple places:
137 // materials, sound shaders, and guis. We should unify them.
138 const int MAX_EXPRESSION_OPS = 4096;
139 const int MAX_EXPRESSION_REGISTERS = 4096;
140 
141 // renderer
142 #include "../renderer/qgl.h"
143 #include "../renderer/Cinematic.h"
144 #include "../renderer/Material.h"
145 #include "../renderer/Model.h"
146 #include "../renderer/ModelManager.h"
147 #include "../renderer/RenderSystem.h"
148 #include "../renderer/RenderWorld.h"
149 
150 // sound engine
151 #include "../sound/sound.h"
152 
153 // asynchronous networking
154 #include "../framework/async/NetworkSystem.h"
155 
156 // user interfaces
157 #include "../ui/ListGUI.h"
158 #include "../ui/UserInterface.h"
159 
160 // collision detection system
161 #include "../cm/CollisionModel.h"
162 
163 // AAS files and manager
164 #include "../tools/compilers/aas/AASFile.h"
165 #include "../tools/compilers/aas/AASFileManager.h"
166 
167 // game
168 #if defined(_D3XP)
169 #include "../d3xp/Game.h"
170 #else
171 #include "../game/Game.h"
172 #endif
173 
174 //-----------------------------------------------------
175 
176 #ifndef _D3SDK
177 
178 #ifdef GAME_DLL
179 
180 #if defined(_D3XP)
181 #include "../d3xp/Game_local.h"
182 #else
183 #include "../game/Game_local.h"
184 #endif
185 
186 #else
187 
188 #include "../framework/DemoChecksum.h"
189 
190 // framework
191 #include "../framework/Compressor.h"
192 #include "../framework/EventLoop.h"
193 #include "../framework/KeyInput.h"
194 #include "../framework/EditField.h"
195 #include "../framework/Console.h"
196 #include "../framework/DemoFile.h"
197 #include "../framework/Session.h"
198 
199 // asynchronous networking
200 #include "../framework/async/AsyncNetwork.h"
201 
202 // The editor entry points are always declared, but may just be
203 // stubbed out on non-windows platforms.
204 #include "../tools/edit_public.h"
205 
206 // Compilers for map, model, video etc. processing.
207 #include "../tools/compilers/compiler_public.h"
208 
209 #endif /* !GAME_DLL */
210 
211 #endif /* !_D3SDK */
212 
213 //-----------------------------------------------------
214 
215 #endif /* __cplusplus */
216 
217 #endif /* !__PRECOMPILED_H__ */