1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00

Refactor more TileCoords

This commit is contained in:
Michael Steenbeek
2020-03-07 21:07:18 +01:00
committed by GitHub
parent 4f86d0115c
commit be13c1fc87
39 changed files with 280 additions and 276 deletions

View File

@@ -654,13 +654,9 @@ static int32_t cc_get(InteractiveConsole& console, const arguments_t& argv)
get_map_coordinates_from_pos(
{ viewport->view_width / 2, viewport->view_height / 2 }, VIEWPORT_INTERACTION_MASK_TERRAIN, mapCoord,
&interactionType, &tileElement, nullptr);
mapCoord.x -= 16;
mapCoord.x /= 32;
mapCoord.y -= 16;
mapCoord.y /= 32;
mapCoord.x++;
mapCoord.y++;
console.WriteFormatLine("location %d %d", mapCoord.x, mapCoord.y);
auto tileMapCoord = TileCoordsXY(mapCoord);
console.WriteFormatLine("location %d %d", tileMapCoord.x, tileMapCoord.y);
}
}
else if (argv[0] == "window_scale")