mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-12 16:21:04 +02:00
269 lines
6.8 KiB
C++
269 lines
6.8 KiB
C++
/*
|
|
===========================================================================
|
|
|
|
IceTech GPL Source Code
|
|
Copyright (C) 2026 Justin Marshall
|
|
|
|
This file is part of the IceTech GPL Source Code (?IceTech Source Code?).
|
|
|
|
IceTech Source Code is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
IceTech Source Code is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with IceTech Source Code. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
In addition, the IceTech 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 IceTech Source Code. If not, please request a copy in writing from id Software at the address below.
|
|
|
|
If you have questions concerning this license or the applicable additional terms, you may contact in writing Justin Marshall, justinmarshall20@gmail.com
|
|
|
|
===========================================================================
|
|
*/
|
|
|
|
#ifndef __PRECOMPILED_H__
|
|
#define __PRECOMPILED_H__
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#ifndef INT_MIN
|
|
#define INT_MIN (-2147483647 - 1)
|
|
#endif
|
|
|
|
#ifndef INT_MAX
|
|
#define INT_MAX 2147483647
|
|
#endif
|
|
|
|
#include <mutex>
|
|
|
|
template< unsigned int B >
|
|
class BITT {
|
|
public:
|
|
typedef enum bitValue_e {
|
|
VALUE = 1 << B,
|
|
} bitValue_t;
|
|
};
|
|
|
|
#ifdef __cplusplus
|
|
|
|
//-----------------------------------------------------
|
|
|
|
#define ID_TIME_T time_t
|
|
|
|
#ifdef QUAKE4
|
|
// Sanity check for any axis in bounds
|
|
const float MAX_BOUND_SIZE = 65536.0f;
|
|
#endif
|
|
|
|
#ifdef _WIN32
|
|
|
|
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // prevent auto literal to string conversion
|
|
|
|
#ifndef _D3SDK
|
|
#ifndef GAME_DLL
|
|
|
|
#define WINVER 0x501
|
|
|
|
#if 0
|
|
// Dedicated server hits unresolved when trying to link this way now. Likely because of the 2010/Win7 transition? - TTimo
|
|
|
|
#ifdef ID_DEDICATED
|
|
// dedicated sets windows version here
|
|
#define _WIN32_WINNT WINVER
|
|
#define WIN32_LEAN_AND_MEAN
|
|
#else
|
|
// non-dedicated includes MFC and sets windows version here
|
|
#include "../tools/comafx/StdAfx.h" // this will go away when MFC goes away
|
|
#endif
|
|
|
|
#else
|
|
|
|
#include "../tools/comafx/StdAfx.h"
|
|
|
|
#endif
|
|
|
|
#include <winsock2.h>
|
|
#include <mmsystem.h>
|
|
#include <mmreg.h>
|
|
|
|
#define DIRECTINPUT_VERSION 0x0800 // was 0x0700 with the old mssdk
|
|
|
|
// #include <dinput.h>
|
|
#include "../opengl/DirectInputShim.h"
|
|
|
|
#endif /* !GAME_DLL */
|
|
#endif /* !_D3SDK */
|
|
|
|
#pragma warning(disable : 4100) // unreferenced formal parameter
|
|
#pragma warning(disable : 4244) // conversion to smaller type, possible loss of data
|
|
#pragma warning(disable : 4714) // function marked as __forceinline not inlined
|
|
#pragma warning(disable : 4996) // unsafe string operations
|
|
|
|
#include <malloc.h> // no malloc.h on mac or unix
|
|
#include <windows.h> // for gl.h
|
|
#undef FindText // stupid namespace poluting Microsoft monkeys
|
|
|
|
#endif /* _WIN32 */
|
|
|
|
//-----------------------------------------------------
|
|
|
|
#if !defined( _DEBUG ) && !defined( NDEBUG )
|
|
// don't generate asserts
|
|
#define NDEBUG
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdarg.h>
|
|
#include <string.h>
|
|
#include <assert.h>
|
|
#include <time.h>
|
|
#include <ctype.h>
|
|
#include <typeinfo>
|
|
#include <errno.h>
|
|
#include <math.h>
|
|
|
|
//-----------------------------------------------------
|
|
|
|
// non-portable system services
|
|
#include "../sys/sys_public.h"
|
|
|
|
// id lib
|
|
#include "../idlib/Lib.h"
|
|
|
|
// framework
|
|
#include "../framework/BuildVersion.h"
|
|
#include "../framework/BuildDefines.h"
|
|
#include "../framework/Licensee.h"
|
|
#include "../framework/CmdSystem.h"
|
|
#include "../framework/CVarSystem.h"
|
|
#include "../framework/Common.h"
|
|
#include "../framework/File.h"
|
|
#include "../framework/FileSystem.h"
|
|
#include "../framework/UsercmdGen.h"
|
|
|
|
// decls
|
|
#include "../framework/DeclManager.h"
|
|
#include "../framework/DeclTable.h"
|
|
#include "../framework/DeclSkin.h"
|
|
#include "../framework/DeclEntityDef.h"
|
|
#include "../framework/DeclFX.h"
|
|
#include "../framework/DeclParticle.h"
|
|
#include "../framework/DeclAF.h"
|
|
#include "../framework/DeclPDA.h"
|
|
|
|
// We have expression parsing and evaluation code in multiple places:
|
|
// materials, sound shaders, and guis. We should unify them.
|
|
const int MAX_EXPRESSION_OPS = 4096;
|
|
const int MAX_EXPRESSION_REGISTERS = 4096;
|
|
|
|
// renderer
|
|
#include "../opengl/opengl.h"
|
|
#include "../renderer/Cinematic.h"
|
|
#include "../renderer/Material.h"
|
|
#include "../models/Model.h"
|
|
#include "../models/ModelManager.h"
|
|
#include "../renderer/RenderSystem.h"
|
|
#include "../renderer/RenderWorld.h"
|
|
#include "../renderer/DeviceContext.h"
|
|
|
|
#include "../framework/DeclModelDefInterface.h"
|
|
|
|
// sound engine
|
|
#include "../sound/sound.h"
|
|
|
|
// asynchronous networking
|
|
#include "../framework/async/NetworkSystem.h"
|
|
|
|
// user interfaces
|
|
#include "../ui/ListGUI.h"
|
|
#include "../ui/UserInterface.h"
|
|
|
|
// collision detection system
|
|
#if defined(PREY)
|
|
#include "../../prey/cm/CollisionModel.h"
|
|
#elif defined(QUAKE4)
|
|
#include "../../quake4/cm/CollisionModel.h"
|
|
#else
|
|
#include "../cm/CollisionModel.h"
|
|
#endif
|
|
|
|
// AAS files and manager
|
|
#include "../tools/compilers/aas/AASFile.h"
|
|
#include "../tools/compilers/aas/AASFileManager.h"
|
|
#include "../tools/compilers/recast/RecastNavigation.h"
|
|
|
|
#if defined(QUAKE4)
|
|
#include "../../quake4/bse/BSEInterface.h"
|
|
#endif
|
|
|
|
// game
|
|
#if defined(PREY)
|
|
#include "../../prey/game/Game.h"
|
|
#elif defined(QUAKE4)
|
|
#include "../../quake4/game/Game.h"
|
|
#else
|
|
#if defined(_D3XP)
|
|
#include "../../doom3/d3xp/Game.h"
|
|
#else
|
|
#include "../../doom3/game/Game.h"
|
|
#endif
|
|
#endif
|
|
//-----------------------------------------------------
|
|
|
|
#include "../framework/Session.h"
|
|
|
|
#ifndef _D3SDK
|
|
|
|
#ifdef GAME_DLL
|
|
|
|
#if defined(PREY)
|
|
#include "../../prey/game/Game_local.h"
|
|
#elif defined(QUAKE4)
|
|
#include "../../quake4/game/Game_local.h"
|
|
#else
|
|
#if defined(_D3XP)
|
|
#include "../../doom3/d3xp/Game_local.h"
|
|
#else
|
|
#include "../../doom3/game/Game_local.h"
|
|
#endif
|
|
#endif
|
|
|
|
#else
|
|
|
|
#include "../framework/DemoChecksum.h"
|
|
|
|
// framework
|
|
#include "../framework/Compressor.h"
|
|
#include "../framework/EventLoop.h"
|
|
#include "../framework/KeyInput.h"
|
|
#include "../framework/EditField.h"
|
|
#include "../framework/Console.h"
|
|
#include "../framework/DemoFile.h"
|
|
|
|
// asynchronous networking
|
|
#include "../framework/async/AsyncNetwork.h"
|
|
|
|
// The editor entry points are always declared, but may just be
|
|
// stubbed out on non-windows platforms.
|
|
#include "../tools/edit_public.h"
|
|
|
|
// Compilers for map, model, video etc. processing.
|
|
#include "../tools/compilers/compiler_public.h"
|
|
|
|
#endif /* !GAME_DLL */
|
|
|
|
#endif /* !_D3SDK */
|
|
|
|
//-----------------------------------------------------
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* !__PRECOMPILED_H__ */
|