summaryrefslogtreecommitdiffstats
path: root/src/core/Clock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Clock.cpp')
-rw-r--r--src/core/Clock.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/Clock.cpp b/src/core/Clock.cpp
index e4b908e0..6c54ac63 100644
--- a/src/core/Clock.cpp
+++ b/src/core/Clock.cpp
@@ -5,6 +5,8 @@
#include "Clock.h"
#include "Stats.h"
+// --MIAMI: File done
+
_TODO("gbFastTime");
bool gbFastTime;
@@ -73,8 +75,14 @@ CClock::Update(void)
void
CClock::SetGameClock(uint8 h, uint8 m)
{
- ms_nGameClockHours = h;
+ while (m >= 60) {
+ m -= 60;
+ h++;
+ }
ms_nGameClockMinutes = m;
+ while (h >= 24)
+ h -= 24;
+ ms_nGameClockHours = h;
ms_nGameClockSeconds = 0;
ms_nLastClockTick = CTimer::GetTimeInMilliseconds();
}