@@ -1883,17 +1883,27 @@ bool ScrollWindowTo(int x, int y, int z,
w->viewport->dest_scrollpos_x = pt.x;
w->viewport->dest_scrollpos_y = pt.y;
return true;
}
/**
* Scrolls the viewport of the main window to a given location.
* @param tile Desired tile to center on.
* @param instant Jump to the location instead of slowly moving to it.
* @return Destination of the viewport was changed (to activate other actions when the viewport is already at the desired position).
*/
bool ScrollMainWindowToTile(TileIndex tile, bool instant)
{
return ScrollMainWindowTo(TileX(tile) * TILE_SIZE + TILE_SIZE / 2, TileY(tile) * TILE_SIZE + TILE_SIZE / 2, -1, instant);
* Set a tile to display a red error square.
* @param tile Tile that should show the red error square.
void SetRedErrorSquare(TileIndex tile)
TileIndex old;
old = _thd.redsq;
_thd.redsq = tile;