summaryrefslogtreecommitdiff
path: root/src/tile_type.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-18 21:10:36 +0000
committerrubidium <rubidium@openttd.org>2009-04-18 21:10:36 +0000
commitb66783afabf6ca4702d372526b8eb3d64f30caa7 (patch)
treeaf543b476b3af2651a73abb4cb04119d47d84f7d /src/tile_type.h
parent25cdef9523e2b4dd7c00d53cd9d9c259da8ad0d9 (diff)
downloadopenttd-b66783afabf6ca4702d372526b8eb3d64f30caa7.tar.xz
(svn r16086) -Codechange: magic numbers substitutes by enums and some type safety
Diffstat (limited to 'src/tile_type.h')
-rw-r--r--src/tile_type.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tile_type.h b/src/tile_type.h
index 229dcee15..409fdf5a3 100644
--- a/src/tile_type.h
+++ b/src/tile_type.h
@@ -8,9 +8,10 @@
#include "core/enum_type.hpp"
enum {
- TILE_SIZE = 16, ///< Tiles are 16x16 "units" in size
- TILE_PIXELS = 32, ///< a tile is 32x32 pixels
- TILE_HEIGHT = 8, ///< The standard height-difference between tiles on two levels is 8 (z-diff 8)
+ TILE_SIZE = 16, ///< Tiles are 16x16 "units" in size
+ TILE_UNIT_MASK = TILE_SIZE - 1, ///< for masking in/out the inner-tile units.
+ TILE_PIXELS = 32, ///< a tile is 32x32 pixels
+ TILE_HEIGHT = 8, ///< The standard height-difference between tiles on two levels is 8 (z-diff 8)
MAX_TILE_HEIGHT = 15, ///< Maximum allowed tile height
MAX_SNOWLINE_HEIGHT = (MAX_TILE_HEIGHT - 2), ///< Maximum allowed snowline height