1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +01:00

Close #12388, refactor PeepState to use strong enum (#12927)

* Close #12388, refactor:PeepState to use strong enum

* refactor: refactored file PlayTests.cpp

* refactor: change PEEP_STATE_ to PeepState:: and camel case after merging

chore: code reformatting
This commit is contained in:
Łukasz Pękalski
2020-09-28 20:51:49 +02:00
committed by GitHub
parent d27e14f45b
commit d1cd2e08b5
21 changed files with 264 additions and 264 deletions

View File

@@ -692,7 +692,7 @@ viewport_focus viewport_update_smart_guest_follow(rct_window* window, Peep* peep
focus.type = VIEWPORT_FOCUS_TYPE_SPRITE;
focus.sprite.sprite_id = peep->sprite_index;
if (peep->State == PEEP_STATE_PICKED)
if (peep->State == PeepState::Picked)
{
focus.sprite.sprite_id = SPRITE_INDEX_NULL;
window->viewport_smart_follow_sprite = SPRITE_INDEX_NULL;
@@ -702,8 +702,8 @@ viewport_focus viewport_update_smart_guest_follow(rct_window* window, Peep* peep
else
{
bool overallFocus = true;
if (peep->State == PEEP_STATE_ON_RIDE || peep->State == PEEP_STATE_ENTERING_RIDE
|| (peep->State == PEEP_STATE_LEAVING_RIDE && peep->x == LOCATION_NULL))
if (peep->State == PeepState::OnRide || peep->State == PeepState::EnteringRide
|| (peep->State == PeepState::LeavingRide && peep->x == LOCATION_NULL))
{
auto ride = get_ride(peep->CurrentRide);
if (ride != nullptr && (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK))
@@ -752,7 +752,7 @@ void viewport_update_smart_staff_follow(rct_window* window, Peep* peep)
focus.sprite_id = window->viewport_smart_follow_sprite;
if (peep->State == PEEP_STATE_PICKED)
if (peep->State == PeepState::Picked)
{
// focus.sprite.sprite_id = SPRITE_INDEX_NULL;
window->viewport_smart_follow_sprite = SPRITE_INDEX_NULL;