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

fixed 'formula' pattern to use RGB correctly

This commit is contained in:
Zeno Rogue
2024-05-27 12:36:01 +02:00
parent e6417951de
commit 90c7f6e927
2 changed files with 5 additions and 1 deletions

View File

@@ -1672,7 +1672,10 @@ EX namespace ccolor {
EX string color_formula = "rgb(to01(x),to01(y),to01(z))";
EX data formula = data("formula", always_available, CCO {
return patterns::compute_map_function(c, color_formula);
color_t col = patterns::compute_map_function(c, color_formula);
bool wall = (col & 0xFF);
col >>= 8; if(wall) col |= 0x1000000;
return col;
}, {});
EX data threecolor = data("threecolor", [] { return geosupport_threecolor(); }, CCO {