2020-07-20 21:07:44 +00:00
|
|
|
#pragma once
|
2020-06-11 07:22:16 +00:00
|
|
|
|
|
|
|
#include "build.h"
|
2020-06-21 20:18:12 +00:00
|
|
|
#include "duke3d.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-08-30 08:42:44 +00:00
|
|
|
#include "d_net.h"
|
2021-12-05 13:00:22 +00:00
|
|
|
#include "serialize_obj.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-11-29 12:54:58 +00:00
|
|
|
struct DukeGameInfo
|
|
|
|
{
|
|
|
|
// Static constant global state
|
2020-11-29 21:31:02 +00:00
|
|
|
int respawnactortime;
|
|
|
|
int bouncemineblastradius;
|
|
|
|
int respawnitemtime;
|
|
|
|
int morterblastradius;
|
|
|
|
int numfreezebounces;
|
|
|
|
int pipebombblastradius;
|
|
|
|
int playerfriction;
|
|
|
|
int rpgblastradius;
|
|
|
|
int seenineblastradius;
|
|
|
|
int shrinkerblastradius;
|
|
|
|
int gravity;
|
|
|
|
int tripbombblastradius;
|
|
|
|
int camerashitable;
|
|
|
|
int max_player_health;
|
|
|
|
int max_armour_amount;
|
|
|
|
int lasermode;
|
|
|
|
int freezerhurtowner;
|
|
|
|
int impact_damage;
|
|
|
|
|
|
|
|
TileInfo tileinfo[MAXTILES]; // This is not from EDuke32.
|
|
|
|
ActorInfo actorinfo[MAXTILES];
|
|
|
|
int16_t max_ammo_amount[MAX_WEAPONS];
|
|
|
|
int16_t weaponsandammosprites[15];
|
|
|
|
int playerheight;
|
|
|
|
int displayflags;
|
2020-11-29 12:54:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern DukeGameInfo gs;
|
2020-07-19 20:34:59 +00:00
|
|
|
|
2021-12-05 13:00:22 +00:00
|
|
|
inline TObjPtr<DDukeActor*> camsprite;
|
|
|
|
inline TObjPtr<DDukeActor*> BellSprite;
|
|
|
|
inline TObjPtr<DDukeActor*> spriteq[1024];
|
|
|
|
inline TObjPtr<DDukeActor*> currentCommentarySprite;
|
|
|
|
|
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
extern int otherp; // transient helper, MP only
|
|
|
|
extern int actor_tog; // cheat state
|
|
|
|
extern intptr_t apScriptGameEvent[];
|
|
|
|
extern TArray<int> ScriptCode;
|
2020-07-19 21:09:10 +00:00
|
|
|
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
|
|
|
|
extern int rtsplaying;
|
|
|
|
extern int tempwallptr;
|
2020-10-17 07:06:09 +00:00
|
|
|
|
2020-07-19 18:04:11 +00:00
|
|
|
extern bool sound445done;
|
2020-07-19 20:34:59 +00:00
|
|
|
extern player_struct ps[MAXPLAYERS];
|
|
|
|
extern int spriteqamount;
|
|
|
|
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 numcyclers;
|
|
|
|
extern int earthquaketime;
|
|
|
|
extern int global_random;
|
|
|
|
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,
|
|
|
|
};
|
2021-11-18 18:20:12 +00:00
|
|
|
extern sectortype* animatesect[MAXANIMATES];
|
2021-11-07 08:47:57 +00:00
|
|
|
extern int animatetarget[MAXANIMATES];
|
2020-07-20 18:40:29 +00:00
|
|
|
extern int8_t animatetype[MAXANIMATES];
|
2020-07-19 21:09:10 +00:00
|
|
|
extern int animategoal[MAXANIMATES];
|
|
|
|
extern int animatevel[MAXANIMATES];
|
|
|
|
|
2021-11-17 23:04:52 +00:00
|
|
|
extern sectortype* clouds[256];
|
2020-12-06 19:49:32 +00:00
|
|
|
extern float cloudx;
|
|
|
|
extern float cloudy;
|
2020-08-25 23:33:40 +00:00
|
|
|
extern int cloudclock;
|
2020-07-19 21:09:10 +00:00
|
|
|
|
2021-11-06 20:53:15 +00:00
|
|
|
extern Cycler cyclers[MAXCYCLERS];
|
2021-11-17 23:27:03 +00:00
|
|
|
extern sectortype* mirrorsector[64];
|
2021-11-17 23:24:17 +00:00
|
|
|
extern walltype* mirrorwall[64];
|
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;
|
|
|
|
|
2021-11-21 08:08:05 +00:00
|
|
|
extern sectortype* geosectorwarp[MAXGEOSECTORS];
|
|
|
|
extern sectortype* geosectorwarp2[MAXGEOSECTORS];
|
|
|
|
extern sectortype* geosector[MAXGEOSECTORS];
|
2020-07-19 21:09:10 +00:00
|
|
|
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;
|
2021-11-17 23:12:28 +00:00
|
|
|
extern int msx[MAXANIMPOINTS], msy[MAXANIMPOINTS]; // todo: unlimit
|
|
|
|
extern TArray<CraneDef> cranes;
|
2020-07-19 21:09:10 +00:00
|
|
|
extern int WindTime, WindDir;
|
|
|
|
extern short fakebubba_spawn, mamaspawn_count, banjosound;
|
2020-10-26 06:30:34 +00:00
|
|
|
extern short BellTime;
|
2020-07-19 21:09:10 +00:00
|
|
|
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"
|
|
|
|
|