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

@@ -531,13 +531,13 @@ bool TTrainParameters::LoadTTfile(std::string scnpath, int iPlus, double vmax)
{
adjustedtime = clamp_circular( TimeTable[i].Ah * 60 + TimeTable[i].Am + timeoffset, 24 * 60 ); // nowe minuty
TimeTable[i].Am = adjustedtime % 60;
TimeTable[i].Ah = (adjustedtime /*div*/ / 60) % 60;
TimeTable[i].Ah = (adjustedtime / 60) % 24;
}
if ((TimeTable[i].Dh >= 0))
{
adjustedtime = clamp_circular( TimeTable[i].Dh * 60 + TimeTable[i].Dm + timeoffset, 24 * 60 ); // nowe minuty
TimeTable[i].Dm = adjustedtime % 60;
TimeTable[i].Dh = (adjustedtime /*div*/ / 60) % 60;
TimeTable[i].Dh = (adjustedtime / 60) % 24;
}
}
}