1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-30 09:17:57 +00:00

Merge pull request #407 from jlmjlm/contr1

Increase waRed contrast with EC floor when higher_contrast set
This commit is contained in:
Zeno Rogue
2025-07-09 18:27:33 +02:00
committed by GitHub

View File

@@ -116,7 +116,15 @@ void celldrawer::addaura() {
/* Eclectic City's version of Red Rock is of slightly different color, */ /* Eclectic City's version of Red Rock is of slightly different color, */
/* to make it different from hot cells */ /* to make it different from hot cells */
void eclectic_red(color_t& col) { void eclectic_red(color_t& col) {
part(col, 0) = part(col, 2) * 3 / 4; if (!higher_contrast) {
part(col, 0) = part(col, 2) * 3 / 4;
} else {
auto v = part(col, 0) + part(col, 1) + part(col, 2);
auto t = part(col, 0);
part(col, 0) = part(col, 1);
part(col, 1) = part(col, 2);
part(col, 2) = t + v/3;
}
} }
constexpr ld spinspeed = .75 / M_PI; constexpr ld spinspeed = .75 / M_PI;
@@ -718,7 +726,10 @@ int celldrawer::getSnakelevColor(int i, int last) {
if(c->land == laEclectic) if(c->land == laEclectic)
eclectic_red(col); eclectic_red(col);
} }
return darkena(col, fd, 0xFF); if (!higher_contrast)
return darkena(col, fd, 0xFF);
else
return darkena(col, 0, 0xFF);
} }
void celldrawer::draw_wallshadow() { void celldrawer::draw_wallshadow() {