1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-06-26 15:12:48 +00:00
This commit is contained in:
Zeno Rogue 2025-06-22 16:15:36 +02:00
commit ee8d2b0077
2 changed files with 20 additions and 7 deletions

View File

@ -89,6 +89,7 @@ static constexpr int trapcol[4] = {0x904040, 0xA02020, 0xD00000, 0x303030};
static constexpr int terracol[8] = {0xD000, 0xE25050, 0xD0D0D0, 0x606060, 0x303030, 0x181818, 0x0080, 0x8080}; static constexpr int terracol[8] = {0xD000, 0xE25050, 0xD0D0D0, 0x606060, 0x303030, 0x181818, 0x0080, 0x8080};
EX colortable prairie_colors = { 0x402000, 0x503000 }; EX colortable prairie_colors = { 0x402000, 0x503000 };
EX colortable prairie_colors_high_cont = { 0x102030, 0x905010 };
EX colortable mountain_colors = { 0x181008*2, 0x181008*4 }; EX colortable mountain_colors = { 0x181008*2, 0x181008*4 };
EX colortable tower_colors = { 0x202010, 0x404030 }; EX colortable tower_colors = { 0x202010, 0x404030 };
EX colortable westwall_colors = { 0x211F6F, 0x413F8F }; EX colortable westwall_colors = { 0x211F6F, 0x413F8F };
@ -211,10 +212,12 @@ void celldrawer::setcolors() {
for(int a=0; a<21; a++) for(int a=0; a<21; a++)
if((b >> a) & 1) if((b >> a) & 1)
fcol += variant::features[a].color_change; fcol += variant::features[a].color_change;
if(!higher_contrast) {
if(c->wall == waAncientGrave) if(c->wall == waAncientGrave)
wcol = 0x080808; wcol = 0x080808;
else if(c->wall == waFreshGrave) else if(c->wall == waFreshGrave)
wcol = 0x202020; wcol = 0x202020;
}
break; break;
} }
#endif #endif
@ -402,7 +405,8 @@ void celldrawer::setcolors() {
#if CAP_FIELD #if CAP_FIELD
case laPrairie: case laPrairie:
if(prairie::isriver(c)) { if(prairie::isriver(c)) {
fcol = get_color_auto3(prairie::get_val(c), prairie_colors); fcol = get_color_auto3(prairie::get_val(c),
higher_contrast ? prairie_colors_high_cont : prairie_colors);
} }
else { else {
fcol = 0x004000 + 0x001000 * c->LHU.fi.walldist; fcol = 0x004000 + 0x001000 * c->LHU.fi.walldist;
@ -512,10 +516,12 @@ void celldrawer::setcolors() {
if(c->monst == moFriendlyGhost) if(c->monst == moFriendlyGhost)
fcol = gradient(fcol, fghostcolor(c), 0, .5, 1); fcol = gradient(fcol, fghostcolor(c), 0, .5, 1);
if (!higher_contrast) {
if(c->wall == waSmallTree) wcol = 0x004000; if(c->wall == waSmallTree) wcol = 0x004000;
else if(c->wall == waBigTree) wcol = 0x008000; else if(c->wall == waBigTree) wcol = 0x008000;
} }
} }
}
/* if(c->land == laCaribbean && (c->wall == waCIsland || c->wall == waCIsland2)) /* if(c->land == laCaribbean && (c->wall == waCIsland || c->wall == waCIsland2))
fcol = wcol = winf[c->wall].color; */ fcol = wcol = winf[c->wall].color; */

View File

@ -29,6 +29,8 @@ EX bool linked_consequence;
EX bool hr_hud_enabled = true; EX bool hr_hud_enabled = true;
EX bool higher_contrast = false;
EX void adjust_linked() { EX void adjust_linked() {
indenter ind(2); indenter ind(2);
geom3::invalid = ""; geom3::invalid = "";
@ -1111,6 +1113,10 @@ EX void initConfig() {
"This lets you see an explanation of what the setting does. " "This lets you see an explanation of what the setting does. "
"You can also press ALT while changing such settings."); "You can also press ALT while changing such settings.");
param_b(higher_contrast, "higher_contrast")
->editable("use higher contrast", 'h')
->help("Use higher contrast for some terrain elements.");
param_b(vid.grid, "grid"); param_b(vid.grid, "grid");
param_b(models::desitter_projections, "desitter_projections", false); param_b(models::desitter_projections, "desitter_projections", false);
param_b(nonisotropic_weird_transforms, "nonisotropic_weird_transforms", false); param_b(nonisotropic_weird_transforms, "nonisotropic_weird_transforms", false);
@ -3722,6 +3728,7 @@ EX void show_color_dialog() {
dialog::addColorItem(XLAT("dialogs"), addalpha(dialog::dialogcolor), 'd'); dialog::addColorItem(XLAT("dialogs"), addalpha(dialog::dialogcolor), 'd');
dialog::add_action([] () { dialog::openColorDialog(dialog::dialogcolor); dialog::colorAlpha = false; dialog::get_di().dialogflags |= sm::SIDE; }); dialog::add_action([] () { dialog::openColorDialog(dialog::dialogcolor); dialog::colorAlpha = false; dialog::get_di().dialogflags |= sm::SIDE; });
dialog::addBoolItem_action(XLAT("higher contrast"), higher_contrast, 'h');
dialog::addBreak(50); dialog::addBreak(50);
if(specialland == laCanvas && ccolor::which->ctab.size()) { if(specialland == laCanvas && ccolor::which->ctab.size()) {