1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 06:23:04 +01:00

Refactor ride list to a manager with iterator

This commit is contained in:
Ted John
2019-08-03 17:27:50 +01:00
parent 073e4b0ccc
commit a3fe00f0a3
20 changed files with 387 additions and 341 deletions

View File

@@ -1225,16 +1225,7 @@ static int32_t cc_show_limits(InteractiveConsole& console, [[maybe_unused]] cons
map_reorganise_elements();
int32_t tileElementCount = gNextFreeTileElement - gTileElements - 1;
int32_t rideCount = 0;
for (int32_t i = 0; i < MAX_RIDES; ++i)
{
Ride* ride = get_ride(i);
if (ride->type != RIDE_TYPE_NULL)
{
rideCount++;
}
}
int32_t rideCount = ride_get_count();
int32_t spriteCount = 0;
for (int32_t i = 1; i < SPRITE_LIST_COUNT; ++i)
{