16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 11:09:19 +02:00

build 180404. optional scenario clock sync with current local time, keyboard input for the ui layer

This commit is contained in:
tmj-fstate
2018-04-06 01:12:15 +02:00
parent 07f14381a8
commit 87f078925c
12 changed files with 898 additions and 796 deletions

View File

@@ -76,7 +76,7 @@ bool TEventLauncher::Load(cParser *parser)
auto const timeoffset { static_cast<int>( Global.ScenarioTimeOffset * 60 ) };
if( timeoffset != 0 ) {
auto const adjustedtime { clamp_circular( iHour * 60 + iMinute + timeoffset, 24 * 60 ) };
iHour = ( adjustedtime / 60 ) % 60;
iHour = ( adjustedtime / 60 ) % 24;
iMinute = adjustedtime % 60;
}
WriteLog(