|
@@ -120,41 +120,41 @@ void SetDate(uint date)
|
|
|
void CSleep(int milliseconds)
|
|
|
{
|
|
|
#if defined(WIN32)
|
|
|
Sleep(milliseconds);
|
|
|
#endif
|
|
|
#if defined(UNIX)
|
|
|
#if !defined(__BEOS__) && !defined(__AMIGA__)
|
|
|
usleep(milliseconds * 1000);
|
|
|
#endif
|
|
|
#ifdef __BEOS__
|
|
|
snooze(milliseconds * 1000);
|
|
|
#endif
|
|
|
#if defined(__AMIGA__)
|
|
|
#if defined(__AMIGA__)
|
|
|
{
|
|
|
ULONG signals;
|
|
|
ULONG TimerSigBit = 1 << TimerPort->mp_SigBit;
|
|
|
|
|
|
// send IORequest
|
|
|
TimerRequest->tr_node.io_Command = TR_ADDREQUEST;
|
|
|
TimerRequest->tr_time.tv_secs = (milliseconds * 1000) / 1000000;
|
|
|
TimerRequest->tr_time.tv_micro = (milliseconds * 1000) % 1000000;
|
|
|
SendIO((struct IORequest *)TimerRequest);
|
|
|
|
|
|
if (!((signals = Wait(TimerSigBit | SIGBREAKF_CTRL_C)) & TimerSigBit) ) {
|
|
|
AbortIO((struct IORequest *)TimerRequest);
|
|
|
}
|
|
|
WaitIO((struct IORequest *)TimerRequest);
|
|
|
}
|
|
|
#endif // __AMIGA__
|
|
|
#endif // __AMIGA__
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
void InitializeClearLand();
|
|
|
void InitializeRail();
|
|
|
void InitializeRailGui();
|
|
|
void InitializeRoad();
|
|
|
void InitializeRoadGui();
|
|
|
void InitializeAirportGui();
|
|
|
void InitializeDock();
|
|
|
void InitializeDockGui();
|
|
|
void InitializeIndustries();
|
|
@@ -681,24 +681,28 @@ void IncreaseDate()
|
|
|
/* check if we entered a new year? */
|
|
|
if ((byte)ymd.year == _cur_year)
|
|
|
return;
|
|
|
_cur_year = ymd.year;
|
|
|
|
|
|
/* yes, call various yearly loops */
|
|
|
|
|
|
PlayersYearlyLoop();
|
|
|
TrainsYearlyLoop();
|
|
|
RoadVehiclesYearlyLoop();
|
|
|
AircraftYearlyLoop();
|
|
|
ShipsYearlyLoop();
|
|
|
#ifdef ENABLE_NETWORK
|
|
|
if (_network_server)
|
|
|
NetworkServerYearlyLoop();
|
|
|
#endif /* ENABLE_NETWORK */
|
|
|
|
|
|
/* check if we reached 2090, that's the maximum year. */
|
|
|
if (_cur_year == 171) {
|
|
|
Vehicle *v;
|
|
|
_cur_year = 170;
|
|
|
_date = 62093;
|
|
|
FOR_ALL_VEHICLES(v) {
|
|
|
v->date_of_last_service -= 365; // 1 year is 365 days long
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (_patches.auto_euro)
|