From f1f915b540cadc96790e61d11c87f77ca8124c47 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 6 Jun 2020 11:18:58 -0300 Subject: [PATCH] Rename Peep::maze_last_edge to MazeLastEdge --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/peep/Guest.cpp | 16 ++++++++-------- src/openrct2/peep/Peep.h | 2 +- test/tests/S6ImportExportTests.cpp | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index e6a20cd5ff..8d62b0fdcd 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -262,7 +262,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, action_frame); COMPARE_FIELD(Peep, step_progress); COMPARE_FIELD(Peep, next_in_queue); - COMPARE_FIELD(Peep, maze_last_edge); + COMPARE_FIELD(Peep, MazeLastEdge); COMPARE_FIELD(Peep, InteractionRideIndex); COMPARE_FIELD(Peep, TimeInQueue); for (int i = 0; i < 32; i++) diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index e20d81e47c..506f093f50 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -3537,7 +3537,7 @@ static constexpr const CoordsXY _MazeEntranceStart[] = { static void peep_update_ride_leave_entrance_maze(Guest* peep, Ride* ride, CoordsXYZD& entrance_loc) { - peep->maze_last_edge = entrance_loc.direction + 1; + peep->MazeLastEdge = entrance_loc.direction + 1; entrance_loc.x += CoordsDirectionDelta[entrance_loc.direction].x; entrance_loc.y += CoordsDirectionDelta[entrance_loc.direction].y; @@ -3546,13 +3546,13 @@ static void peep_update_ride_leave_entrance_maze(Guest* peep, Ride* ride, Coords if (scenario_rand() & 0x40) { direction += 4; - peep->maze_last_edge += 2; + peep->MazeLastEdge += 2; } direction &= 0xF; // Direction is 11, 15, 3, or 7 peep->var_37 = direction; - peep->maze_last_edge &= 3; + peep->MazeLastEdge &= 3; entrance_loc.x += _MazeEntranceStart[direction / 4].x; entrance_loc.y += _MazeEntranceStart[direction / 4].y; @@ -4884,7 +4884,7 @@ void Guest::UpdateRideMazePathfinding() if (openHedges == 0) return; - uint8_t mazeLastEdge = direction_reverse(maze_last_edge); + uint8_t mazeLastEdge = direction_reverse(MazeLastEdge); openHedges &= ~(1 << mazeLastEdge); if (openHedges == 0) openHedges |= (1 << mazeLastEdge); @@ -4934,15 +4934,15 @@ void Guest::UpdateRideMazePathfinding() switch (mazeType) { case maze_type::invalid: - maze_last_edge++; - maze_last_edge &= 3; + MazeLastEdge++; + MazeLastEdge &= 3; return; case maze_type::hedge: destination_x = targetLoc.x; destination_y = targetLoc.y; var_37 = _MazeGetNewDirectionFromEdge[var_37 / 4][chosenEdge]; - maze_last_edge = chosenEdge; + MazeLastEdge = chosenEdge; break; case maze_type::entrance_or_exit: targetLoc.x = destination_x; @@ -4958,7 +4958,7 @@ void Guest::UpdateRideMazePathfinding() destination_x = targetLoc.x; destination_y = targetLoc.y; var_37 = 16; - maze_last_edge = chosenEdge; + MazeLastEdge = chosenEdge; break; } diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 199eb2b968..aefecb7d1c 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -669,7 +669,7 @@ struct Peep : SpriteBase }; union { - uint8_t maze_last_edge; + uint8_t MazeLastEdge; Direction PeepDirection; // Direction ? }; uint8_t InteractionRideIndex; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index c1c1f9eebb..74e9bdf91f 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -206,7 +206,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(action_frame); COMPARE_FIELD(step_progress); COMPARE_FIELD(next_in_queue); - COMPARE_FIELD(maze_last_edge); + COMPARE_FIELD(MazeLastEdge); COMPARE_FIELD(InteractionRideIndex); COMPARE_FIELD(TimeInQueue); for (int i = 0; i < 32; i++)