public double getRawHeight(int x, int y, Vector2i tmp) {
if (!tmg.continentGen.isLand(x, y)){
double h = -10;
if (tmg.volcanoGen.isInside(x, y, tmp)){
CirclePoint c = tmg.volcanoGen.getCirclePoint(x, y, tmp);
double height = 20+10*Util.hashToGaussian(Util.hash(seed, c.cx, c.cy));
double p = c.percentToR;
if (p > 1)
p = 1;
h = (h+height*(1-p))/2;
}
return h;
}
else {
double h = 0;
if (tmg.mountainGen.isInside(x, y, tmp)){
EllipsePoint e = tmg.mountainGen.getEllipsePoint(x, y, tmp);
double height = 10+5*Util.hashToGaussian(Util.hash(seed, e.cx, e.cy));
if (height < 2)
height = 2;
double p = (e.percentToR2*.8+e.percentToR1*.2);
if (p > 1)
p = 1;
h += height*(1-p);
}
if (tmg.valleyGen.isInside(x, y, tmp)){
EllipsePoint e = tmg.valleyGen.getEllipsePoint(x, y, tmp);
double height = 10+5*Util.hashToGaussian(Util.hash(seed, e.cx, e.cy));
if (height < 2)
height = 2;
double p = (e.percentToR2*.5+e.percentToR1*.5);
if (p > 1)
p = 1;
int dh = (int)(height*(1-p));
if (dh < 1)
dh = 1;
h -= dh;
}
if (tmg.volcanoGen.isInside(x, y, tmp)){
CirclePoint c = tmg.volcanoGen.getCirclePoint(x, y, tmp);
double height = 20+10*Util.hashToGaussian(Util.hash(seed, c.cx, c.cy));
double p = c.percentToR;
if (p > 1)
p = 1;
h += height*(1-p);