- All Games: Move `gameclock` and `lastTic` to gamecontrol.

This commit is contained in:
Mitchell Richters 2020-08-26 09:41:23 +10:00
parent 76776d24d7
commit e0aaaf1f60
11 changed files with 9 additions and 16 deletions

View File

@ -35,8 +35,6 @@ BEGIN_BLD_NS
bool bVanilla = false;
int gFrameClock;
int gFrameTicks;
int gameclock;
int lastTic;
int gFrame;
//int volatile gGameClock;
int gFrameRate;

View File

@ -32,8 +32,6 @@ BEGIN_BLD_NS
extern int gFrameClock;
extern int gFrameTicks;
extern int gameclock;
extern int lastTic;
extern int gFrame;
//extern int gGameClock;
extern int gFrameRate;

View File

@ -100,6 +100,8 @@ auto vsnprintfptr = vsnprintf; // This is an inline in Visual Studio but we need
static int lastototalclk;
static uint64_t elapsedTime;
static uint64_t lastTime;
int gameclock;
int lastTic;
bool sendPause;
int automapMode;

View File

@ -221,3 +221,5 @@ enum AM_Mode
extern int automapMode;
extern bool automapFollow;
extern bool sendPause;
extern int gameclock;
extern int lastTic;

View File

@ -60,8 +60,7 @@ enum {
kSectLava = 0x4000,
};
extern int ogameclock, gameclock;
extern int lastTic;
extern int ogameclock;
extern int initx;
extern int inity;
extern int initz;

View File

@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//#include <io.h>
//#include <fcntl.h>
#include "gamecvars.h"
#include "gamecontrol.h"
// static int globhiz, globloz, globhihit, globlohit;

View File

@ -39,8 +39,6 @@ enum
};
int ogameclock = 0;
int gameclock = 0;
int lastTic;
int initx, inity, initz;
short inita, initsect;

View File

@ -53,8 +53,7 @@ int max_player_health;
int max_armour_amount;
int lasermode;
int gameclock = 0, cameradist = 0, cameraclock = 0;
int lastTic = -1;
int cameradist = 0, cameraclock = 0;
int otherp;
TileInfo tileinfo[MAXTILES]; // This is not from EDuke32.
ActorInfo actorinfo[MAXTILES];

View File

@ -37,8 +37,6 @@ extern int max_player_health;
extern int max_armour_amount;
extern int lasermode;
extern int gameclock;
extern int lastTic;
extern int cameraclock;
extern int cameradist;
extern int otherp; // transient helper, MP only

View File

@ -2188,8 +2188,7 @@ extern USER puser[MAX_SW_PLAYERS_REG];
///////////////////////////
extern int gotlastpacketclock;
extern int ogameclock, gameclock;
extern int lastTic;
extern int ogameclock;
extern SWBOOL ready2send;
extern double smoothratio;

View File

@ -95,8 +95,7 @@ uint8_t syncstat[MAXSYNCBYTES];
int syncvaltail, syncvaltottail;
void GetSyncInfoFromPacket(uint8_t *packbuf, int packbufleng, int *j, int otherconnectindex);
int ogameclock, gameclock;
int lastTic;
int ogameclock;
double smoothratio;
// must start out as 0