Use bool for isApplying

This commit is contained in:
Ted John 2019-05-28 22:05:15 +01:00
parent 63b1649666
commit ca32357dad
3 changed files with 9 additions and 9 deletions

View File

@ -83,7 +83,7 @@ public:
} }
else if (_status == RIDE_STATUS_TESTING || _status == RIDE_STATUS_SIMULATING) else if (_status == RIDE_STATUS_TESTING || _status == RIDE_STATUS_SIMULATING)
{ {
if (!ride_is_valid_for_test(ride, _status, 0)) if (!ride_is_valid_for_test(ride, _status, false))
{ {
res->Error = GA_ERROR::UNKNOWN; res->Error = GA_ERROR::UNKNOWN;
res->ErrorMessage = gGameCommandErrorText; res->ErrorMessage = gGameCommandErrorText;
@ -92,7 +92,7 @@ public:
} }
else if (_status == RIDE_STATUS_OPEN) else if (_status == RIDE_STATUS_OPEN)
{ {
if (!ride_is_valid_for_open(ride, _status == RIDE_STATUS_OPEN, 0)) if (!ride_is_valid_for_open(ride, _status == RIDE_STATUS_OPEN, false))
{ {
res->Error = GA_ERROR::UNKNOWN; res->Error = GA_ERROR::UNKNOWN;
res->ErrorMessage = gGameCommandErrorText; res->ErrorMessage = gGameCommandErrorText;
@ -153,7 +153,7 @@ public:
ride_clear_for_construction(ride); ride_clear_for_construction(ride);
ride_remove_peeps(ride); ride_remove_peeps(ride);
if (!ride_is_valid_for_test(ride, _status, 1)) if (!ride_is_valid_for_test(ride, _status, true))
{ {
res->Error = GA_ERROR::UNKNOWN; res->Error = GA_ERROR::UNKNOWN;
res->ErrorMessage = gGameCommandErrorText; res->ErrorMessage = gGameCommandErrorText;
@ -194,14 +194,14 @@ public:
if (_status == RIDE_STATUS_TESTING) if (_status == RIDE_STATUS_TESTING)
{ {
if (!ride_is_valid_for_test(ride, _status, 1)) if (!ride_is_valid_for_test(ride, _status, true))
{ {
res->Error = GA_ERROR::UNKNOWN; res->Error = GA_ERROR::UNKNOWN;
res->ErrorMessage = gGameCommandErrorText; res->ErrorMessage = gGameCommandErrorText;
return res; return res;
} }
} }
else if (!ride_is_valid_for_open(ride, _status == RIDE_STATUS_OPEN, 1)) else if (!ride_is_valid_for_open(ride, _status == RIDE_STATUS_OPEN, true))
{ {
res->Error = GA_ERROR::UNKNOWN; res->Error = GA_ERROR::UNKNOWN;
res->ErrorMessage = gGameCommandErrorText; res->ErrorMessage = gGameCommandErrorText;

View File

@ -5407,7 +5407,7 @@ static TileElement* loc_6B4F6B(ride_id_t rideIndex, int32_t x, int32_t y)
return nullptr; return nullptr;
} }
int32_t ride_is_valid_for_test(Ride* ride, int32_t status, int32_t isApplying) int32_t ride_is_valid_for_test(Ride* ride, int32_t status, bool isApplying)
{ {
int32_t stationIndex; int32_t stationIndex;
CoordsXYE trackElement, problematicTrackElement = {}; CoordsXYE trackElement, problematicTrackElement = {};
@ -5546,7 +5546,7 @@ int32_t ride_is_valid_for_test(Ride* ride, int32_t status, int32_t isApplying)
* *
* rct2: 0x006B4EEA * rct2: 0x006B4EEA
*/ */
int32_t ride_is_valid_for_open(Ride* ride, int32_t goingToBeOpen, int32_t isApplying) int32_t ride_is_valid_for_open(Ride* ride, int32_t goingToBeOpen, bool isApplying)
{ {
int32_t stationIndex; int32_t stationIndex;
CoordsXYE trackElement, problematicTrackElement = {}; CoordsXYE trackElement, problematicTrackElement = {};

View File

@ -1075,8 +1075,8 @@ void ride_measurements_update();
rct_ride_measurement* ride_get_measurement(Ride* ride, rct_string_id* message); rct_ride_measurement* ride_get_measurement(Ride* ride, rct_string_id* message);
void ride_breakdown_add_news_item(Ride* ride); void ride_breakdown_add_news_item(Ride* ride);
Peep* ride_find_closest_mechanic(Ride* ride, int32_t forInspection); Peep* ride_find_closest_mechanic(Ride* ride, int32_t forInspection);
int32_t ride_is_valid_for_open(Ride* ride, int32_t goingToBeOpen, int32_t isApplying); int32_t ride_is_valid_for_open(Ride* ride, int32_t goingToBeOpen, bool isApplying);
int32_t ride_is_valid_for_test(Ride* ride, int32_t status, int32_t isApplying); int32_t ride_is_valid_for_test(Ride* ride, int32_t status, bool isApplying);
int32_t ride_initialise_construction_window(Ride* ride); int32_t ride_initialise_construction_window(Ride* ride);
void ride_construction_invalidate_current_track(); void ride_construction_invalidate_current_track();
int32_t sub_6C683D( int32_t sub_6C683D(