Fix overload resolution for map_get_first_element_at

This commit is contained in:
ζeh Matt 2021-09-07 22:20:13 +03:00
parent a3b0c9ac81
commit 79ab832000
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0
5 changed files with 6 additions and 6 deletions

View File

@ -713,7 +713,7 @@ void Peep::UpdateFalling()
} }
// If not drowning then falling. Note: peeps 'fall' after leaving a ride/enter the park. // If not drowning then falling. Note: peeps 'fall' after leaving a ride/enter the park.
TileElement* tile_element = map_get_first_element_at({ x, y }); TileElement* tile_element = map_get_first_element_at(CoordsXY{ x, y });
TileElement* saved_map = nullptr; TileElement* saved_map = nullptr;
int32_t saved_height = 0; int32_t saved_height = 0;

View File

@ -351,7 +351,7 @@ rct_string_id TrackDesign::CreateTrackDesignMaze(const Ride& ride)
{ {
for (; x < MAXIMUM_MAP_SIZE_BIG; x += COORDS_XY_STEP) for (; x < MAXIMUM_MAP_SIZE_BIG; x += COORDS_XY_STEP)
{ {
auto tileElement = map_get_first_element_at({ x, y }); auto tileElement = map_get_first_element_at(CoordsXY{ x, y });
do do
{ {
if (tileElement == nullptr) if (tileElement == nullptr)
@ -457,7 +457,7 @@ CoordsXYE TrackDesign::MazeGetFirstElement(const Ride& ride)
{ {
for (tile.x = 0; tile.x < MAXIMUM_MAP_SIZE_BIG; tile.x += COORDS_XY_STEP) for (tile.x = 0; tile.x < MAXIMUM_MAP_SIZE_BIG; tile.x += COORDS_XY_STEP)
{ {
tile.element = map_get_first_element_at({ tile.x, tile.y }); tile.element = map_get_first_element_at(CoordsXY{ tile.x, tile.y });
do do
{ {
if (tile.element == nullptr) if (tile.element == nullptr)

View File

@ -1897,7 +1897,7 @@ void Vehicle::UpdateMeasurements()
{ {
// Set tile_element to first element. Since elements aren't always ordered by base height, // Set tile_element to first element. Since elements aren't always ordered by base height,
// we must start at the first element and iterate through each tile element. // we must start at the first element and iterate through each tile element.
auto tileElement = map_get_first_element_at({ x, y }); auto tileElement = map_get_first_element_at(CoordsXY{ x, y });
if (tileElement == nullptr) if (tileElement == nullptr)
return; return;

View File

@ -110,7 +110,7 @@ static void chairlift_paint_util_draw_supports(paint_session* session, int32_t s
static const TrackElement* chairlift_paint_util_map_get_track_element_at_from_ride_fuzzy( static const TrackElement* chairlift_paint_util_map_get_track_element_at_from_ride_fuzzy(
int32_t x, int32_t y, int32_t z, const Ride* ride) int32_t x, int32_t y, int32_t z, const Ride* ride)
{ {
const TileElement* tileElement = map_get_first_element_at({ x, y }); const TileElement* tileElement = map_get_first_element_at(CoordsXY{ x, y });
if (tileElement == nullptr) if (tileElement == nullptr)
{ {
return nullptr; return nullptr;

View File

@ -243,7 +243,7 @@ void tile_element_iterator_begin(tile_element_iterator* it)
{ {
it->x = 0; it->x = 0;
it->y = 0; it->y = 0;
it->element = map_get_first_element_at({ 0, 0 }); it->element = map_get_first_element_at(TileCoordsXY{ 0, 0 });
} }
int32_t tile_element_iterator_next(tile_element_iterator* it) int32_t tile_element_iterator_next(tile_element_iterator* it)