1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +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:
DjWarmonger
2022-09-18 16:39:10 +02:00
committed by GitHub
parent e85f8a56bb
commit 7ba271edf1
44 changed files with 502 additions and 1015 deletions

View File

@@ -369,16 +369,16 @@ void Modificator::dump()
{
std::ofstream out(boost::to_string(boost::format("seed_%d_modzone_%d_%s.txt") % generator.getRandomSeed() % zone.getId() % getName()));
auto & mapInstance = map.map();
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++)
for(int z = 0; z < levels; z++)
{
for(int j=0; j<height; j++)
{
for (int i=0; i<width; i++)
for(int i=0; i<width; i++)
{
out << dump(int3(i, j, k));
out << dump(int3(i, j, z));
}
out << std::endl;
}