Use station index in a few more places (#11066)

This commit is contained in:
Michael Steenbeek 2020-03-27 11:13:02 +01:00 committed by GitHub
parent 8546a227c6
commit b70c5cefd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 10 deletions

View file

@ -919,7 +919,7 @@ private:
}
dst->testing_flags = src->testing_flags;
dst->current_test_segment = src->current_test_segment;
dst->current_test_station = 0xFF;
dst->current_test_station = STATION_INDEX_NULL;
dst->average_speed_test_timeout = src->average_speed_test_timeout;
dst->slide_in_use = src->slide_in_use;
dst->slide_peep_t_shirt_colour = RCT1::GetColour(src->slide_peep_t_shirt_colour);

View file

@ -373,7 +373,7 @@ int32_t cable_lift_update_track_motion(Vehicle* cableLift)
_vehicleF64E2C = 0;
gCurrentVehicle = cableLift;
_vehicleMotionTrackFlags = 0;
_vehicleStationIndex = 0xFF;
_vehicleStationIndex = STATION_INDEX_NULL;
cableLift->velocity += cableLift->acceleration;
_vehicleVelocityF64E08 = cableLift->velocity;

View file

@ -3770,7 +3770,7 @@ static StationIndex ride_mode_check_valid_station_numbers(Ride* ride)
/**
* returns stationIndex of first station on success
* -1 on failure.
* STATION_INDEX_NULL on failure.
*/
static StationIndex ride_mode_check_station_present(Ride* ride)
{

View file

@ -193,7 +193,7 @@ struct RideMeasurement
uint16_t num_items{};
uint16_t current_item{};
uint8_t vehicle_index{};
uint8_t current_station{};
StationIndex current_station{};
int8_t vertical[MAX_ITEMS]{};
int8_t lateral[MAX_ITEMS]{};
uint8_t velocity[MAX_ITEMS]{};
@ -373,7 +373,7 @@ struct Ride
uint16_t guests_favourite;
uint32_t lifecycle_flags;
uint16_t total_air_time;
uint8_t current_test_station;
StationIndex current_test_station;
uint8_t num_circuits;
CoordsXYZ CableLiftLoc;
uint16_t cable_lift;

View file

@ -96,7 +96,7 @@ constexpr int16_t VEHICLE_STOPPING_SPIN_SPEED = 600;
Vehicle* gCurrentVehicle;
static uint8_t _vehicleBreakdown;
uint8_t _vehicleStationIndex;
StationIndex _vehicleStationIndex;
uint32_t _vehicleMotionTrackFlags;
int32_t _vehicleVelocityF64E08;
int32_t _vehicleVelocityF64E0C;
@ -1559,7 +1559,7 @@ static void vehicle_update_measurements(Vehicle* vehicle)
return;
}
if (ride->current_test_station == 0xFF)
if (ride->current_test_station == STATION_INDEX_NULL)
return;
if (!ride_get_entrance_location(ride, ride->current_test_station).isNull())
@ -7860,7 +7860,7 @@ static void sub_6DBF3E(Vehicle* vehicle)
return;
}
if (_vehicleStationIndex == 0xFF)
if (_vehicleStationIndex == STATION_INDEX_NULL)
{
_vehicleStationIndex = tileElement->AsTrack()->GetStationIndex();
}
@ -9552,7 +9552,7 @@ int32_t vehicle_update_track_motion(Vehicle* vehicle, int32_t* outStation)
_vehicleF64E2C = 0;
gCurrentVehicle = vehicle;
_vehicleMotionTrackFlags = 0;
_vehicleStationIndex = 0xFF;
_vehicleStationIndex = STATION_INDEX_NULL;
vehicle_update_track_motion_up_stop_check(vehicle);
check_and_apply_block_section_stop_site(vehicle);

View file

@ -519,7 +519,7 @@ uint16_t vehicle_get_move_info_size(int32_t trackSubposition, int32_t typeAndDir
bool vehicle_update_dodgems_collision(Vehicle* vehicle, int16_t x, int16_t y, uint16_t* spriteId);
extern Vehicle* gCurrentVehicle;
extern uint8_t _vehicleStationIndex;
extern StationIndex _vehicleStationIndex;
extern uint32_t _vehicleMotionTrackFlags;
extern int32_t _vehicleVelocityF64E08;
extern int32_t _vehicleVelocityF64E0C;