1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-24 05:17:17 +00:00

fixed the Yendorian sky colors when scrolling

This commit is contained in:
Zeno Rogue 2018-04-11 18:01:39 +02:00
parent 9d91390677
commit f23dc4b585

View File

@ -2809,14 +2809,19 @@ void setcolors(cell *c, int& wcol, int &fcol) {
}
case laEndorian: {
int clev = cwt.c->land == laEndorian ? edgeDepth(cwt.c) : 0;
int clev = pd_from->land == laEndorian ? edgeDepth(pd_from) : 0;
// xcol = (c->landparam&1) ? 0xD00000 : 0x00D000;
fcol = 0x10101 * (32 + (c->landparam&1) * 32) - 0x000010;
int ed = edgeDepth(c);
int sr = get_sightrange_ambush();
while(ed > clev + sr) ed -= 2;
while(ed < clev - sr) ed += 2;
fcol = gradient(fcol, 0x0000D0, clev-sr, edgeDepth(c), clev+sr);
if(clev == UNKNOWN || ed == UNKNOWN)
fcol = 0x0000D0;
else {
while(ed > clev + sr) ed -= 2;
while(ed < clev - sr) ed += 2;
fcol = gradient(fcol, 0x0000D0, clev-sr, edgeDepth(c), clev+sr);
}
if(c->wall == waTrunk) fcol = winf[waTrunk].color;
if(c->wall == waCanopy || c->wall == waSolidBranch || c->wall == waWeakBranch) {