Use constants for null sprite location and maximum vehicles

This commit is contained in:
Gymnasiast authored and Ted John committed 2017-01-26 23:30:16 +00:00
1 parent 02da9caf5d
commit 476f1fad2b
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -1166,6 +1166,7 @@ enum {
};
#define RCT1_MAX_STATIONS 4
#define RCT1_MAX_TRAINS_PER_RIDE 12
extern const uint8 gRideCategories[0x60];
+2 -2
View File
@@ -776,7 +776,7 @@ private:
}
else
{
for (int i = 0; i < 12; i++)
for (int i = 0; i < RCT1_MAX_TRAINS_PER_RIDE; i++)
{
// RCT1 had no third colour
RCT1::RCT1VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor = RCT1::GetColourSchemeCopyDescriptor(src->vehicle_type);
@@ -892,7 +892,7 @@ private:
if (_s4.sprites[i].unknown.sprite_identifier == SPRITE_IDENTIFIER_VEHICLE)
{
rct1_vehicle * srcVehicle = &_s4.sprites[i].vehicle;
if (srcVehicle->x != (sint16)0x8000)
if (srcVehicle->x != SPRITE_LOCATION_NULL)
{
rct_vehicle * vehicle = (rct_vehicle *)create_sprite(SPRITE_IDENTIFIER_VEHICLE);
spriteIndexMap[i] = vehicle->sprite_index;