- 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; bool bVanilla = false;
int gFrameClock; int gFrameClock;
int gFrameTicks; int gFrameTicks;
int gameclock;
int lastTic;
int gFrame; int gFrame;
//int volatile gGameClock; //int volatile gGameClock;
int gFrameRate; int gFrameRate;

View file

@ -32,8 +32,6 @@ BEGIN_BLD_NS
extern int gFrameClock; extern int gFrameClock;
extern int gFrameTicks; extern int gFrameTicks;
extern int gameclock;
extern int lastTic;
extern int gFrame; extern int gFrame;
//extern int gGameClock; //extern int gGameClock;
extern int gFrameRate; 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 int lastototalclk;
static uint64_t elapsedTime; static uint64_t elapsedTime;
static uint64_t lastTime; static uint64_t lastTime;
int gameclock;
int lastTic;
bool sendPause; bool sendPause;
int automapMode; int automapMode;

View file

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

View file

@ -60,8 +60,7 @@ enum {
kSectLava = 0x4000, kSectLava = 0x4000,
}; };
extern int ogameclock, gameclock; extern int ogameclock;
extern int lastTic;
extern int initx; extern int initx;
extern int inity; extern int inity;
extern int initz; 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 <io.h>
//#include <fcntl.h> //#include <fcntl.h>
#include "gamecvars.h" #include "gamecvars.h"
#include "gamecontrol.h"
// static int globhiz, globloz, globhihit, globlohit; // static int globhiz, globloz, globhihit, globlohit;

View file

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

View file

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

View file

@ -37,8 +37,6 @@ extern int max_player_health;
extern int max_armour_amount; extern int max_armour_amount;
extern int lasermode; extern int lasermode;
extern int gameclock;
extern int lastTic;
extern int cameraclock; extern int cameraclock;
extern int cameradist; extern int cameradist;
extern int otherp; // transient helper, MP only 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 gotlastpacketclock;
extern int ogameclock, gameclock; extern int ogameclock;
extern int lastTic;
extern SWBOOL ready2send; extern SWBOOL ready2send;
extern double smoothratio; extern double smoothratio;

View file

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