sys_includes.h (3643B)
1 /* 2 =========================================================================== 3 4 Doom 3 BFG Edition GPL Source Code 5 Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. 6 7 This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). 8 9 Doom 3 BFG Edition 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 BFG Edition 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 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>. 21 22 In addition, the Doom 3 BFG Edition 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 BFG Edition 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 #ifndef SYS_INCLUDES_H 29 #define SYS_INCLUDES_H 30 31 // Include the various platform specific header files (windows.h, etc) 32 33 /* 34 ================================================================================================ 35 36 Windows 37 38 ================================================================================================ 39 */ 40 41 42 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // prevent auto literal to string conversion 43 44 #ifndef _D3SDK 45 #ifndef GAME_DLL 46 47 #define WINVER 0x501 48 49 #include <winsock2.h> 50 #include <mmsystem.h> 51 #include <mmreg.h> 52 53 #define DIRECTINPUT_VERSION 0x0800 // was 0x0700 with the old mssdk 54 #define DIRECTSOUND_VERSION 0x0800 55 56 #include <dsound.h> 57 #include <dinput.h> 58 59 #endif /* !GAME_DLL */ 60 #endif /* !_D3SDK */ 61 62 #include <intrin.h> // needed for intrinsics like _mm_setzero_si28 63 64 #pragma warning(disable : 4100) // unreferenced formal parameter 65 #pragma warning(disable : 4127) // conditional expression is constant 66 #pragma warning(disable : 4244) // conversion to smaller type, possible loss of data 67 #pragma warning(disable : 4714) // function marked as __forceinline not inlined 68 #pragma warning(disable : 4996) // unsafe string operations 69 70 #include <malloc.h> // no malloc.h on mac or unix 71 #include <windows.h> // for qgl.h 72 #undef FindText // fix namespace pollution 73 74 /* 75 ================================================================================================ 76 77 Common Include Files 78 79 ================================================================================================ 80 */ 81 82 #if !defined( _DEBUG ) && !defined( NDEBUG ) 83 // don't generate asserts 84 #define NDEBUG 85 #endif 86 87 #include <stdio.h> 88 #include <stdlib.h> 89 #include <stdarg.h> 90 #include <string.h> 91 #include <assert.h> 92 #include <time.h> 93 #include <ctype.h> 94 #include <typeinfo> 95 #include <errno.h> 96 #include <math.h> 97 #include <limits.h> 98 #include <memory> 99 100 //----------------------------------------------------- 101 102 // Hacked stuff we may want to consider implementing later 103 class idScopedGlobalHeap { 104 }; 105 106 #endif // SYS_INCLUDES_H