2020-06-11 07:22:16 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 2010 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.
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef global_h_
|
|
|
|
#define global_h_
|
|
|
|
|
|
|
|
#include "build.h"
|
|
|
|
#include "compat.h"
|
2020-06-21 20:18:12 +00:00
|
|
|
#include "duke3d.h"
|
2020-06-11 07:22:16 +00:00
|
|
|
#include "mmulti.h"
|
2020-07-06 11:26:26 +00:00
|
|
|
#include "quotemgr.h"
|
2020-06-11 07:22:16 +00:00
|
|
|
#include "sounds.h"
|
2020-07-06 11:26:26 +00:00
|
|
|
#include "constants.h"
|
2020-07-19 18:04:11 +00:00
|
|
|
#include "types.h"
|
2020-06-11 07:22:16 +00:00
|
|
|
|
|
|
|
BEGIN_DUKE_NS
|
|
|
|
|
2020-07-19 18:04:11 +00:00
|
|
|
extern user_defs ud;
|
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
// Variables that do not need to be saved.
|
|
|
|
extern int respawnactortime;
|
|
|
|
extern int bouncemineblastradius;
|
|
|
|
extern int respawnitemtime;
|
|
|
|
extern int morterblastradius;
|
|
|
|
extern int numfreezebounces;
|
|
|
|
extern int pipebombblastradius;
|
|
|
|
extern int dukefriction;
|
|
|
|
extern int rpgblastradius;
|
|
|
|
extern int seenineblastradius;
|
|
|
|
extern int shrinkerblastradius;
|
|
|
|
extern int gc;
|
|
|
|
extern int tripbombblastradius;
|
|
|
|
|
|
|
|
extern int cameraclock;
|
|
|
|
extern int cameradist;
|
|
|
|
extern int otherp; // transient helper, MP only
|
|
|
|
extern TileInfo tileinfo[MAXTILES]; // static state
|
|
|
|
extern ActorInfo actorinfo[MAXTILES]; // static state
|
|
|
|
extern int actor_tog; // cheat state
|
|
|
|
extern intptr_t apScriptGameEvent[];
|
|
|
|
extern TArray<int> ScriptCode;
|
|
|
|
extern input_t sync[MAXPLAYERS];
|
|
|
|
extern int16_t max_ammo_amount[MAX_WEAPONS];
|
|
|
|
extern int16_t weaponsandammosprites[15];
|
|
|
|
extern int32_t PHEIGHT;
|
2020-07-19 18:04:11 +00:00
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
// Interpolation code is the same in all games with slightly different naming - this needs to be unified and cleaned up.
|
|
|
|
// Interpolations are reconstructed on load and do not need to be saved.
|
|
|
|
#define MAXINTERPOLATIONS MAXSPRITES
|
|
|
|
extern int numinterpolations;
|
|
|
|
extern int* curipos[MAXINTERPOLATIONS];
|
|
|
|
extern int bakipos[MAXINTERPOLATIONS];
|
2020-07-19 18:04:11 +00:00
|
|
|
|
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
// Variables that must be saved
|
2020-07-19 18:04:11 +00:00
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
extern int rtsplaying;
|
|
|
|
extern int tempwallptr;
|
|
|
|
extern weaponhit hittype[MAXSPRITES];
|
2020-07-19 18:04:11 +00:00
|
|
|
extern bool sound445done;
|
2020-07-19 20:34:59 +00:00
|
|
|
extern int levelTextTime;
|
|
|
|
extern uint16_t frags[MAXPLAYERS][MAXPLAYERS];
|
|
|
|
extern player_struct ps[MAXPLAYERS];
|
|
|
|
extern int spriteqamount;
|
|
|
|
extern uint8_t shadedsector[MAXSECTORS];
|
|
|
|
extern int lastvisinc;
|
2020-07-19 18:04:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
// todo
|
2020-07-19 18:04:11 +00:00
|
|
|
|
|
|
|
|
2020-07-06 13:48:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-11 07:22:16 +00:00
|
|
|
|
|
|
|
#ifdef global_c_
|
|
|
|
#define G_EXTERN
|
|
|
|
#else
|
|
|
|
#define G_EXTERN extern
|
|
|
|
#endif
|
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
G_EXTERN int duke3d_globalflags;
|
2020-07-06 20:23:18 +00:00
|
|
|
|
2020-06-11 07:22:16 +00:00
|
|
|
G_EXTERN animwalltype animwall[MAXANIMWALLS];
|
2020-07-16 15:59:25 +00:00
|
|
|
G_EXTERN bool synchronized_input;
|
|
|
|
|
2020-06-11 07:22:16 +00:00
|
|
|
G_EXTERN char ready2send;
|
|
|
|
G_EXTERN char tempbuf[MAXSECTORS<<1],buf[1024];
|
|
|
|
|
2020-07-17 18:56:10 +00:00
|
|
|
G_EXTERN input_t loc;
|
2020-06-11 07:22:16 +00:00
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
G_EXTERN int avgfvel, avgsvel, avgbits;
|
2020-06-11 07:22:16 +00:00
|
|
|
G_EXTERN fix16_t avgavel, avghorz;
|
|
|
|
G_EXTERN int8_t avgextbits;
|
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
G_EXTERN int movefifosendplc;
|
|
|
|
|
|
|
|
G_EXTERN int predictfifoplc;
|
|
|
|
|
|
|
|
G_EXTERN int g_networkBroadcastMode;
|
|
|
|
|
|
|
|
G_EXTERN int numanimwalls;
|
|
|
|
G_EXTERN int animatecnt;
|
|
|
|
G_EXTERN int numclouds;
|
|
|
|
G_EXTERN int camsprite;
|
|
|
|
G_EXTERN int numcyclers;
|
|
|
|
G_EXTERN int camerashitable;
|
|
|
|
G_EXTERN int earthquaketime;
|
|
|
|
G_EXTERN int freezerhurtowner;
|
|
|
|
G_EXTERN int gamequit;
|
|
|
|
G_EXTERN int global_random;
|
|
|
|
G_EXTERN int impact_damage;
|
|
|
|
G_EXTERN int mirrorcnt;
|
|
|
|
G_EXTERN int playerswhenstarted;
|
|
|
|
G_EXTERN int numplayersprites;
|
|
|
|
G_EXTERN int show_shareware;
|
|
|
|
G_EXTERN int spriteqloc;
|
|
|
|
G_EXTERN int max_player_health;
|
|
|
|
G_EXTERN int max_armour_amount;
|
|
|
|
G_EXTERN int lasermode;
|
|
|
|
G_EXTERN int screenpeek;
|
|
|
|
|
|
|
|
G_EXTERN int16_t animatesect[MAXANIMATES];
|
|
|
|
G_EXTERN int * animateptr[MAXANIMATES];
|
|
|
|
G_EXTERN int animategoal[MAXANIMATES];
|
|
|
|
G_EXTERN int animatevel[MAXANIMATES];
|
2020-06-11 07:22:16 +00:00
|
|
|
|
2020-05-21 09:41:48 +00:00
|
|
|
G_EXTERN int16_t clouds[256];
|
2020-07-06 01:00:52 +00:00
|
|
|
G_EXTERN int16_t cloudx;
|
|
|
|
G_EXTERN int16_t cloudy;
|
|
|
|
G_EXTERN ClockTicks cloudtotalclock;
|
2020-06-11 07:22:16 +00:00
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
G_EXTERN int16_t spriteq[1024];
|
|
|
|
G_EXTERN int16_t cyclers[MAXCYCLERS][6];
|
2020-05-21 09:41:48 +00:00
|
|
|
G_EXTERN int16_t mirrorsector[64];
|
|
|
|
G_EXTERN int16_t mirrorwall[64];
|
2020-06-11 07:22:16 +00:00
|
|
|
G_EXTERN ClockTicks lockclock;
|
|
|
|
G_EXTERN ClockTicks ototalclock;
|
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
G_EXTERN int wupass;
|
|
|
|
G_EXTERN int chickenplant;
|
|
|
|
G_EXTERN int thunderon;
|
|
|
|
G_EXTERN int ufospawn;
|
|
|
|
G_EXTERN int ufocnt;
|
|
|
|
G_EXTERN int hulkspawn;
|
|
|
|
G_EXTERN int lastlevel;
|
|
|
|
|
|
|
|
G_EXTERN int geosectorwarp[MAXGEOSECTORS];
|
|
|
|
G_EXTERN int geosectorwarp2[MAXGEOSECTORS];
|
|
|
|
G_EXTERN int geosector[MAXGEOSECTORS];
|
|
|
|
G_EXTERN int geox[MAXGEOSECTORS];
|
|
|
|
G_EXTERN int geoy[MAXGEOSECTORS];
|
|
|
|
G_EXTERN int geox2[MAXGEOSECTORS];
|
|
|
|
G_EXTERN int geoy2[MAXGEOSECTORS];
|
2020-05-21 09:41:48 +00:00
|
|
|
G_EXTERN uint32_t geocnt;
|
2020-06-11 07:22:16 +00:00
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
G_EXTERN int g_thunderFlash;
|
|
|
|
G_EXTERN int g_thunderTime;
|
|
|
|
G_EXTERN int g_winderFlash;
|
|
|
|
G_EXTERN int g_winderTime;
|
|
|
|
G_EXTERN int g_brightness;
|
2020-06-11 07:22:16 +00:00
|
|
|
|
2020-05-14 07:07:07 +00:00
|
|
|
G_EXTERN int16_t ambientlotag[64];
|
|
|
|
G_EXTERN int16_t ambienthitag[64];
|
2020-05-21 09:41:48 +00:00
|
|
|
G_EXTERN uint32_t ambientfx;
|
2020-06-11 07:22:16 +00:00
|
|
|
|
2020-07-19 17:31:31 +00:00
|
|
|
G_EXTERN int msx[MAXANIMPOINTS], msy[MAXANIMPOINTS];
|
2020-06-11 07:22:16 +00:00
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
G_EXTERN int WindTime, WindDir;
|
|
|
|
G_EXTERN int16_t fakebubba_spawn, mamaspawn_count, banjosound, BellTime, BellSprite /* word_119BE0*/;
|
2020-05-10 18:59:38 +00:00
|
|
|
G_EXTERN uint8_t g_spriteExtra[MAXSPRITES], g_sectorExtra[MAXSECTORS]; // move these back into the base structs!
|
2020-07-19 20:34:59 +00:00
|
|
|
G_EXTERN uint8_t enemysizecheat /*raat607*/, ufospawnsminion, pistonsound, chickenphase /* raat605*/, RRRA_ExitedLevel, fogactive;
|
2020-06-11 07:22:16 +00:00
|
|
|
|
2020-07-06 21:33:33 +00:00
|
|
|
G_EXTERN player_orig po[MAXPLAYERS];
|
2020-06-11 07:22:16 +00:00
|
|
|
|
|
|
|
G_EXTERN uint32_t everyothertime;
|
2020-07-06 20:23:18 +00:00
|
|
|
|
|
|
|
|
2020-06-11 07:22:16 +00:00
|
|
|
END_DUKE_NS
|
|
|
|
|
2020-07-06 20:23:18 +00:00
|
|
|
#include "inlines.h"
|
|
|
|
|
2020-06-11 07:22:16 +00:00
|
|
|
#endif
|