summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-10-23 18:28:20 +0000
committeralberth <alberth@openttd.org>2010-10-23 18:28:20 +0000
commit8f24ec94717ec7de4d2483e3c8eb8f0f042f9b5c (patch)
treef7a796a9b22b34694d4b97710efe3a4b3304a067 /src/viewport.cpp
parentaf941fc5983e8bb204183247a7b89b9049339a8d (diff)
downloadopenttd-8f24ec94717ec7de4d2483e3c8eb8f0f042f9b5c.tar.xz
(svn r21018) -Doc: Add Doxygen comments to some function.
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;