diff --git a/source/blood/src/choke.cpp b/source/blood/src/choke.cpp index 6f05d25ea..eb5460728 100644 --- a/source/blood/src/choke.cpp +++ b/source/blood/src/choke.cpp @@ -56,7 +56,7 @@ void CChoke::sub_84110(int x, int y) { if (!at8) return; - ClockTicks v4 = gFrameClock; + int v4 = gFrameClock; gFrameClock = gameclock; at8->x = x; at8->y = y; diff --git a/source/blood/src/d_menu.cpp b/source/blood/src/d_menu.cpp index 751537b19..00c78acd9 100644 --- a/source/blood/src/d_menu.cpp +++ b/source/blood/src/d_menu.cpp @@ -86,7 +86,7 @@ void CGameMenuItemQAV::Draw(void) if (raw.Size() > 0) { auto data = (QAV*)raw.Data(); - ClockTicks backFC = gFrameClock; + int backFC = gFrameClock; int currentclock = I_GetBuildTime(); gFrameClock = currentclock; int nTicks = currentclock - lastTick; diff --git a/source/blood/src/fire.cpp b/source/blood/src/fire.cpp index 0abe2cd05..86efff18b 100644 --- a/source/blood/src/fire.cpp +++ b/source/blood/src/fire.cpp @@ -98,7 +98,7 @@ void FireInit(void) void FireProcess(void) { - static ClockTicks lastUpdate; + static int lastUpdate; if (gameclock < lastUpdate || lastUpdate + 2 < gameclock) { DoFireFrame(); diff --git a/source/blood/src/globals.cpp b/source/blood/src/globals.cpp index 17de115c7..566580a03 100644 --- a/source/blood/src/globals.cpp +++ b/source/blood/src/globals.cpp @@ -33,8 +33,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_BLD_NS bool bVanilla = false; -ClockTicks gFrameClock; -ClockTicks gFrameTicks; +int gFrameClock; +int gFrameTicks; int gameclock; int lastTic; int gFrame; diff --git a/source/blood/src/globals.h b/source/blood/src/globals.h index d73273dc1..b31638f90 100644 --- a/source/blood/src/globals.h +++ b/source/blood/src/globals.h @@ -30,12 +30,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_BLD_NS -extern ClockTicks gFrameClock; -extern ClockTicks gFrameTicks; +extern int gFrameClock; +extern int gFrameTicks; extern int gameclock; extern int lastTic; extern int gFrame; -//extern ClockTicks gGameClock; +//extern int gGameClock; extern int gFrameRate; extern bool bVanilla; diff --git a/source/blood/src/loadsave.cpp b/source/blood/src/loadsave.cpp index 103bc60ef..aaabf3d0d 100644 --- a/source/blood/src/loadsave.cpp +++ b/source/blood/src/loadsave.cpp @@ -710,7 +710,7 @@ void MyLoadSave::Save(void) Write(&gFrameClock, sizeof(gFrameClock)); Write(&gFrameTicks, sizeof(gFrameTicks)); Write(&gFrame, sizeof(gFrame)); - ClockTicks nGameClock = gameclock; + int nGameClock = gameclock; Write(&nGameClock, sizeof(nGameClock)); Write(&gLevelTime, sizeof(gLevelTime)); Write(&paused, sizeof(paused)); diff --git a/source/blood/src/network.cpp b/source/blood/src/network.cpp index 9d4cc1352..861baac9c 100644 --- a/source/blood/src/network.cpp +++ b/source/blood/src/network.cpp @@ -40,7 +40,7 @@ BEGIN_BLD_NS MapRecord *gStartNewGame = 0; PACKETMODE gPacketMode = PACKETMODE_1; -ClockTicks gNetFifoClock = 0; +int gNetFifoClock = 0; int gNetFifoTail = 0; int gNetFifoHead[8]; int gPredictTail = 0; diff --git a/source/blood/src/network.h b/source/blood/src/network.h index ca308e723..7ab120036 100644 --- a/source/blood/src/network.h +++ b/source/blood/src/network.h @@ -45,7 +45,7 @@ enum NETWORKMODE { extern MapRecord *gStartNewGame; extern PACKETMODE gPacketMode; -extern ClockTicks gNetFifoClock; +extern int gNetFifoClock; extern int gNetFifoTail; extern int gNetFifoHead[8]; extern int gPredictTail; diff --git a/source/blood/src/player.cpp b/source/blood/src/player.cpp index f39e65df4..d09214ead 100644 --- a/source/blood/src/player.cpp +++ b/source/blood/src/player.cpp @@ -856,7 +856,7 @@ void playerReset(PLAYER *pPlayer) } int dword_21EFB0[8]; -ClockTicks dword_21EFD0[8]; +int dword_21EFD0[8]; void playerInit(int nPlayer, unsigned int a2) { diff --git a/source/blood/src/player.h b/source/blood/src/player.h index 3e5358a11..61e1bf7b2 100644 --- a/source/blood/src/player.h +++ b/source/blood/src/player.h @@ -230,7 +230,7 @@ extern bool gRedFlagDropped; extern PROFILE gProfile[kMaxPlayers]; extern int dword_21EFB0[kMaxPlayers]; -extern ClockTicks dword_21EFD0[kMaxPlayers]; +extern int dword_21EFD0[kMaxPlayers]; extern AMMOINFO gAmmoInfo[]; extern POWERUPINFO gPowerUpInfo[kMaxPowerUps]; diff --git a/source/blood/src/sbar.cpp b/source/blood/src/sbar.cpp index bd5a1bef9..232ec7d25 100644 --- a/source/blood/src/sbar.cpp +++ b/source/blood/src/sbar.cpp @@ -446,7 +446,7 @@ private: // //--------------------------------------------------------------------------- - void viewDrawCtfHudVanilla(ClockTicks arg) + void viewDrawCtfHudVanilla(int arg) { FString gTempStr; int x = 1, y = 1; @@ -477,7 +477,7 @@ private: // //--------------------------------------------------------------------------- - void flashTeamScore(ClockTicks arg, int team, bool show) + void flashTeamScore(int arg, int team, bool show) { dassert(0 == team || 1 == team); // 0: blue, 1: red @@ -498,7 +498,7 @@ private: // //--------------------------------------------------------------------------- - void viewDrawCtfHud(ClockTicks arg) + void viewDrawCtfHud(int arg) { if (hud_size == Hud_Nothing) { @@ -744,7 +744,7 @@ private: // //--------------------------------------------------------------------------- public: - void UpdateStatusBar(ClockTicks arg) + void UpdateStatusBar(int arg) { PLAYER* pPlayer = gView; XSPRITE* pXSprite = pPlayer->pXSprite; @@ -822,7 +822,7 @@ static void UpdateFrame(void) twod->AddFlatFill(windowxy1.x - 3, windowxy2.y + 1, windowxy2.x + 1, windowxy2.y + 4, tex, 0, 1, 0xff2a2a2a); } -void UpdateStatusBar(ClockTicks arg) +void UpdateStatusBar(int arg) { DBloodStatusBar sbar; diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index 63c150316..c3a717a8a 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -346,7 +346,7 @@ void viewInit(void) gViewMap.sub_25C38(0, 0, gZoom, 0); } -void viewDrawInterface(ClockTicks arg) +void viewDrawInterface(int arg) { UpdateStatusBar(arg); } @@ -647,13 +647,13 @@ int32_t g_frameRate; void viewDrawScreen(bool sceneonly) { int nPalette = 0; - static ClockTicks lastUpdate; + static int lastUpdate; int defaultHoriz = r_horizcenter ? 100 : 90; #ifdef USE_OPENGL polymostcenterhoriz = defaultHoriz; #endif - ClockTicks delta = gameclock - lastUpdate; + int delta = gameclock - lastUpdate; if (delta < 0) delta = 0; lastUpdate = gameclock; diff --git a/source/blood/src/view.h b/source/blood/src/view.h index 57060daa3..46f7f7f36 100644 --- a/source/blood/src/view.h +++ b/source/blood/src/view.h @@ -154,9 +154,9 @@ void CalcInterpolations(void); void RestoreInterpolations(void); void viewDrawText(int nFont, const char *pString, int x, int y, int nShade, int nPalette, int position, char shadow, unsigned int nStat = 0, uint8_t alpha = 255); void InitStatusBar(void); -void UpdateStatusBar(ClockTicks arg); +void UpdateStatusBar(int arg); void viewInit(void); -void viewDrawInterface(ClockTicks arg); +void viewDrawInterface(int arg); void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t smooth); void CalcOtherPosition(spritetype *pSprite, int *pX, int *pY, int *pZ, int *vsectnum, int nAng, int zm); void CalcPosition(spritetype *pSprite, int *pX, int *pY, int *pZ, int *vsectnum, int nAng, int zm); diff --git a/source/build/include/compat.h b/source/build/include/compat.h index 2689681ca..0fc877251 100644 --- a/source/build/include/compat.h +++ b/source/build/include/compat.h @@ -950,7 +950,6 @@ static FORCE_INLINE char *Bstrncpyz(char *dst, const char *src, bsize_t n) #include "fix16.h" #include "vectors.h" -using ClockTicks = int; inline FVector3 GetSoundPos(const vec3_t *pos) { diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index 0ea0b6b4f..d5193b182 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -97,7 +97,7 @@ int myconnectindex, numplayers; int connecthead, connectpoint2[MAXMULTIPLAYERS]; int32_t xres = -1, yres = -1, bpp = 0; auto vsnprintfptr = vsnprintf; // This is an inline in Visual Studio but we need an address for it to satisfy the MinGW compiled libraries. -static ClockTicks lastototalclk; +static int lastototalclk; static uint64_t elapsedTime; static uint64_t lastTime; @@ -1125,7 +1125,7 @@ void S_SetSoundPaused(int state) } } -double CalcSmoothRatio(ClockTicks totalclk, ClockTicks ototalclk, int realgameticspersec) +double CalcSmoothRatio(int totalclk, int ototalclk, int realgameticspersec) { double ratio, result; diff --git a/source/core/gamecontrol.h b/source/core/gamecontrol.h index 140305b91..45c888c49 100644 --- a/source/core/gamecontrol.h +++ b/source/core/gamecontrol.h @@ -192,7 +192,7 @@ void S_ResumeSound(bool notsfx); void S_SetSoundPaused(int state); void G_FatalEngineError(void); -double CalcSmoothRatio(ClockTicks totalclk, ClockTicks ototalclk, int realgameticspersec); +double CalcSmoothRatio(int totalclk, int ototalclk, int realgameticspersec); enum { MaxSmoothRatio = FRACUNIT diff --git a/source/games/duke/src/global.cpp b/source/games/duke/src/global.cpp index e624742c6..77f6e5585 100644 --- a/source/games/duke/src/global.cpp +++ b/source/games/duke/src/global.cpp @@ -110,14 +110,14 @@ int animatevel[MAXANIMATES]; int16_t clouds[256]; int16_t cloudx; int16_t cloudy; -ClockTicks cloudclock; +int cloudclock; int16_t spriteq[1024]; int16_t cyclers[MAXCYCLERS][6]; int16_t mirrorsector[64]; int16_t mirrorwall[64]; -ClockTicks lockclock; +int lockclock; // Redneck Rampage int wupass; diff --git a/source/games/duke/src/global.h b/source/games/duke/src/global.h index bbc813a05..f7fc366e8 100644 --- a/source/games/duke/src/global.h +++ b/source/games/duke/src/global.h @@ -103,14 +103,14 @@ extern int animatevel[MAXANIMATES]; extern int16_t clouds[256]; extern int16_t cloudx; extern int16_t cloudy; -extern ClockTicks cloudclock; +extern int cloudclock; extern int16_t spriteq[1024]; extern int16_t cyclers[MAXCYCLERS][6]; extern int16_t mirrorsector[64]; extern int16_t mirrorwall[64]; -extern ClockTicks lockclock; +extern int lockclock; extern int wupass; extern int chickenplant; diff --git a/source/games/duke/src/inlines.h b/source/games/duke/src/inlines.h index 0bf2fd2e4..df7fb13c1 100644 --- a/source/games/duke/src/inlines.h +++ b/source/games/duke/src/inlines.h @@ -169,7 +169,7 @@ inline bool playrunning() return (paused == 0 || (paused == 1 && (ud.recstat == 2 || ud.multimode > 1))); } -inline double calc_smoothratio(ClockTicks totalclk, ClockTicks ototalclk) +inline double calc_smoothratio(int totalclk, int ototalclk) { double smoothratio = CalcSmoothRatio(totalclk, ototalclk, REALGAMETICSPERSEC); return (playrunning() ? smoothratio : MaxSmoothRatio); diff --git a/source/sw/src/game.h b/source/sw/src/game.h index 9c2f423e1..8ade7786e 100644 --- a/source/sw/src/game.h +++ b/source/sw/src/game.h @@ -2317,7 +2317,7 @@ void AudioUpdate(void); // stupid extern short LastSaveNum; void LoadSaveMsg(const char *msg); -void UpdateStatusBar(ClockTicks arg); +void UpdateStatusBar(int arg); void InitFonts(); int32_t registerosdcommands(void); void registerinputcommands(); diff --git a/source/sw/src/sbar.cpp b/source/sw/src/sbar.cpp index 4b26430a9..c4de0237e 100644 --- a/source/sw/src/sbar.cpp +++ b/source/sw/src/sbar.cpp @@ -940,7 +940,7 @@ private: // //--------------------------------------------------------------------------- public: - void UpdateStatusBar(ClockTicks arg) + void UpdateStatusBar(int arg) { int nPalette = 0; double inv_x, inv_y; @@ -1007,7 +1007,7 @@ static void UpdateFrame(void) // //--------------------------------------------------------------------------- -void UpdateStatusBar(ClockTicks arg) +void UpdateStatusBar(int arg) { DSWStatusBar sbar;