mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 08:14:38 +01:00
* Remove viewport pointer from get_map_coordinates_from_pos * Removed viewport from get_window * Return a InteractionInfo from get_map_coord... * Remove viewport_interaction_info struct * Add Entity union to simplify code * Name the enum used for viewport interaction * Simplify functions further by returning the info struct * Add default switches
This commit is contained in:
@@ -652,15 +652,11 @@ static int32_t cc_get(InteractiveConsole& console, const arguments_t& argv)
|
||||
rct_window* w = window_get_main();
|
||||
if (w != nullptr)
|
||||
{
|
||||
int32_t interactionType;
|
||||
TileElement* tileElement;
|
||||
CoordsXY mapCoord = {};
|
||||
rct_viewport* viewport = window_get_viewport(w);
|
||||
get_map_coordinates_from_pos(
|
||||
{ viewport->view_width / 2, viewport->view_height / 2 }, VIEWPORT_INTERACTION_MASK_TERRAIN, mapCoord,
|
||||
&interactionType, &tileElement, nullptr);
|
||||
auto info = get_map_coordinates_from_pos(
|
||||
{ viewport->view_width / 2, viewport->view_height / 2 }, VIEWPORT_INTERACTION_MASK_TERRAIN);
|
||||
|
||||
auto tileMapCoord = TileCoordsXY(mapCoord);
|
||||
auto tileMapCoord = TileCoordsXY(info.Loc);
|
||||
console.WriteFormatLine("location %d %d", tileMapCoord.x, tileMapCoord.y);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user