summaryrefslogtreecommitdiff
path: root/src/tile_map.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-10-19 15:39:12 +0000
committerrubidium <rubidium@openttd.org>2008-10-19 15:39:12 +0000
commitd832626bb9f8009c636c3ebef0620ead499ef8d3 (patch)
tree2a5381abe13a96fd46089d41193bd7b605164edc /src/tile_map.cpp
parent15eb140d28a8fc131dedc595c7685562917130a4 (diff)
downloadopenttd-d832626bb9f8009c636c3ebef0620ead499ef8d3.tar.xz
(svn r14491) -Documentation: updates/additions of doxygen docs (Alberth)
Diffstat (limited to 'src/tile_map.cpp')
-rw-r--r--src/tile_map.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/tile_map.cpp b/src/tile_map.cpp
index f6cb0adef..27b0a08a1 100644
--- a/src/tile_map.cpp
+++ b/src/tile_map.cpp
@@ -7,6 +7,11 @@
#include "tile_map.h"
#include "core/math_func.hpp"
+/**
+ * Return the slope of a given tile
+ * @param tile Tile to compute slope of
+ * @param h If not \c NULL, pointer to storage of z height
+ * @return Slope of the tile, except for the HALFTILE part */
Slope GetTileSlope(TileIndex tile, uint *h)
{
uint a;
@@ -42,6 +47,10 @@ Slope GetTileSlope(TileIndex tile, uint *h)
return (Slope)r;
}
+/**
+ * Get bottom height of the tile
+ * @param tile Tile to compute height of
+ * @return Minimum height of the tile */
uint GetTileZ(TileIndex tile)
{
if (TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY()) return 0;
@@ -54,7 +63,10 @@ uint GetTileZ(TileIndex tile)
return h * TILE_HEIGHT;
}
-
+/**
+ * Get top height of the tile
+ * @param tile Tile to compute height of
+ * @return Maximum height of the tile */
uint GetTileMaxZ(TileIndex t)
{
if (TileX(t) == MapMaxX() || TileY(t) == MapMaxY()) return 0;