mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-09-28 22:10:40 +00:00
fixed warped lands
This commit is contained in:
parent
5185f0e186
commit
3ae3faa3c3
2
game.cpp
2
game.cpp
@ -364,7 +364,7 @@ bool isWarped(cell *c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool nonAdjacent(cell *c, cell *c2) {
|
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);
|
/* int i = neighborId(c, c2);
|
||||||
cell *c3 = c->mov[(i+1)%6], *c4 = c->mov[(i+5)%6];
|
cell *c3 = c->mov[(i+1)%6], *c4 = c->mov[(i+5)%6];
|
||||||
if(c3 && !isTrihepta(c3)) return false;
|
if(c3 && !isTrihepta(c3)) return false;
|
||||||
|
@ -2444,7 +2444,7 @@ void setcolors(cell *c, int& wcol, int &fcol) {
|
|||||||
else if(c->land == laLivefjord)
|
else if(c->land == laLivefjord)
|
||||||
fcol = 0x000080;
|
fcol = 0x000080;
|
||||||
else if(isWarped(c->land))
|
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
|
else
|
||||||
fcol = wcol;
|
fcol = wcol;
|
||||||
}
|
}
|
||||||
@ -2726,7 +2726,7 @@ void setcolors(cell *c, int& wcol, int &fcol) {
|
|||||||
default:
|
default:
|
||||||
if(isElemental(c->land)) fcol = linf[c->land].color;
|
if(isElemental(c->land)) fcol = linf[c->land].color;
|
||||||
if(isWarped(c->land)) {
|
if(isWarped(c->land)) {
|
||||||
fcol = pseudohept(c) ? 0x80C080 : 0xA06020;
|
fcol = warptype(c) ? 0x80C080 : 0xA06020;
|
||||||
if(c->wall == waSmallTree) wcol = 0x608000;
|
if(c->wall == waSmallTree) wcol = 0x608000;
|
||||||
}
|
}
|
||||||
if(isHaunted(c->land)) {
|
if(isHaunted(c->land)) {
|
||||||
|
10
pattern2.cpp
10
pattern2.cpp
@ -898,6 +898,16 @@ bool pseudohept(cell *c) {
|
|||||||
return pattern_threecolor(c) == 0;
|
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 {
|
namespace patterns {
|
||||||
int canvasback = linf[laCanvas].color >> 2;
|
int canvasback = linf[laCanvas].color >> 2;
|
||||||
int subcanvas;
|
int subcanvas;
|
||||||
|
Loading…
Reference in New Issue
Block a user