mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	fixed 'formula' pattern to use RGB correctly
This commit is contained in:
		| @@ -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 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue