mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 13:21:04 +00:00
- merged game.h into global.h and game.cpp into global.cpp.
Meaning that all global declarations are in one file now.
This commit is contained in:
parent
08909f414a
commit
3028b3f3fd
18 changed files with 63 additions and 164 deletions
|
@ -45,7 +45,6 @@ set( PCH_SOURCES
|
||||||
src/spawn.cpp
|
src/spawn.cpp
|
||||||
src/spawn_d.cpp
|
src/spawn_d.cpp
|
||||||
src/spawn_r.cpp
|
src/spawn_r.cpp
|
||||||
src/zz_game.cpp
|
|
||||||
src/zz_global.cpp
|
src/zz_global.cpp
|
||||||
src/zz_savegame.cpp
|
src/zz_savegame.cpp
|
||||||
)
|
)
|
||||||
|
|
|
@ -35,7 +35,6 @@ source as it is released.
|
||||||
|
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "game.h"
|
|
||||||
#include "prediction.h"
|
#include "prediction.h"
|
||||||
#include "names_d.h"
|
#include "names_d.h"
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
||||||
|
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "game.h"
|
|
||||||
#include "names_r.h"
|
#include "names_r.h"
|
||||||
#include "prediction.h"
|
#include "prediction.h"
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
||||||
#include "duke3d.h"
|
#include "duke3d.h"
|
||||||
|
|
||||||
#include "savegame.h"
|
#include "savegame.h"
|
||||||
#include "game.h"
|
|
||||||
#include "superfasthash.h"
|
#include "superfasthash.h"
|
||||||
#include "gamecvars.h"
|
#include "gamecvars.h"
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include "menu/menu.h"
|
#include "menu/menu.h"
|
||||||
#include "funct.h"
|
#include "funct.h"
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
#include "game.h"
|
|
||||||
#include "gamevar.h"
|
#include "gamevar.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "names.h"
|
#include "names.h"
|
||||||
|
|
|
@ -1,76 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2016 EDuke32 developers and contributors
|
|
||||||
|
|
||||||
This file is part of EDuke32.
|
|
||||||
|
|
||||||
EDuke32 is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This program 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 this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "fix16.h"
|
|
||||||
#include "mmulti.h"
|
|
||||||
#include "palette.h"
|
|
||||||
#include "cmdlib.h"
|
|
||||||
#include "screenjob.h"
|
|
||||||
#include "constants.h"
|
|
||||||
#include "types.h"
|
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
|
||||||
|
|
||||||
|
|
||||||
extern user_defs ud;
|
|
||||||
extern int rtsplaying;
|
|
||||||
|
|
||||||
#ifndef ONLY_USERDEFS
|
|
||||||
|
|
||||||
extern int32_t g_Shareware;
|
|
||||||
extern int32_t cameraclock;
|
|
||||||
extern int32_t cameradist;
|
|
||||||
extern int32_t tempwallptr;
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
TFLAG_WALLSWITCH = 1
|
|
||||||
};
|
|
||||||
// for now just flags not related to actors, may get more info later.
|
|
||||||
struct TileInfo
|
|
||||||
{
|
|
||||||
int flags;
|
|
||||||
};
|
|
||||||
extern TileInfo tileinfo[MAXTILES];
|
|
||||||
|
|
||||||
|
|
||||||
extern int32_t actor_tog;
|
|
||||||
extern int32_t otherp;
|
|
||||||
|
|
||||||
|
|
||||||
extern ActorInfo actorinfo[MAXTILES];
|
|
||||||
extern weaponhit hittype[MAXSPRITES];
|
|
||||||
extern bool sound445done;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
extern intptr_t apScriptGameEvent[];
|
|
||||||
|
|
||||||
extern TArray<int> ScriptCode;
|
|
||||||
|
|
||||||
|
|
||||||
#include "concmd.h"
|
|
||||||
|
|
||||||
END_DUKE_NS
|
|
|
@ -30,10 +30,47 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "quotemgr.h"
|
#include "quotemgr.h"
|
||||||
#include "sounds.h"
|
#include "sounds.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
extern user_defs ud;
|
||||||
|
extern int rtsplaying;
|
||||||
|
|
||||||
|
extern int32_t g_Shareware;
|
||||||
|
extern int32_t cameraclock;
|
||||||
|
extern int32_t cameradist;
|
||||||
|
extern int32_t tempwallptr;
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
TFLAG_WALLSWITCH = 1
|
||||||
|
};
|
||||||
|
// for now just flags not related to actors, may get more info later.
|
||||||
|
struct TileInfo
|
||||||
|
{
|
||||||
|
int flags;
|
||||||
|
};
|
||||||
|
extern TileInfo tileinfo[MAXTILES];
|
||||||
|
|
||||||
|
|
||||||
|
extern int32_t actor_tog;
|
||||||
|
extern int32_t otherp;
|
||||||
|
|
||||||
|
|
||||||
|
extern ActorInfo actorinfo[MAXTILES];
|
||||||
|
extern weaponhit hittype[MAXSPRITES];
|
||||||
|
extern bool sound445done;
|
||||||
|
|
||||||
|
extern intptr_t apScriptGameEvent[];
|
||||||
|
|
||||||
|
extern TArray<int> ScriptCode;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VOLUMEALL (g_Shareware == 0)
|
#define VOLUMEALL (g_Shareware == 0)
|
||||||
#define PLUTOPAK (true)//g_scriptVersion >= 14)
|
#define PLUTOPAK (true)//g_scriptVersion >= 14)
|
||||||
#define VOLUMEONE (g_Shareware == 1)
|
#define VOLUMEONE (g_Shareware == 1)
|
||||||
|
|
|
@ -28,7 +28,6 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
||||||
|
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "game.h"
|
|
||||||
#include "names_r.h"
|
#include "names_r.h"
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
|
@ -35,7 +35,6 @@ source as it is released.
|
||||||
|
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "game.h"
|
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ source as it is released.
|
||||||
|
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "game.h"
|
|
||||||
#include "gamevar.h"
|
#include "gamevar.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "names_d.h"
|
#include "names_d.h"
|
||||||
|
|
|
@ -28,7 +28,6 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
||||||
|
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "game.h"
|
|
||||||
#include "names_r.h"
|
#include "names_r.h"
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ source as it is released.
|
||||||
|
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "game.h"
|
|
||||||
#include "gamevar.h"
|
#include "gamevar.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "names_d.h"
|
#include "names_d.h"
|
||||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#ifndef savegame_h_
|
#ifndef savegame_h_
|
||||||
#define savegame_h_
|
#define savegame_h_
|
||||||
|
|
||||||
#include "game.h"
|
#include "global.h"
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ source as it is released.
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "game.h"
|
|
||||||
#include "sounds.h"
|
#include "sounds.h"
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
|
@ -34,7 +34,6 @@ source as it is released.
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "game.h"
|
|
||||||
#include "sounds.h"
|
#include "sounds.h"
|
||||||
#include "names_d.h"
|
#include "names_d.h"
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "game.h"
|
|
||||||
#include "sounds.h"
|
#include "sounds.h"
|
||||||
#include "names_r.h"
|
#include "names_r.h"
|
||||||
|
|
||||||
|
|
|
@ -1,74 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2016 EDuke32 developers and contributors
|
|
||||||
|
|
||||||
This file is part of EDuke32.
|
|
||||||
|
|
||||||
EDuke32 is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This program 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 this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#include "ns.h" // Must come before everything else!
|
|
||||||
|
|
||||||
#define game_c_
|
|
||||||
|
|
||||||
#include "duke3d.h"
|
|
||||||
#include "compat.h"
|
|
||||||
#include "baselayer.h"
|
|
||||||
#include "savegame.h"
|
|
||||||
|
|
||||||
#include "sbar.h"
|
|
||||||
#include "palette.h"
|
|
||||||
#include "gamecvars.h"
|
|
||||||
#include "gameconfigfile.h"
|
|
||||||
#include "printf.h"
|
|
||||||
#include "m_argv.h"
|
|
||||||
#include "filesystem.h"
|
|
||||||
#include "statistics.h"
|
|
||||||
#include "c_dispatch.h"
|
|
||||||
#include "mapinfo.h"
|
|
||||||
#include "v_video.h"
|
|
||||||
#include "glbackend/glbackend.h"
|
|
||||||
#include "st_start.h"
|
|
||||||
#include "i_interface.h"
|
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
|
||||||
|
|
||||||
int levelTextTime; // must be serialized
|
|
||||||
int rtsplaying; // must be serialized
|
|
||||||
int otherp; // MP only
|
|
||||||
bool sound445done; // this was local state inside a function, but this must be maintained globally and serialized
|
|
||||||
|
|
||||||
int16_t max_ammo_amount[MAX_WEAPONS];
|
|
||||||
int32_t spriteqamount = 64;
|
|
||||||
|
|
||||||
uint8_t shadedsector[MAXSECTORS];
|
|
||||||
|
|
||||||
int32_t cameradist = 0, cameraclock = 0;
|
|
||||||
|
|
||||||
int32_t g_Shareware = 0;
|
|
||||||
|
|
||||||
int32_t tempwallptr;
|
|
||||||
int32_t actor_tog;
|
|
||||||
|
|
||||||
weaponhit hittype[MAXSPRITES];
|
|
||||||
ActorInfo actorinfo[MAXTILES];
|
|
||||||
player_struct ps[MAXPLAYERS];
|
|
||||||
|
|
||||||
int32_t PHEIGHT = PHEIGHT_DUKE;
|
|
||||||
|
|
||||||
int32_t lastvisinc;
|
|
||||||
|
|
||||||
END_DUKE_NS
|
|
|
@ -62,4 +62,29 @@ int16_t weaponsandammosprites[15];
|
||||||
TileInfo tileinfo[MAXTILES]; // This is not from EDuke32.
|
TileInfo tileinfo[MAXTILES]; // This is not from EDuke32.
|
||||||
|
|
||||||
|
|
||||||
|
int levelTextTime; // must be serialized
|
||||||
|
int rtsplaying; // must be serialized
|
||||||
|
int otherp; // MP only
|
||||||
|
bool sound445done; // this was local state inside a function, but this must be maintained globally and serialized
|
||||||
|
|
||||||
|
int16_t max_ammo_amount[MAX_WEAPONS];
|
||||||
|
int32_t spriteqamount = 64;
|
||||||
|
|
||||||
|
uint8_t shadedsector[MAXSECTORS];
|
||||||
|
|
||||||
|
int32_t cameradist = 0, cameraclock = 0;
|
||||||
|
|
||||||
|
int32_t g_Shareware = 0;
|
||||||
|
|
||||||
|
int32_t tempwallptr;
|
||||||
|
int32_t actor_tog;
|
||||||
|
|
||||||
|
weaponhit hittype[MAXSPRITES];
|
||||||
|
ActorInfo actorinfo[MAXTILES];
|
||||||
|
player_struct ps[MAXPLAYERS];
|
||||||
|
|
||||||
|
int32_t PHEIGHT = PHEIGHT_DUKE;
|
||||||
|
|
||||||
|
int32_t lastvisinc;
|
||||||
|
|
||||||
END_DUKE_NS
|
END_DUKE_NS
|
||||||
|
|
Loading…
Reference in a new issue