diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index 30775ceee7..f37ce51814 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -137,35 +137,6 @@ void rotate_map_coordinates(int16_t* x, int16_t* y, int32_t rotation) } } -LocationXY16 coordinate_3d_to_2d(const LocationXYZ16* coordinate_3d, int32_t rotation) -{ - LocationXY16 coordinate_2d; - - switch (rotation) - { - // this function has to use right-shift (... >> 1) since dividing - // by 2 with (... / 2) can differ by -1 and cause issues (see PR #9301) - default: - case 0: - coordinate_2d.x = coordinate_3d->y - coordinate_3d->x; - coordinate_2d.y = ((coordinate_3d->y + coordinate_3d->x) >> 1) - coordinate_3d->z; - break; - case 1: - coordinate_2d.x = -coordinate_3d->y - coordinate_3d->x; - coordinate_2d.y = ((coordinate_3d->y - coordinate_3d->x) >> 1) - coordinate_3d->z; - break; - case 2: - coordinate_2d.x = -coordinate_3d->y + coordinate_3d->x; - coordinate_2d.y = ((-coordinate_3d->y - coordinate_3d->x) >> 1) - coordinate_3d->z; - break; - case 3: - coordinate_2d.x = coordinate_3d->y + coordinate_3d->x; - coordinate_2d.y = ((-coordinate_3d->y + coordinate_3d->x) >> 1) - coordinate_3d->z; - break; - } - return coordinate_2d; -} - void tile_element_iterator_begin(tile_element_iterator* it) { it->x = 0; diff --git a/src/openrct2/world/Map.h b/src/openrct2/world/Map.h index bbe9c2ccce..ae8724084f 100644 --- a/src/openrct2/world/Map.h +++ b/src/openrct2/world/Map.h @@ -183,7 +183,6 @@ bool map_can_construct_with_clear_at( uint8_t crossingMode); int32_t map_can_construct_at(int32_t x, int32_t y, int32_t zLow, int32_t zHigh, QuarterTile bl); void rotate_map_coordinates(int16_t* x, int16_t* y, int32_t rotation); -LocationXY16 coordinate_3d_to_2d(const LocationXYZ16* coordinate_3d, int32_t rotation); struct tile_element_iterator {