feat: worldgeneration using decomp

This commit is contained in:
Lord_Cambion
2026-04-13 17:45:07 +02:00
parent 0606ce717d
commit b512cc8f11
54 changed files with 1265 additions and 816 deletions
+7 -3
View File
@@ -3,7 +3,7 @@
#include "IntCache.h"
#include "RemoveTooMuchOceanLayer.h"
RemoveTooMuchOceanLayer::RemoveTooMuchOceanLayer(int64_t seed, shared_ptr<Layer> parent) : Layer(seed)
RemoveTooMuchOceanLayer::RemoveTooMuchOceanLayer(int64_t seed, shared_ptr<Layer> parent, int64_t seedMixup) : Layer(seedMixup)
{
this->parent = parent;
}
@@ -26,15 +26,19 @@ intArray RemoveTooMuchOceanLayer::getArea(int xo, int yo, int w, int h)
int i2 = aint[j1 + 1 - 1 + (i1 + 1) * (w + 2)];
int j2 = aint[j1 + 1 + (i1 + 1 + 1) * (w + 2)];
int k2 = aint[j1 + 1 + (i1 + 1) * k];
aint1[j1 + i1 * w] = k2;
this->initRandom((int64_t)(j1 + xo), (int64_t)(i1 + yo));
if (k2 == 0 && k1 == 0 && l1 == 0 && i2 == 0 && j2 == 0)
{
aint1[j1 + i1 * w] = 1;
if (this->nextRandom(2) == 0)
{
aint1[j1 + i1 * w] = 1;
}
}
}
}
return aint1;
}
}