mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-08 15:09:54 +00:00
fixed 'formula' pattern to use RGB correctly
This commit is contained in:
parent
e6417951de
commit
90c7f6e927
@ -3295,6 +3295,7 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
|
||||
});
|
||||
|
||||
param_ccolor(ccolor::which, "pattern");
|
||||
param_str(ccolor::color_formula, "color_formula");
|
||||
});
|
||||
|
||||
EX void switchcolor(unsigned int& c, unsigned int* cs) {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user