1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Remove MakeXY16()

This commit is contained in:
Gymnasiast
2019-12-21 13:51:59 +01:00
parent a2b9598341
commit dcc720c1ec
3 changed files with 4 additions and 7 deletions

View File

@@ -1639,7 +1639,8 @@ static void map_window_set_pixels(rct_window* w)
int32_t x = 0, y = 0, dx = 0, dy = 0;
int32_t pos = (_currentLine * (MAP_WINDOW_MAP_SIZE - 1)) + MAXIMUM_MAP_SIZE_TECHNICAL - 1;
LocationXY16 destinationPosition = MakeXY16(pos % MAP_WINDOW_MAP_SIZE, pos / MAP_WINDOW_MAP_SIZE);
LocationXY16 destinationPosition = { static_cast<int16_t>(pos % MAP_WINDOW_MAP_SIZE),
static_cast<int16_t>(pos / MAP_WINDOW_MAP_SIZE) };
auto destination = _mapImageData.data() + (destinationPosition.y * MAP_WINDOW_MAP_SIZE) + destinationPosition.x;
switch (get_current_rotation())
{

View File

@@ -783,7 +783,7 @@ static void window_mapgen_base_paint(rct_window* w, rct_drawpixelinfo* dpi)
gfx_draw_string_left(dpi, STR_TERRAIN_LABEL, nullptr, textColour, w->x + 4, w->y + w->widgets[WIDX_FLOOR_TEXTURE].top + 1);
// The practical map size is 2 lower than the technical map size
LocationXY16 mapSizeArgs = MakeXY16(_mapSize - 2, _mapSize - 2);
TileCoordsXY mapSizeArgs = { _mapSize - 2, _mapSize - 2 };
gfx_draw_string_left(
dpi, STR_RESOLUTION_X_BY_Y, &mapSizeArgs, w->colours[1], w->x + w->widgets[WIDX_MAP_SIZE].left + 1,
w->y + w->widgets[WIDX_MAP_SIZE].top + 1);
@@ -1120,7 +1120,7 @@ static void window_mapgen_simplex_paint(rct_window* w, rct_drawpixelinfo* dpi)
w->y + w->widgets[WIDX_SIMPLEX_PLACE_TREES_CHECKBOX].top + 1);
// The practical map size is 2 lower than the technical map size
LocationXY16 mapSizeArgs = MakeXY16(_mapSize - 2, _mapSize - 2);
TileCoordsXY mapSizeArgs = { _mapSize - 2, _mapSize - 2 };
gfx_draw_string_left(
dpi, STR_RESOLUTION_X_BY_Y, &mapSizeArgs, textColour, w->x + w->widgets[WIDX_SIMPLEX_MAP_SIZE].left + 1,
w->y + w->widgets[WIDX_SIMPLEX_MAP_SIZE].top + 1);

View File

@@ -15,10 +15,6 @@
#define LOCATION_NULL ((int16_t)(uint16_t)0x8000)
#define RCT_XY8_UNDEFINED 0xFFFF
#define MakeXY16(x, y) \
{ \
(int16_t)(x), (int16_t)(y) \
}
#pragma pack(push, 1)
struct LocationXY8