[saco] Implement/match CGame::SetWorldTime(...)

This commit is contained in:
RD42 2024-08-15 22:26:13 +08:00
parent 03d0aeadf1
commit 572c53d887
3 changed files with 14 additions and 0 deletions

View File

@ -493,6 +493,16 @@ BOOL CGame::IsModelLoaded(int iModelID)
//-----------------------------------------------------------
// MATCH
void CGame::SetWorldTime(int iHour, int iMinute)
{
*(PBYTE)0xB70152 = (BYTE)iMinute;
*(PBYTE)0xB70153 = (BYTE)iHour;
ScriptCommand(&set_current_time, iHour, iMinute);
}
//-----------------------------------------------------------
void CGame::GetWorldTime(BYTE* byteHour, BYTE* byteMinute)
{
*byteMinute = *(PBYTE)0xB70152;

View File

@ -48,6 +48,7 @@ public:
void LoadRequestedModels();
BOOL IsModelLoaded(int iModelID);
void SetWorldTime(int iHour, int iMinute);
void GetWorldTime(BYTE* byteHour, BYTE* byteMinute);
void ToggleThePassingOfTime(BYTE byteOnOff);
void SetWorldWeather(int iWeatherID);

View File

@ -33,6 +33,9 @@ const SCRIPT_COMMAND request_model = { 0x0247, "i" }; // (CAR_*|BIKE_*|BOA
const SCRIPT_COMMAND load_requested_models = { 0x038B, "" }; // -/-
const SCRIPT_COMMAND fade = { 0x016A, "ii" }; // (time in ms), FADE_*
const SCRIPT_COMMAND set_current_time = { 0x00C0, "ii" }; // Hours, Minutes
const SCRIPT_COMMAND is_model_available = { 0x0248, "i" }; // #MODEL
const SCRIPT_COMMAND set_camera_behind_player = { 0x0373, "" }; // -/-