MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CheckClickOnLandscape

Function CheckClickOnLandscape

src/viewport.cpp:2466–2472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2464
2465
2466static bool CheckClickOnLandscape(const Viewport &vp, int x, int y)
2467{
2468 Point pt = TranslateXYToTileCoord(vp, x, y);
2469
2470 if (pt.x != -1) return ClickTile(TileVirtXY(pt.x, pt.y));
2471 return true;
2472}
2473
2474static void PlaceObject()
2475{

Callers 1

HandleViewportClickedFunction · 0.85

Calls 3

TranslateXYToTileCoordFunction · 0.85
ClickTileFunction · 0.85
TileVirtXYFunction · 0.85

Tested by

no test coverage detected