diff --git a/d3xp/GameBase.h b/d3xp/GameBase.h
new file mode 100644
index 0000000..9ff3a4a
--- /dev/null
+++ b/d3xp/GameBase.h
@@ -0,0 +1,81 @@
+/*
+===========================================================================
+
+Doom 3 GPL Source Code
+Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
+
+This file is part of the Doom 3 GPL Source Code ("Doom 3 Source Code").
+
+Doom 3 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.
+
+Doom 3 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 Doom 3 Source Code. If not, see .
+
+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.
+
+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.
+
+===========================================================================
+*/
+
+#ifndef __GAMEBASE_H__
+#define __GAMEBASE_H__
+
+// default scripts
+#define SCRIPT_DEFAULTDEFS "script/doom_defs.script"
+#define SCRIPT_DEFAULT "script/doom_main.script"
+#define SCRIPT_DEFAULTFUNC "doom_main"
+
+#define TIME_GROUP1 0
+#define TIME_GROUP2 1
+
+#define LAGO_IMG_WIDTH 64
+#define LAGO_IMG_HEIGHT 64
+#define LAGO_WIDTH 64
+#define LAGO_HEIGHT 44
+#define LAGO_MATERIAL "textures/sfx/lagometer"
+#define LAGO_IMAGE "textures/sfx/lagometer.tga"
+
+// if set to 1 the server sends the client PVS with snapshots and the client compares against what it sees
+#ifndef ASYNC_WRITE_PVS
+ #define ASYNC_WRITE_PVS 0
+#endif
+
+// the "gameversion" client command will print this plus compile date
+#define GAME_VERSION "baseDOOM-1"
+
+#define MAX_CLIENTS 32
+#define GENTITYNUM_BITS 12
+#define MAX_GENTITIES (1<>5)
+
+// content masks
+#define MASK_ALL (-1)
+#define MASK_SOLID (CONTENTS_SOLID)
+#define MASK_MONSTERSOLID (CONTENTS_SOLID|CONTENTS_MONSTERCLIP|CONTENTS_BODY)
+#define MASK_PLAYERSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY)
+#define MASK_DEADSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP)
+#define MASK_WATER (CONTENTS_WATER)
+#define MASK_OPAQUE (CONTENTS_OPAQUE)
+#define MASK_SHOT_RENDERMODEL (CONTENTS_SOLID|CONTENTS_RENDERMODEL)
+#define MASK_SHOT_BOUNDINGBOX (CONTENTS_SOLID|CONTENTS_BODY)
+
+#define DEFAULT_GRAVITY_STRING "1066"
+
+extern void gameError( const char *fmt, ... );
+
+#endif
diff --git a/d3xp/Game_local.h b/d3xp/Game_local.h
index 0b79458..2ace524 100644
--- a/d3xp/Game_local.h
+++ b/d3xp/Game_local.h
@@ -29,13 +29,7 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __GAME_LOCAL_H__
#define __GAME_LOCAL_H__
-// default scripts
-#define SCRIPT_DEFAULTDEFS "script/doom_defs.script"
-#define SCRIPT_DEFAULT "script/doom_main.script"
-#define SCRIPT_DEFAULTFUNC "doom_main"
-
-#define TIME_GROUP1 0
-#define TIME_GROUP2 1
+#include "GameBase.h"
/*
===============================================================================
@@ -45,18 +39,6 @@ If you have questions concerning this license or the applicable additional terms
===============================================================================
*/
-#define LAGO_IMG_WIDTH 64
-#define LAGO_IMG_HEIGHT 64
-#define LAGO_WIDTH 64
-#define LAGO_HEIGHT 44
-#define LAGO_MATERIAL "textures/sfx/lagometer"
-#define LAGO_IMAGE "textures/sfx/lagometer.tga"
-
-// if set to 1 the server sends the client PVS with snapshots and the client compares against what it sees
-#ifndef ASYNC_WRITE_PVS
- #define ASYNC_WRITE_PVS 0
-#endif
-
#ifdef ID_DEBUG_UNINITIALIZED_MEMORY
// This is real evil but allows the code to inspect arbitrary class variables.
#define private public
@@ -66,9 +48,6 @@ If you have questions concerning this license or the applicable additional terms
extern idRenderWorld * gameRenderWorld;
extern idSoundWorld * gameSoundWorld;
-// the "gameversion" client command will print this plus compile date
-#define GAME_VERSION "baseDOOM-1"
-
// classes used by idGameLocal
class idEntity;
class idActor;
@@ -86,17 +65,8 @@ class idThread;
class idEditEntities;
class idLocationEntity;
-#define MAX_CLIENTS 32
-#define GENTITYNUM_BITS 12
-#define MAX_GENTITIES (1<>5)
-
extern const int NUM_RENDER_PORTAL_BITS;
typedef struct entityState_s {
@@ -739,18 +705,6 @@ typedef enum {
SND_CHANNEL_DAMAGE
} gameSoundChannel_t;
-// content masks
-#define MASK_ALL (-1)
-#define MASK_SOLID (CONTENTS_SOLID)
-#define MASK_MONSTERSOLID (CONTENTS_SOLID|CONTENTS_MONSTERCLIP|CONTENTS_BODY)
-#define MASK_PLAYERSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY)
-#define MASK_DEADSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP)
-#define MASK_WATER (CONTENTS_WATER)
-#define MASK_OPAQUE (CONTENTS_OPAQUE)
-#define MASK_SHOT_RENDERMODEL (CONTENTS_SOLID|CONTENTS_RENDERMODEL)
-#define MASK_SHOT_BOUNDINGBOX (CONTENTS_SOLID|CONTENTS_BODY)
-
-#define DEFAULT_GRAVITY_STRING "1066"
extern const float DEFAULT_GRAVITY;
extern const idVec3 DEFAULT_GRAVITY_VEC3;
extern const int CINEMATIC_SKIP_DELAY;
diff --git a/game/GameBase.h b/game/GameBase.h
new file mode 100644
index 0000000..5269b67
--- /dev/null
+++ b/game/GameBase.h
@@ -0,0 +1,78 @@
+/*
+===========================================================================
+
+Doom 3 GPL Source Code
+Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
+
+This file is part of the Doom 3 GPL Source Code ("Doom 3 Source Code").
+
+Doom 3 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.
+
+Doom 3 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 Doom 3 Source Code. If not, see .
+
+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.
+
+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.
+
+===========================================================================
+*/
+
+#ifndef __GAMEBASE_H__
+#define __GAMEBASE_H__
+
+// default scripts
+#define SCRIPT_DEFAULTDEFS "script/doom_defs.script"
+#define SCRIPT_DEFAULT "script/doom_main.script"
+#define SCRIPT_DEFAULTFUNC "doom_main"
+
+#define LAGO_IMG_WIDTH 64
+#define LAGO_IMG_HEIGHT 64
+#define LAGO_WIDTH 64
+#define LAGO_HEIGHT 44
+#define LAGO_MATERIAL "textures/sfx/lagometer"
+#define LAGO_IMAGE "textures/sfx/lagometer.tga"
+
+// if set to 1 the server sends the client PVS with snapshots and the client compares against what it sees
+#ifndef ASYNC_WRITE_PVS
+ #define ASYNC_WRITE_PVS 0
+#endif
+
+// the "gameversion" client command will print this plus compile date
+#define GAME_VERSION "baseDOOM-1"
+
+#define MAX_CLIENTS 32
+#define GENTITYNUM_BITS 12
+#define MAX_GENTITIES (1<>5)
+
+// content masks
+#define MASK_ALL (-1)
+#define MASK_SOLID (CONTENTS_SOLID)
+#define MASK_MONSTERSOLID (CONTENTS_SOLID|CONTENTS_MONSTERCLIP|CONTENTS_BODY)
+#define MASK_PLAYERSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY)
+#define MASK_DEADSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP)
+#define MASK_WATER (CONTENTS_WATER)
+#define MASK_OPAQUE (CONTENTS_OPAQUE)
+#define MASK_SHOT_RENDERMODEL (CONTENTS_SOLID|CONTENTS_RENDERMODEL)
+#define MASK_SHOT_BOUNDINGBOX (CONTENTS_SOLID|CONTENTS_BODY)
+
+#define DEFAULT_GRAVITY_STRING "1066"
+
+extern void gameError( const char *fmt, ... );
+
+#endif
diff --git a/game/Game_local.h b/game/Game_local.h
index 1ba48b9..72e1056 100644
--- a/game/Game_local.h
+++ b/game/Game_local.h
@@ -29,10 +29,8 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __GAME_LOCAL_H__
#define __GAME_LOCAL_H__
-// default scripts
-#define SCRIPT_DEFAULTDEFS "script/doom_defs.script"
-#define SCRIPT_DEFAULT "script/doom_main.script"
-#define SCRIPT_DEFAULTFUNC "doom_main"
+#include "GameBase.h"
+
/*
===============================================================================
@@ -41,18 +39,6 @@ If you have questions concerning this license or the applicable additional terms
===============================================================================
*/
-#define LAGO_IMG_WIDTH 64
-#define LAGO_IMG_HEIGHT 64
-#define LAGO_WIDTH 64
-#define LAGO_HEIGHT 44
-#define LAGO_MATERIAL "textures/sfx/lagometer"
-#define LAGO_IMAGE "textures/sfx/lagometer.tga"
-
-// if set to 1 the server sends the client PVS with snapshots and the client compares against what it sees
-#ifndef ASYNC_WRITE_PVS
- #define ASYNC_WRITE_PVS 0
-#endif
-
#ifdef ID_DEBUG_UNINITIALIZED_MEMORY
// This is real evil but allows the code to inspect arbitrary class variables.
#define private public
@@ -62,9 +48,6 @@ If you have questions concerning this license or the applicable additional terms
extern idRenderWorld * gameRenderWorld;
extern idSoundWorld * gameSoundWorld;
-// the "gameversion" client command will print this plus compile date
-#define GAME_VERSION "baseDOOM-1"
-
// classes used by idGameLocal
class idEntity;
class idActor;
@@ -82,17 +65,8 @@ class idThread;
class idEditEntities;
class idLocationEntity;
-#define MAX_CLIENTS 32
-#define GENTITYNUM_BITS 12
-#define MAX_GENTITIES (1<>5)
-
extern const int NUM_RENDER_PORTAL_BITS;
typedef struct entityState_s {
@@ -676,18 +646,6 @@ typedef enum {
SND_CHANNEL_DAMAGE
} gameSoundChannel_t;
-// content masks
-#define MASK_ALL (-1)
-#define MASK_SOLID (CONTENTS_SOLID)
-#define MASK_MONSTERSOLID (CONTENTS_SOLID|CONTENTS_MONSTERCLIP|CONTENTS_BODY)
-#define MASK_PLAYERSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY)
-#define MASK_DEADSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP)
-#define MASK_WATER (CONTENTS_WATER)
-#define MASK_OPAQUE (CONTENTS_OPAQUE)
-#define MASK_SHOT_RENDERMODEL (CONTENTS_SOLID|CONTENTS_RENDERMODEL)
-#define MASK_SHOT_BOUNDINGBOX (CONTENTS_SOLID|CONTENTS_BODY)
-
-#define DEFAULT_GRAVITY_STRING "1066"
extern const float DEFAULT_GRAVITY;
extern const idVec3 DEFAULT_GRAVITY_VEC3;
extern const int CINEMATIC_SKIP_DELAY;