Choice rendering now uses "style.image()" instead of "style.choice_images[value]";

Added script functions for working with multiple choice values;
Added in_context support for filter_rule;
Optimized toUpper/toLower because they are slow on windows (they use thread local storage and mutexes)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@427 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-06-17 13:13:56 +00:00
parent 59d0aee4e7
commit 97e0e8d6d6
16 changed files with 325 additions and 49 deletions
+5 -5
View File
@@ -61,15 +61,15 @@ ScriptValueP Script::dependencies(Context& ctx, const Dependency& dep) const {
}
void Script::addInstruction(InstructionType t) {
//if (t == I_MEMBER_V && !instructions.empty() && instructions.back().instr == I_PUSH_CONST) {
// // optimize: push x ; member_v --> member x
// instructions.back().instr = I_MEMBER;
//} else {
Instruction i = {t, {0}};
instructions.push_back(i);
//}
}
void Script::addInstruction(InstructionType t, unsigned int d) {
if (t == I_BINARY && d == I_MEMBER && !instructions.empty() && instructions.back().instr == I_PUSH_CONST) {
// optimize: push x ; member --> member_c x
instructions.back().instr = I_MEMBER_C;
return;
}
Instruction i = {t, {d}};
instructions.push_back(i);
}