mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Use a 16-bit integer for track type in more places
This commit is contained in:
@@ -559,12 +559,12 @@ const rct_trackdefinition FlatRideTrackDefinitions[256] =
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
PitchAndRoll TrackPitchAndRollStart(uint8_t trackType)
|
||||
PitchAndRoll TrackPitchAndRollStart(track_type_t trackType)
|
||||
{
|
||||
return { TrackDefinitions[trackType].vangle_start, TrackDefinitions[trackType].bank_start };
|
||||
}
|
||||
|
||||
PitchAndRoll TrackPitchAndRollEnd(uint8_t trackType)
|
||||
PitchAndRoll TrackPitchAndRollEnd(track_type_t trackType)
|
||||
{
|
||||
return { TrackDefinitions[trackType].vangle_end, TrackDefinitions[trackType].bank_end };
|
||||
}
|
||||
@@ -1166,7 +1166,7 @@ bool track_type_is_station(track_type_t trackType)
|
||||
}
|
||||
}
|
||||
|
||||
bool track_element_is_covered(int32_t trackElementType)
|
||||
bool track_element_is_covered(track_type_t trackElementType)
|
||||
{
|
||||
switch (trackElementType)
|
||||
{
|
||||
@@ -1195,13 +1195,13 @@ bool track_element_is_covered(int32_t trackElementType)
|
||||
}
|
||||
}
|
||||
|
||||
bool track_element_is_booster(uint8_t rideType, uint8_t trackType)
|
||||
bool track_element_is_booster(uint8_t rideType, track_type_t trackType)
|
||||
{
|
||||
// Boosters share their ID with the Spinning Control track.
|
||||
return rideType != RIDE_TYPE_SPINNING_WILD_MOUSE && trackType == TRACK_ELEM_BOOSTER;
|
||||
}
|
||||
|
||||
bool track_element_has_speed_setting(uint8_t trackType)
|
||||
bool track_element_has_speed_setting(track_type_t trackType)
|
||||
{
|
||||
// This does not check if the element is really a Spinning Control track instead of a booster,
|
||||
// but this does not cause problems.
|
||||
|
||||
@@ -554,8 +554,8 @@ struct track_circuit_iterator
|
||||
extern const rct_trackdefinition FlatRideTrackDefinitions[256];
|
||||
extern const rct_trackdefinition TrackDefinitions[256];
|
||||
|
||||
PitchAndRoll TrackPitchAndRollStart(uint8_t trackType);
|
||||
PitchAndRoll TrackPitchAndRollEnd(uint8_t trackType);
|
||||
PitchAndRoll TrackPitchAndRollStart(track_type_t trackType);
|
||||
PitchAndRoll TrackPitchAndRollEnd(track_type_t trackType);
|
||||
|
||||
int32_t track_is_connected_by_shape(TileElement* a, TileElement* b);
|
||||
|
||||
@@ -571,7 +571,7 @@ bool track_circuit_iterators_match(const track_circuit_iterator* firstIt, const
|
||||
void track_get_back(CoordsXYE* input, CoordsXYE* output);
|
||||
void track_get_front(CoordsXYE* input, CoordsXYE* output);
|
||||
|
||||
bool track_element_is_covered(int32_t trackElementType);
|
||||
bool track_element_is_covered(track_type_t trackElementType);
|
||||
bool track_type_is_station(track_type_t trackType);
|
||||
|
||||
roll_type_t track_get_actual_bank(TileElement* tileElement, roll_type_t bank);
|
||||
@@ -585,5 +585,5 @@ money32 maze_set_track(
|
||||
uint16_t x, uint16_t y, uint16_t z, uint8_t flags, bool initialPlacement, uint8_t direction, ride_id_t rideIndex,
|
||||
uint8_t mode);
|
||||
|
||||
bool track_element_is_booster(uint8_t rideType, uint8_t trackType);
|
||||
bool track_element_has_speed_setting(uint8_t trackType);
|
||||
bool track_element_is_booster(uint8_t rideType, track_type_t trackType);
|
||||
bool track_element_has_speed_setting(track_type_t trackType);
|
||||
|
||||
Reference in New Issue
Block a user