mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Script support for AColors. All colors in script related code are now AColor.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@852 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -511,6 +511,18 @@ void parseExpr(TokenIterator& input, Script& script, Precedence minPrec) {
|
||||
parseOper(input, script, PREC_ALL); // b
|
||||
expectToken(input, _(")"));
|
||||
script.addInstruction(I_TERNARY, I_RGB);
|
||||
} else if (token == _("rgba")) {
|
||||
// rgba(r, g, b, a)
|
||||
expectToken(input, _("("));
|
||||
parseOper(input, script, PREC_ALL); // r
|
||||
expectToken(input, _(","));
|
||||
parseOper(input, script, PREC_ALL); // g
|
||||
expectToken(input, _(","));
|
||||
parseOper(input, script, PREC_ALL); // b
|
||||
expectToken(input, _(","));
|
||||
parseOper(input, script, PREC_ALL); // a
|
||||
expectToken(input, _(")"));
|
||||
script.addInstruction(I_QUATERNARY, I_RGBA);
|
||||
} else if (token == _("min") || token == _("max")) {
|
||||
// min(x,y,z,...)
|
||||
unsigned int op = token == _("min") ? I_MIN : I_MAX;
|
||||
|
||||
Reference in New Issue
Block a user