mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user