diff options
author | Erich Eckner <git@eckner.net> | 2018-10-30 11:13:12 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-11-16 19:11:46 +0100 |
commit | 5430113f4a842e519d2661a490022dcdf86f5247 (patch) | |
tree | 9368bef97133cea28eae5fc2161a4fdfd61dae27 /src/map.cpp | |
parent | 278a705bbbd378a4c05a795b42028ba440a8bd49 (diff) | |
download | openttd-5430113f4a842e519d2661a490022dcdf86f5247.tar.xz |
underground patch applied
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 85590c3e8..c7e4f5fbc 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" #include "string_func.h" #include "safeguards.h" @@ -38,7 +39,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. */ @@ -49,6 +50,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); |