From 264f35d783358c8ba37ba1f5a81988efe2e91c65 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Wed, 14 Feb 2018 11:53:30 +0100 Subject: [PATCH] Replace some occurrences of LocationXY16 --- src/openrct2/peep/Peep.cpp | 24 ++++++++++++------------ src/openrct2/peep/Staff.cpp | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 29bc59ab62..b3007cde50 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -455,7 +455,7 @@ static constexpr const ride_rating NauseaMaximumThresholds[] = { // Locations of the spiral slide platform that a peep walks from the entrance of the ride to the // entrance of the slide. Up to 4 locations for each 4 sides that an ride entrance can be located // and 4 different rotations of the ride. 4 * 4 * 4 = 64 locations. -static constexpr const LocationXY16 SpiralSlideWalkingPath[64] = { +static constexpr const BigCoordsXY SpiralSlideWalkingPath[64] = { { 56, 8 }, { 8, 8 }, { 8, 32 }, @@ -2962,7 +2962,7 @@ static void peep_update_ride_sub_state_1(rct_peep * peep) y *= 32; assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); - const LocationXY16 slidePlatformDestination = SpiralSlideWalkingPath[peep->var_37]; + const BigCoordsXY slidePlatformDestination = SpiralSlideWalkingPath[peep->var_37]; x += slidePlatformDestination.x; y += slidePlatformDestination.y; @@ -3962,7 +3962,7 @@ static void peep_update_ride_sub_state_14(rct_peep * peep) x *= 32; y *= 32; assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); - const LocationXY16 slidePlatformDestination = SpiralSlideWalkingPath[peep->var_37]; + const BigCoordsXY slidePlatformDestination = SpiralSlideWalkingPath[peep->var_37]; x += slidePlatformDestination.x; y += slidePlatformDestination.y; @@ -3982,7 +3982,7 @@ static void peep_update_ride_sub_state_14(rct_peep * peep) y *= 32; assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); - const LocationXY16 slidePlatformDestination = SpiralSlideWalkingPath[peep->var_37]; + const BigCoordsXY slidePlatformDestination = SpiralSlideWalkingPath[peep->var_37]; x += slidePlatformDestination.x; y += slidePlatformDestination.y; @@ -3992,7 +3992,7 @@ static void peep_update_ride_sub_state_14(rct_peep * peep) } /** rct2: 0x00981F0C, 0x00981F0E */ -static constexpr const LocationXY16 _981F0C[] = { +static constexpr const BigCoordsXY _981F0C[] = { { 25, 56 }, { 56, 7 }, { 7, -24 }, @@ -4000,7 +4000,7 @@ static constexpr const LocationXY16 _981F0C[] = { }; /** rct2: 0x00981F1C, 0x00981F1E */ -static constexpr const LocationXY16 _981F1C[] = { +static constexpr const BigCoordsXY _981F1C[] = { { 8, 56 }, { 56, 24 }, { 24, -24 }, @@ -4090,7 +4090,7 @@ static void peep_update_ride_sub_state_15(rct_peep * peep) y *= 32; assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); - const LocationXY16 slidePlatformDestination = SpiralSlideWalkingPath[peep->var_37]; + const BigCoordsXY slidePlatformDestination = SpiralSlideWalkingPath[peep->var_37]; x += slidePlatformDestination.x; y += slidePlatformDestination.y; @@ -4134,7 +4134,7 @@ static void peep_update_ride_sub_state_16(rct_peep * peep) y *= 32; assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); - const LocationXY16 slidePlatformDestination = SpiralSlideWalkingPath[peep->var_37]; + const BigCoordsXY slidePlatformDestination = SpiralSlideWalkingPath[peep->var_37]; x += slidePlatformDestination.x; y += slidePlatformDestination.y; @@ -4877,7 +4877,7 @@ static bool peep_update_fixing_sub_state_6(bool firstRun, rct_peep * peep, Ride } /** rct2: 0x00992A3C */ -static constexpr const LocationXY16 _992A3C[] = { +static constexpr const BigCoordsXY _992A3C[] = { { -12, 0 }, { 0, 12 }, { 12, 0 }, @@ -4915,8 +4915,8 @@ static bool peep_update_fixing_sub_state_7(bool firstRun, rct_peep * peep, Ride return false; } - sint32 direction = tile_element_get_direction(tileElement); - LocationXY16 offset = _992A3C[direction]; + sint32 direction = tile_element_get_direction(tileElement); + BigCoordsXY offset = _992A3C[direction]; stationX += 16 + offset.x; if (offset.x == 0) @@ -5027,7 +5027,7 @@ static bool peep_update_fixing_sub_state_9(bool firstRun, rct_peep * peep, Ride uint16 destinationX = input.x + 16; uint16 destinationY = input.y + 16; - LocationXY16 offset = _992A3C[direction]; + BigCoordsXY offset = _992A3C[direction]; destinationX -= offset.x; if (offset.x == 0) diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 4f2c8fd148..628f690e7d 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -943,8 +943,8 @@ static uint8 staff_handyman_direction_to_nearest_litter(rct_peep * peep) nextDirection = x_diff < 0 ? 0 : 2; } - LocationXY16 nextTile = { static_cast((nearestLitter->x & 0xFFE0) - TileDirectionDelta[nextDirection].x), - static_cast((nearestLitter->y & 0xFFE0) - TileDirectionDelta[nextDirection].y) }; + BigCoordsXY nextTile = { static_cast((nearestLitter->x & 0xFFE0) - TileDirectionDelta[nextDirection].x), + static_cast((nearestLitter->y & 0xFFE0) - TileDirectionDelta[nextDirection].y) }; sint16 nextZ = ((peep->z + 8) & 0xFFF0) / 8;