mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 20:13:07 +01:00
Refactor more TileCoords
This commit is contained in:
committed by
GitHub
parent
4f86d0115c
commit
be13c1fc87
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user