summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-01-23 17:08:35 +0000
committerbelugas <belugas@openttd.org>2008-01-23 17:08:35 +0000
commit4a3e135086fb2c29221a70e1bd0adf279f36c3bd (patch)
tree9a885c0e543d6bc0b57a61d035fa6563b4b145aa /src/map.cpp
parent0b888ccc001c3157d1990467036a557783ca38be (diff)
downloadopenttd-4a3e135086fb2c29221a70e1bd0adf279f36c3bd.tar.xz
(svn r11961) -Feature[newGRF]: Add support for Action 0D, var 13: informations about current map size.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 865e92b35..76cd384d4 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -16,6 +16,7 @@ extern "C" _CRTIMP void __cdecl _assert(void *, void *, unsigned);
#endif
uint _map_log_x; ///< 2^_map_log_x == _map_size_x
+uint _map_log_y; ///< 2^_map_log_y == _map_size_y
uint _map_size_x; ///< Size of the map along the X
uint _map_size_y; ///< Size of the map along the Y
uint _map_size; ///< The number of tiles on the map
@@ -43,6 +44,7 @@ void AllocateMap(uint size_x, uint size_y)
DEBUG(map, 1, "Allocating map of size %dx%d", size_x, size_y);
_map_log_x = FindFirstBit(size_x);
+ _map_log_y = FindFirstBit(size_y);
_map_size_x = size_x;
_map_size_y = size_y;
_map_size = size_x * size_y;