2020-07-20 21:07:44 +00:00
|
|
|
#pragma once
|
2020-06-11 07:22:16 +00:00
|
|
|
|
|
|
|
#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 21:09:10 +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 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;
|
2020-07-19 21:09:10 +00:00
|
|
|
extern int camerashitable;
|
|
|
|
extern int max_player_health;
|
|
|
|
extern int max_armour_amount;
|
|
|
|
extern int lasermode;
|
2020-07-19 20:34:59 +00:00
|
|
|
|
|
|
|
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 21:09:10 +00:00
|
|
|
extern int duke3d_globalflags;
|
|
|
|
extern uint8_t ready2send;
|
|
|
|
extern input_t loc;
|
|
|
|
extern int gamequit;
|
|
|
|
extern int playerswhenstarted;
|
|
|
|
extern int show_shareware;
|
|
|
|
extern int screenpeek;
|
2020-07-19 18:04:11 +00:00
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
// Variables that must be saved
|
2020-07-21 19:32:38 +00:00
|
|
|
extern uint8_t sectorextra[MAXSECTORS]; // these hold fields that were formerly in sprite and sector. Move these back into the base structs!
|
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 21:09:10 +00:00
|
|
|
extern animwalltype animwall[MAXANIMWALLS];
|
|
|
|
extern int numanimwalls;
|
|
|
|
extern int animatecnt;
|
|
|
|
extern int numclouds;
|
|
|
|
extern int camsprite;
|
|
|
|
extern int numcyclers;
|
|
|
|
extern int earthquaketime;
|
|
|
|
extern int freezerhurtowner;
|
|
|
|
extern int global_random;
|
|
|
|
extern int impact_damage;
|
|
|
|
extern int mirrorcnt;
|
|
|
|
extern int numplayersprites;
|
|
|
|
extern int spriteqloc;
|
2020-07-20 21:07:44 +00:00
|
|
|
extern int thunder_brightness;
|
2020-07-19 21:09:10 +00:00
|
|
|
|
2020-07-20 18:40:29 +00:00
|
|
|
enum animtype_t
|
|
|
|
{
|
|
|
|
anim_floorz,
|
|
|
|
anim_ceilingz,
|
|
|
|
anim_vertexx,
|
|
|
|
anim_vertexy,
|
|
|
|
};
|
2020-07-19 21:09:10 +00:00
|
|
|
extern int16_t animatesect[MAXANIMATES];
|
2020-07-20 18:40:29 +00:00
|
|
|
extern int16_t animatetarget[MAXANIMATES];
|
|
|
|
extern int8_t animatetype[MAXANIMATES];
|
2020-07-19 21:09:10 +00:00
|
|
|
extern int animategoal[MAXANIMATES];
|
|
|
|
extern int animatevel[MAXANIMATES];
|
|
|
|
|
|
|
|
extern int16_t clouds[256];
|
|
|
|
extern int16_t cloudx;
|
|
|
|
extern int16_t cloudy;
|
2020-08-25 23:33:40 +00:00
|
|
|
extern int cloudclock;
|
2020-07-19 21:09:10 +00:00
|
|
|
|
|
|
|
extern int16_t spriteq[1024];
|
|
|
|
extern int16_t cyclers[MAXCYCLERS][6];
|
|
|
|
extern int16_t mirrorsector[64];
|
|
|
|
extern int16_t mirrorwall[64];
|
|
|
|
|
2020-08-25 23:33:40 +00:00
|
|
|
extern int lockclock;
|
2020-07-19 21:09:10 +00:00
|
|
|
|
|
|
|
extern int wupass;
|
|
|
|
extern int chickenplant;
|
|
|
|
extern int thunderon;
|
|
|
|
extern int ufospawn;
|
|
|
|
extern int ufocnt;
|
|
|
|
extern int hulkspawn;
|
|
|
|
extern int lastlevel;
|
|
|
|
|
|
|
|
extern int geosectorwarp[MAXGEOSECTORS];
|
|
|
|
extern int geosectorwarp2[MAXGEOSECTORS];
|
|
|
|
extern int geosector[MAXGEOSECTORS];
|
|
|
|
extern int geox[MAXGEOSECTORS];
|
|
|
|
extern int geoy[MAXGEOSECTORS];
|
|
|
|
extern int geox2[MAXGEOSECTORS];
|
|
|
|
extern int geoy2[MAXGEOSECTORS];
|
|
|
|
extern int geocnt;
|
|
|
|
|
|
|
|
extern short ambientlotag[64];
|
|
|
|
extern short ambienthitag[64];
|
|
|
|
extern unsigned ambientfx;
|
|
|
|
extern int msx[MAXANIMPOINTS], msy[MAXANIMPOINTS];
|
|
|
|
extern int WindTime, WindDir;
|
|
|
|
extern short fakebubba_spawn, mamaspawn_count, banjosound;
|
|
|
|
extern short BellTime, BellSprite /* word_119BE0*/;
|
|
|
|
extern uint8_t enemysizecheat /*raat607*/, ufospawnsminion, pistonsound, chickenphase /* raat605*/, RRRA_ExitedLevel, fogactive;
|
|
|
|
extern uint32_t everyothertime;
|
|
|
|
extern player_orig po[MAXPLAYERS];
|
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"
|
|
|
|
|