From e0aa0847ce24c528916f79cb4a33a577dee29130 Mon Sep 17 00:00:00 2001 From: Jacob Mandelson Date: Sat, 21 Jun 2025 21:49:27 -0700 Subject: [PATCH 1/8] Don't specially color the trees of the Haunted Woods. --- celldrawer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/celldrawer.cpp b/celldrawer.cpp index 0a352176..ab88d2d3 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -510,8 +510,8 @@ void celldrawer::setcolors() { if(c->monst == moFriendlyGhost) fcol = gradient(fcol, fghostcolor(c), 0, .5, 1); - if(c->wall == waSmallTree) wcol = 0x004000; - else if(c->wall == waBigTree) wcol = 0x008000; + /* if(c->wall == waSmallTree) wcol = 0x006000; + else if(c->wall == waBigTree) wcol = 0x008000; */ } } From 0bbeb3de0f1678dd72daf0b24dc5ca3723dc0182 Mon Sep 17 00:00:00 2001 From: Jacob Mandelson Date: Sat, 21 Jun 2025 21:58:08 -0700 Subject: [PATCH 2/8] Don't recolor the graves in the Irradiated Field, either. --- celldrawer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/celldrawer.cpp b/celldrawer.cpp index ab88d2d3..1f87cd46 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -209,10 +209,10 @@ void celldrawer::setcolors() { for(int a=0; a<21; a++) if((b >> a) & 1) fcol += variant::features[a].color_change; - if(c->wall == waAncientGrave) + /*if(c->wall == waAncientGrave) wcol = 0x080808; else if(c->wall == waFreshGrave) - wcol = 0x202020; + wcol = 0x202020;*/ break; } #endif From ac6226a9945e2309180f75439028dfcee8db2284 Mon Sep 17 00:00:00 2001 From: Jacob Mandelson Date: Sat, 21 Jun 2025 22:17:20 -0700 Subject: [PATCH 3/8] Increase contrast of Prairie bull lanes. --- celldrawer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/celldrawer.cpp b/celldrawer.cpp index 1f87cd46..018b654e 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -88,7 +88,7 @@ inline void drawcell(cell *c, const shiftmatrix& V) { static constexpr int trapcol[4] = {0x904040, 0xA02020, 0xD00000, 0x303030}; static constexpr int terracol[8] = {0xD000, 0xE25050, 0xD0D0D0, 0x606060, 0x303030, 0x181818, 0x0080, 0x8080}; -EX colortable prairie_colors = { 0x402000, 0x503000 }; +EX colortable prairie_colors = { 0x102030, 0x905010 }; EX colortable mountain_colors = { 0x181008*2, 0x181008*4 }; EX colortable tower_colors = { 0x202010, 0x404030 }; EX colortable westwall_colors = { 0x211F6F, 0x413F8F }; From bf9665392d8047604fa6755bae72539367d022c2 Mon Sep 17 00:00:00 2001 From: Jacob Mandelson Date: Sat, 21 Jun 2025 23:05:20 -0700 Subject: [PATCH 4/8] Create parameter for higher contrast colors. --- config.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config.cpp b/config.cpp index 8c7d72c9..7f4e4a0d 100644 --- a/config.cpp +++ b/config.cpp @@ -29,6 +29,8 @@ EX bool linked_consequence; EX bool hr_hud_enabled = true; +EX bool higher_contrast = false; + EX void adjust_linked() { indenter ind(2); geom3::invalid = ""; @@ -1111,6 +1113,10 @@ EX void initConfig() { "This lets you see an explanation of what the setting does. " "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(models::desitter_projections, "desitter_projections", false); param_b(nonisotropic_weird_transforms, "nonisotropic_weird_transforms", false); @@ -3720,6 +3726,7 @@ EX void show_color_dialog() { 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::addBoolItem_action(XLAT("higher contrast"), higher_contrast, 'h'); dialog::addBreak(50); if(specialland == laCanvas && ccolor::which->ctab.size()) { From 2012520e8f40e8da695b7edefc7a3c6fe68db43b Mon Sep 17 00:00:00 2001 From: Jacob Mandelson Date: Sat, 21 Jun 2025 23:21:25 -0700 Subject: [PATCH 5/8] Only show trees in default colors in HW if higher_contrast is set. --- celldrawer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/celldrawer.cpp b/celldrawer.cpp index 018b654e..258751d2 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -510,8 +510,10 @@ void celldrawer::setcolors() { if(c->monst == moFriendlyGhost) fcol = gradient(fcol, fghostcolor(c), 0, .5, 1); - /* if(c->wall == waSmallTree) wcol = 0x006000; - else if(c->wall == waBigTree) wcol = 0x008000; */ + if (!higher_contrast) { + if(c->wall == waSmallTree) wcol = 0x004000; + else if(c->wall == waBigTree) wcol = 0x008000; + } } } From 77ab546a10c7729a742e79ad5d174e6ea2168307 Mon Sep 17 00:00:00 2001 From: Jacob Mandelson Date: Sat, 21 Jun 2025 23:28:53 -0700 Subject: [PATCH 6/8] Only show graves in IF with default colors if higher_contrast is set. --- celldrawer.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/celldrawer.cpp b/celldrawer.cpp index 258751d2..82219f2e 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -209,10 +209,12 @@ void celldrawer::setcolors() { for(int a=0; a<21; a++) if((b >> a) & 1) fcol += variant::features[a].color_change; - /*if(c->wall == waAncientGrave) - wcol = 0x080808; - else if(c->wall == waFreshGrave) - wcol = 0x202020;*/ + if(!higher_contrast) { + if(c->wall == waAncientGrave) + wcol = 0x080808; + else if(c->wall == waFreshGrave) + wcol = 0x202020; + } break; } #endif From 6f008503a81507796e1a6917e46f7f965e840528 Mon Sep 17 00:00:00 2001 From: Jacob Mandelson Date: Sat, 21 Jun 2025 23:36:22 -0700 Subject: [PATCH 7/8] Revert Prairie colors b/c they're actually editable in-game. --- celldrawer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/celldrawer.cpp b/celldrawer.cpp index 82219f2e..8389ed5b 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -88,7 +88,9 @@ inline void drawcell(cell *c, const shiftmatrix& V) { static constexpr int trapcol[4] = {0x904040, 0xA02020, 0xD00000, 0x303030}; static constexpr int terracol[8] = {0xD000, 0xE25050, 0xD0D0D0, 0x606060, 0x303030, 0x181818, 0x0080, 0x8080}; -EX colortable prairie_colors = { 0x102030, 0x905010 }; +EX colortable prairie_colors = { 0x402000, 0x503000 }; +//EX colortable prairie_colors_low_cont = { 0x402000, 0x503000 }; +//EX colortable prairie_colors_high_cont = { 0x102030, 0x905010 }; EX colortable mountain_colors = { 0x181008*2, 0x181008*4 }; EX colortable tower_colors = { 0x202010, 0x404030 }; EX colortable westwall_colors = { 0x211F6F, 0x413F8F }; From 4d37090faad667cd3e5d9b5aaafed689ae0727c5 Mon Sep 17 00:00:00 2001 From: Jacob Mandelson Date: Sat, 21 Jun 2025 23:53:41 -0700 Subject: [PATCH 8/8] Re-enable Praire lane high contrast colors. This is because the Prairie colors can't actually be saved in the .ini config file, despite their being intended to. --- celldrawer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/celldrawer.cpp b/celldrawer.cpp index 8389ed5b..26fe7316 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -89,8 +89,7 @@ static constexpr int trapcol[4] = {0x904040, 0xA02020, 0xD00000, 0x303030}; static constexpr int terracol[8] = {0xD000, 0xE25050, 0xD0D0D0, 0x606060, 0x303030, 0x181818, 0x0080, 0x8080}; EX colortable prairie_colors = { 0x402000, 0x503000 }; -//EX colortable prairie_colors_low_cont = { 0x402000, 0x503000 }; -//EX colortable prairie_colors_high_cont = { 0x102030, 0x905010 }; +EX colortable prairie_colors_high_cont = { 0x102030, 0x905010 }; EX colortable mountain_colors = { 0x181008*2, 0x181008*4 }; EX colortable tower_colors = { 0x202010, 0x404030 }; EX colortable westwall_colors = { 0x211F6F, 0x413F8F }; @@ -404,7 +403,8 @@ void celldrawer::setcolors() { #if CAP_FIELD case laPrairie: 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 { fcol = 0x004000 + 0x001000 * c->LHU.fi.walldist;