From fabdb8cdef041ed4aabf40b687056a60f88e65f7 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sun, 31 May 2020 18:28:20 -0300 Subject: [PATCH] Rename Peep::path_check_optimisation to PathCheckOptimisation --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/StaffHireNewAction.hpp | 2 +- src/openrct2/peep/Peep.cpp | 10 +++++----- src/openrct2/peep/Peep.h | 2 +- src/openrct2/rct1/S4Importer.cpp | 2 +- src/openrct2/rct2/S6Exporter.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- test/tests/S6ImportExportTests.cpp | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 61fb347918..a604b2857c 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -280,7 +280,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots { COMPARE_FIELD(Peep, thoughts[i]); } - COMPARE_FIELD(Peep, path_check_optimisation); + COMPARE_FIELD(Peep, PathCheckOptimisation); COMPARE_FIELD(Peep, GuestHeadingToRideId); COMPARE_FIELD(Peep, StaffOrders); COMPARE_FIELD(Peep, Photo1RideRef); diff --git a/src/openrct2/actions/StaffHireNewAction.hpp b/src/openrct2/actions/StaffHireNewAction.hpp index 99832a298a..b0013fd458 100644 --- a/src/openrct2/actions/StaffHireNewAction.hpp +++ b/src/openrct2/actions/StaffHireNewAction.hpp @@ -165,7 +165,7 @@ private: newPeep->action_sprite_image_offset = 0; newPeep->NoActionFrameNum = 0; newPeep->action_sprite_type = PEEP_ACTION_SPRITE_TYPE_NONE; - newPeep->path_check_optimisation = 0; + newPeep->PathCheckOptimisation = 0; newPeep->type = PEEP_TYPE_STAFF; newPeep->outside_of_park = 0; newPeep->PeepFlags = 0; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index f5b31dee6d..c58d4a4b14 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -471,8 +471,8 @@ static void peep_128_tick_update(Peep* peep, int32_t index) */ bool Peep::CheckForPath() { - path_check_optimisation++; - if ((path_check_optimisation & 0xF) != (sprite_index & 0xF)) + PathCheckOptimisation++; + if ((PathCheckOptimisation & 0xF) != (sprite_index & 0xF)) { // This condition makes the check happen less often // As a side effect peeps hover for a short, @@ -758,7 +758,7 @@ void Peep::PickupAbort(int32_t old_x) special_sprite = 0; action_sprite_image_offset = 0; action_sprite_type = PEEP_ACTION_SPRITE_TYPE_NONE; - path_check_optimisation = 0; + PathCheckOptimisation = 0; } gPickupPeepImage = UINT32_MAX; @@ -807,7 +807,7 @@ bool Peep::Place(const TileCoordsXYZ& location, bool apply) special_sprite = 0; action_sprite_image_offset = 0; action_sprite_type = PEEP_ACTION_SPRITE_TYPE_NONE; - path_check_optimisation = 0; + PathCheckOptimisation = 0; sprite_position_tween_reset(); if (type == PEEP_TYPE_GUEST) @@ -1645,7 +1645,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->MoveTo(coords); peep->sprite_direction = 0; peep->mass = (scenario_rand() & 0x1F) + 45; - peep->path_check_optimisation = 0; + peep->PathCheckOptimisation = 0; peep->interaction_ride_index = RIDE_ID_NULL; peep->type = PEEP_TYPE_GUEST; peep->previous_ride = RIDE_ID_NULL; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 5c86182cfe..a9527fabdd 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -685,7 +685,7 @@ struct Peep : SpriteBase uint8_t previous_ride; uint16_t previous_ride_time_out; rct_peep_thought thoughts[PEEP_MAX_THOUGHTS]; - uint8_t path_check_optimisation; // see peep.checkForPath + uint8_t PathCheckOptimisation; // see peep.checkForPath union { uint8_t StaffId; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 385ee25fc2..008fea3f15 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1525,7 +1525,7 @@ private: dst->previous_ride = src->previous_ride; dst->previous_ride_time_out = src->previous_ride_time_out; - dst->path_check_optimisation = 0; + dst->PathCheckOptimisation = 0; dst->GuestHeadingToRideId = src->guest_heading_to_ride_id; // Doubles as staff orders dst->PeepIsLostCountdown = src->peep_is_lost_countdown; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 33346654ea..773bd7955f 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1207,7 +1207,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dstThought->freshness = srcThought->freshness; dstThought->fresh_timeout = srcThought->fresh_timeout; } - dst->path_check_optimisation = src->path_check_optimisation; + dst->path_check_optimisation = src->PathCheckOptimisation; dst->guest_heading_to_ride_id = src->GuestHeadingToRideId; dst->peep_is_lost_countdown = src->PeepIsLostCountdown; dst->photo1_ride_ref = src->Photo1RideRef; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 99039d1ada..5924435bbf 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1472,7 +1472,7 @@ public: dstThought->freshness = srcThought->freshness; dstThought->fresh_timeout = srcThought->fresh_timeout; } - dst->path_check_optimisation = src->path_check_optimisation; + dst->PathCheckOptimisation = src->path_check_optimisation; dst->GuestHeadingToRideId = src->guest_heading_to_ride_id; dst->PeepIsLostCountdown = src->peep_is_lost_countdown; dst->Photo1RideRef = src->photo1_ride_ref; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 83ced84df5..fc37f25473 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -227,7 +227,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(thoughts[i].freshness); COMPARE_FIELD(thoughts[i].fresh_timeout); } - COMPARE_FIELD(path_check_optimisation); + COMPARE_FIELD(PathCheckOptimisation); COMPARE_FIELD(GuestHeadingToRideId); COMPARE_FIELD(StaffOrders); COMPARE_FIELD(Photo1RideRef);