precompiled.h 5.9 KB

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