1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-17 03:28:05 +00:00

pattern formula:: wallif function

This commit is contained in:
Zeno Rogue
2019-11-15 13:37:41 +01:00
parent be5dc871b6
commit 388ac890bf
2 changed files with 10 additions and 2 deletions

View File

@@ -183,6 +183,13 @@ cld exp_parser::parse(int prio) {
cld no = parsepar();
return real(cond) > 0 ? yes : no;
}
else if(eat("wallif(")) {
cld val0 = parse(0);
if(next() != ',') {at = -1; return 0; } at++;
cld val1 = parsepar();
if(real(extra_params["p"]) >= 3.5) return val0;
else return val1;
}
else if(eat("rgb(")) {
cld val0 = parse(0);
if(next() != ',') {at = -1; return 0; } at++;