(svn r7372) - CodeChange: Rename all GetXXXArraySize() functions to GetNumXXX() and add GetMaxXXXIndex() functions. This prepares for the new pool interface.

This commit is contained in:
matthijs
2006-12-05 13:58:20 +00:00
parent 75ec6d9b77
commit e6ade36de1
17 changed files with 74 additions and 42 deletions

View File

@@ -2548,7 +2548,7 @@ void OnTick_Station(void)
if (_game_mode == GM_EDITOR) return;
i = _station_tick_ctr;
if (++_station_tick_ctr == GetStationArraySize()) _station_tick_ctr = 0;
if (++_station_tick_ctr > GetMaxStationIndex()) _station_tick_ctr = 0;
if (IsValidStationID(i)) StationHandleBigTick(GetStation(i));
@@ -3098,7 +3098,7 @@ static void Load_STNS(void)
}
/* This is to ensure all pointers are within the limits of _stations_size */
if (_station_tick_ctr > GetStationArraySize()) _station_tick_ctr = 0;
if (_station_tick_ctr > GetMaxStationIndex()) _station_tick_ctr = 0;
}
static void Save_ROADSTOP(void)