summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index b18c4fd7d..6469b10c5 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -1886,11 +1886,21 @@ bool ScrollWindowTo(int x, int y, int z, Window *w, bool instant)
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;