2019-05-15 16:52:37 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class CClock
|
|
|
|
{
|
2020-03-11 04:25:50 +01:00
|
|
|
public:
|
2019-05-15 16:52:37 +02:00
|
|
|
static uint8 &ms_nGameClockHours;
|
|
|
|
static uint8 &ms_nGameClockMinutes;
|
|
|
|
static uint16 &ms_nGameClockSeconds;
|
|
|
|
static uint8 &ms_Stored_nGameClockHours;
|
|
|
|
static uint8 &ms_Stored_nGameClockMinutes;
|
|
|
|
static uint16 &ms_Stored_nGameClockSeconds;
|
|
|
|
static uint32 &ms_nMillisecondsPerGameMinute;
|
2019-07-10 11:36:47 +02:00
|
|
|
static uint32 &ms_nLastClockTick;
|
2019-05-15 16:52:37 +02:00
|
|
|
static bool &ms_bClockHasBeenStored;
|
|
|
|
|
|
|
|
static void Initialise(uint32 scale);
|
|
|
|
static void Update(void);
|
|
|
|
static void SetGameClock(uint8 h, uint8 m);
|
|
|
|
static int32 GetGameClockMinutesUntil(uint8 h, uint8 m);
|
|
|
|
static bool GetIsTimeInRange(uint8 h1, uint8 h2);
|
|
|
|
static void StoreClock(void);
|
|
|
|
static void RestoreClock(void);
|
|
|
|
|
2019-06-27 10:58:51 +02:00
|
|
|
static uint8 GetHours(void) { return ms_nGameClockHours; }
|
|
|
|
static uint8 GetMinutes(void) { return ms_nGameClockMinutes; }
|
2019-05-15 16:52:37 +02:00
|
|
|
static int16 GetSeconds(void) { return ms_nGameClockSeconds; }
|
2019-06-27 10:58:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
static uint8 &GetHoursRef(void) { return ms_nGameClockHours; }
|
|
|
|
static uint8 &GetMinutesRef(void) { return ms_nGameClockMinutes; }
|
2019-05-15 16:52:37 +02:00
|
|
|
};
|