Part of #9473: Create Vehicle::InvalidateWindow

Converted from vehicle_invalidate_window
This commit is contained in:
hdpoliveira 2020-04-19 02:01:07 -03:00
parent 49be02dbfd
commit 421fc5bc59
2 changed files with 4 additions and 4 deletions

View File

@ -9806,10 +9806,10 @@ int32_t vehicle_get_total_num_peeps(const Vehicle* vehicle)
* *
* rct2: 0x006DA1EC * rct2: 0x006DA1EC
*/ */
void vehicle_invalidate_window(Vehicle* vehicle) void Vehicle::InvalidateWindow()
{ {
auto intent = Intent(INTENT_ACTION_INVALIDATE_VEHICLE_WINDOW); auto intent = Intent(INTENT_ACTION_INVALIDATE_VEHICLE_WINDOW);
intent.putExtra(INTENT_EXTRA_VEHICLE, vehicle); intent.putExtra(INTENT_EXTRA_VEHICLE, this);
context_broadcast_intent(&intent); context_broadcast_intent(&intent);
} }
@ -9985,7 +9985,7 @@ void Vehicle::SetState(VEHICLE_STATUS vehicleStatus, uint8_t subState)
{ {
status = vehicleStatus; status = vehicleStatus;
sub_state = subState; sub_state = subState;
vehicle_invalidate_window(this); InvalidateWindow();
} }
bool Vehicle::IsGhost() const bool Vehicle::IsGhost() const

View File

@ -360,6 +360,7 @@ private:
bool CurrentTowerElementIsTop(); bool CurrentTowerElementIsTop();
bool UpdateTrackMotionForwards(rct_ride_entry_vehicle* vehicleEntry, Ride* curRide, rct_ride_entry* rideEntry); bool UpdateTrackMotionForwards(rct_ride_entry_vehicle* vehicleEntry, Ride* curRide, rct_ride_entry* rideEntry);
bool UpdateTrackMotionBackwards(rct_ride_entry_vehicle* vehicleEntry, Ride* curRide, rct_ride_entry* rideEntry); bool UpdateTrackMotionBackwards(rct_ride_entry_vehicle* vehicleEntry, Ride* curRide, rct_ride_entry* rideEntry);
void InvalidateWindow();
void TestReset(); void TestReset();
void UpdateTestFinish(); void UpdateTestFinish();
void PeepEasterEggHereWeAre() const; void PeepEasterEggHereWeAre() const;
@ -562,7 +563,6 @@ GForces vehicle_get_g_forces(const Vehicle* vehicle);
void vehicle_set_map_toolbar(const Vehicle* vehicle); void vehicle_set_map_toolbar(const Vehicle* vehicle);
int32_t vehicle_is_used_in_pairs(const Vehicle* vehicle); int32_t vehicle_is_used_in_pairs(const Vehicle* vehicle);
int32_t vehicle_get_total_num_peeps(const Vehicle* vehicle); int32_t vehicle_get_total_num_peeps(const Vehicle* vehicle);
void vehicle_invalidate_window(Vehicle* vehicle);
const rct_vehicle_info* vehicle_get_move_info(int32_t trackSubposition, int32_t typeAndDirection, int32_t offset); const rct_vehicle_info* vehicle_get_move_info(int32_t trackSubposition, int32_t typeAndDirection, int32_t offset);
uint16_t vehicle_get_move_info_size(int32_t trackSubposition, int32_t typeAndDirection); uint16_t vehicle_get_move_info_size(int32_t trackSubposition, int32_t typeAndDirection);