diff options
author | smatz <smatz@openttd.org> | 2009-06-20 11:25:39 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-06-20 11:25:39 +0000 |
commit | 4419366f94f75032b53362e2722b6476beb02866 (patch) | |
tree | 2d092dc3dc2fea7055ac87bc739b223a83efbeb5 /src/map_type.h | |
parent | 88ec646c1f843b95635510988c793e4e83cbc8cc (diff) | |
download | openttd-4419366f94f75032b53362e2722b6476beb02866.tar.xz |
(svn r16603) -Codechange: enumify map size limits (based on a patch by Bilbo)
Diffstat (limited to 'src/map_type.h')
-rw-r--r-- | src/map_type.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map_type.h b/src/map_type.h index 7098ad762..3c403c88b 100644 --- a/src/map_type.h +++ b/src/map_type.h @@ -50,6 +50,14 @@ struct TileIndexDiffC { int16 y; ///< The y value of the coordinate }; +/** Minimal and maximal map width and height */ +enum { + MIN_MAP_SIZE_BITS = 6, ///< Minimal size of map is equal to 2 ^ MIN_MAP_SIZE_BITS + MAX_MAP_SIZE_BITS = 11, ///< Maximal size of map is equal to 2 ^ MAX_MAP_SIZE_BITS + MIN_MAP_SIZE = 1 << MIN_MAP_SIZE_BITS, ///< Minimal map size = 64 + MAX_MAP_SIZE = 1 << MAX_MAP_SIZE_BITS, ///< Maximal map size = 2048 +}; + /** * Approximation of the length of a straight track, relative to a diagonal * track (ie the size of a tile side). |