From 10f43766ef277eba02c5ebf79f769c480627cfc3 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 16 Apr 2020 12:44:25 +0200 Subject: [PATCH 1/2] Rename i to stationIndex --- src/openrct2/ride/RideRatings.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2/ride/RideRatings.cpp b/src/openrct2/ride/RideRatings.cpp index 3e4a0b2c69..b348500b34 100644 --- a/src/openrct2/ride/RideRatings.cpp +++ b/src/openrct2/ride/RideRatings.cpp @@ -1423,10 +1423,10 @@ static rating_tuple ride_ratings_get_drop_ratings(Ride* ride) */ static int32_t ride_ratings_get_scenery_score(Ride* ride) { - auto i = ride_get_first_valid_station_start(ride); + auto stationIndex = ride_get_first_valid_station_start(ride); CoordsXY location; - if (i == STATION_INDEX_NULL) + if (stationIndex == STATION_INDEX_NULL) { return 0; } @@ -1437,13 +1437,13 @@ static int32_t ride_ratings_get_scenery_score(Ride* ride) } else { - location = ride->stations[i].Start; + location = ride->stations[stationIndex].Start; } int32_t z = tile_element_height(location); // Check if station is underground, returns a fixed mediocre score since you can't have scenery underground - if (z > ride->stations[i].GetBaseZ()) + if (z > ride->stations[stationIndex].GetBaseZ()) { return 40; } From 8a8eba08296e4e0a24fe611268be2d7925922530 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Mon, 9 Mar 2020 22:21:53 +0100 Subject: [PATCH 2/2] Clean up station functions and construction markers in TestPaint --- test/testpaint/Compat.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/test/testpaint/Compat.cpp b/test/testpaint/Compat.cpp index 5b527c65f8..3526d9b7c9 100644 --- a/test/testpaint/Compat.cpp +++ b/test/testpaint/Compat.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -61,19 +62,11 @@ const TileCoordsXY TileDirectionDelta[] = { }; // clang-format on -TileCoordsXYZD ride_get_entrance_location(const Ride* ride, const StationIndex stationIndex); -TileCoordsXYZD ride_get_exit_location(const Ride* ride, const StationIndex stationIndex); - uint8_t get_current_rotation() { return gCurrentRotation & 3; } -const uint32_t construction_markers[] = { - COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | IMAGE_TYPE_REMAP, // White - 2 << 19 | 0b110000 << 19 | IMAGE_TYPE_TRANSPARENT, // Translucent -}; - int object_entry_group_counts[] = { 128, // rides 252, // small scenery