1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Use constants for null sprite location and maximum vehicles

This commit is contained in:
Gymnasiast
2017-01-24 19:06:47 +01:00
committed by Ted John
parent 02da9caf5d
commit 476f1fad2b
2 changed files with 3 additions and 2 deletions

View File

@@ -1166,6 +1166,7 @@ enum {
};
#define RCT1_MAX_STATIONS 4
#define RCT1_MAX_TRAINS_PER_RIDE 12
extern const uint8 gRideCategories[0x60];

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;