fixed warped lands

This commit is contained in:
Zeno Rogue 2017-12-18 21:15:03 +01:00
parent 5185f0e186
commit 3ae3faa3c3
3 changed files with 13 additions and 3 deletions

View File

@ -364,7 +364,7 @@ bool isWarped(cell *c) {
}
bool nonAdjacent(cell *c, cell *c2) {
if(isWarped(c) && isWarped(c2) && !pseudohept(c) && !pseudohept(c2)) {
if(isWarped(c) && isWarped(c2) && warptype(c) == warptype(c2)) {
/* int i = neighborId(c, c2);
cell *c3 = c->mov[(i+1)%6], *c4 = c->mov[(i+5)%6];
if(c3 && !isTrihepta(c3)) return false;

View File

@ -2444,7 +2444,7 @@ void setcolors(cell *c, int& wcol, int &fcol) {
else if(c->land == laLivefjord)
fcol = 0x000080;
else if(isWarped(c->land))
fcol = 0x0000C0 + int((pseudohept(c)?30:-30) * sin(ticks / 600.));
fcol = 0x0000C0 + int((warptype(c)?30:-30) * sin(ticks / 600.));
else
fcol = wcol;
}
@ -2726,7 +2726,7 @@ void setcolors(cell *c, int& wcol, int &fcol) {
default:
if(isElemental(c->land)) fcol = linf[c->land].color;
if(isWarped(c->land)) {
fcol = pseudohept(c) ? 0x80C080 : 0xA06020;
fcol = warptype(c) ? 0x80C080 : 0xA06020;
if(c->wall == waSmallTree) wcol = 0x608000;
}
if(isHaunted(c->land)) {

View File

@ -898,6 +898,16 @@ bool pseudohept(cell *c) {
return pattern_threecolor(c) == 0;
}
bool warptype(cell *c) {
if(a4 && nontruncated) {
if(euclid)
return among(eupattern4(c), 1, 2);
else
return c->master->distance & 1;
}
else return pattern_threecolor(c) == 0;
}
namespace patterns {
int canvasback = linf[laCanvas].color >> 2;
int subcanvas;