diff options
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map.cpp b/src/map.cpp index 1ee0ba247..cc62390db 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -13,6 +13,7 @@ #include "debug.h" #include "core/alloc_func.hpp" #include "water_map.h" +#include "layer_func.h" #if defined(_MSC_VER) /* Why the hell is that not in all MSVC headers?? */ @@ -35,7 +36,7 @@ TileExtended *_me = NULL; ///< Extended Tiles of the map * @param size_x the width of the map along the NE/SW edge * @param size_y the 'height' of the map along the SE/NW edge */ -void AllocateMap(uint size_x, uint size_y) +void AllocateMap(uint size_x, uint size_y, uint layer_count) { /* Make sure that the map size is within the limits and that * size of both axes is a power of 2. */ @@ -46,6 +47,10 @@ void AllocateMap(uint size_x, uint size_y) error("Invalid map size"); } + /* Поскольку слои часть карты, включаем их здесь */ + InstallLayerSystem(size_x, size_y, layer_count); + size_y *= layer_count; + DEBUG(map, 1, "Allocating map of size %dx%d", size_x, size_y); _map_log_x = FindFirstBit(size_x); |