From c207437a575802ec6dfaedfc9e4960f75531c1ee Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Wed, 26 Aug 2020 09:11:27 +1000 Subject: [PATCH] - Duke: Rename `cloudtotalclock` to `cloudclock`. * Mostly so it doesn't come up on searches for `totalclock`. --- source/games/duke/src/global.cpp | 2 +- source/games/duke/src/global.h | 2 +- source/games/duke/src/premap.cpp | 2 +- source/games/duke/src/savegame.cpp | 2 +- source/games/duke/src/sectors.cpp | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/games/duke/src/global.cpp b/source/games/duke/src/global.cpp index dea450a33..e624742c6 100644 --- a/source/games/duke/src/global.cpp +++ b/source/games/duke/src/global.cpp @@ -110,7 +110,7 @@ int animatevel[MAXANIMATES]; int16_t clouds[256]; int16_t cloudx; int16_t cloudy; -ClockTicks cloudtotalclock; +ClockTicks cloudclock; int16_t spriteq[1024]; int16_t cyclers[MAXCYCLERS][6]; diff --git a/source/games/duke/src/global.h b/source/games/duke/src/global.h index e384461a3..bbc813a05 100644 --- a/source/games/duke/src/global.h +++ b/source/games/duke/src/global.h @@ -103,7 +103,7 @@ extern int animatevel[MAXANIMATES]; extern int16_t clouds[256]; extern int16_t cloudx; extern int16_t cloudy; -extern ClockTicks cloudtotalclock; +extern ClockTicks cloudclock; extern int16_t spriteq[1024]; extern int16_t cyclers[MAXCYCLERS][6]; diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index b1e46a254..d6b27c58e 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -759,7 +759,7 @@ void resettimevars(void) I_ResetTime(); lastTic = -1; gameclock = 0; - cloudtotalclock = 0; + cloudclock = 0; levelTextTime = 85; lockclock = 0; ready2send = 1; diff --git a/source/games/duke/src/savegame.cpp b/source/games/duke/src/savegame.cpp index a3a4fadc4..3a89f2358 100644 --- a/source/games/duke/src/savegame.cpp +++ b/source/games/duke/src/savegame.cpp @@ -434,7 +434,7 @@ void GameInterface::SerializeGameState(FSerializer& arc) ("numclouds", numclouds) ("cloudx", cloudx) ("cloudy", cloudy) - ("cloudtotalclock", cloudtotalclock) + ("cloudclock", cloudclock) .Array("clouds", clouds, numclouds) .Array("spriteq", spriteq, 1024) diff --git a/source/games/duke/src/sectors.cpp b/source/games/duke/src/sectors.cpp index c87aac25b..9df3f8346 100644 --- a/source/games/duke/src/sectors.cpp +++ b/source/games/duke/src/sectors.cpp @@ -1142,9 +1142,9 @@ void allignwarpelevators(void) void moveclouds(void) { - if (gameclock > cloudtotalclock || gameclock < (cloudtotalclock - 7)) + if (gameclock > cloudclock || gameclock < (cloudclock - 7)) { - cloudtotalclock = gameclock + 6; + cloudclock = gameclock + 6; // cloudx/y were an array, but all entries were always having the same value so a single pair is enough. cloudx += (sintable[(ps[screenpeek].getang() + 512) & 2047] >> 9);