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:
twanvl
2008-05-16 20:51:16 +00:00
parent b0c0d8e97c
commit 1b516e781f
16 changed files with 115 additions and 44 deletions
+12
View File
@@ -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;