Remove coordinate_3d_to_2d.

This commit is contained in:
duncanspumpkin 2019-08-18 08:48:19 +01:00
parent 37de01a10d
commit 9ef6c8d2b4
2 changed files with 0 additions and 30 deletions

View File

@ -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;

View File

@ -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
{