mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Rotation rebase2 (#912)
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y]. * Nullkiller AI can get it too. * Use boost::multi_array instead of nested vectors * In MapHandler too * Rotate foreach algorithms, too * VCAI gets rotated, too
This commit is contained in:
@ -73,8 +73,8 @@ void RmgMap::initTiles(CMapGenerator & generator)
|
||||
{
|
||||
mapInstance->initTerrain();
|
||||
|
||||
tiles.resize(boost::extents[mapInstance->width][mapInstance->height][mapInstance->twoLevel ? 2 : 1]);
|
||||
zoneColouring.resize(boost::extents[mapInstance->width][mapInstance->height][mapInstance->twoLevel ? 2 : 1]);
|
||||
tiles.resize(boost::extents[mapInstance->width][mapInstance->height][mapInstance->levels()]);
|
||||
zoneColouring.resize(boost::extents[mapInstance->width][mapInstance->height][mapInstance->levels()]);
|
||||
|
||||
//init native town count with 0
|
||||
for (auto faction : VLC->townh->getAllowedFactions())
|
||||
@ -302,7 +302,7 @@ void RmgMap::dump(bool zoneId) const
|
||||
{
|
||||
static int id = 0;
|
||||
std::ofstream out(boost::to_string(boost::format("zone_%d.txt") % id++));
|
||||
int levels = mapInstance->twoLevel ? 2 : 1;
|
||||
int levels = mapInstance->levels();
|
||||
int width = mapInstance->width;
|
||||
int height = mapInstance->height;
|
||||
for (int k = 0; k < levels; k++)
|
||||
|
Reference in New Issue
Block a user