Split script/functions.cpp into multiple files in new script/functions/ directory.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@217 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-03-18 22:13:27 +00:00
parent 2cc6aa5524
commit f2ce80d88a
26 changed files with 952 additions and 686 deletions
+6 -6
View File
@@ -389,17 +389,17 @@ String KeywordDatabase::expand(const String& text,
part = part + param; // keep tags
} else if (kw->parameters[j/2-1]->script) {
// apply parameter script
ctx.setVariable(_("input"), toScript(part));
ctx.setVariable(_("input"), to_script(part));
part = kw->parameters[j/2-1]->script.invoke(ctx)->toString();
ctx.setVariable(_("input"), toScript(part));
ctx.setVariable(_("input"), to_script(part));
param = kw->parameters[j/2-1]->script.invoke(ctx)->toString();
}
ctx.setVariable(String(_("param")) << (int)(j/2), toScript(param));
ctx.setVariable(String(_("param")) << (int)(j/2), to_script(param));
}
total += part;
start = part_end;
}
ctx.setVariable(_("mode"), toScript(kw->mode));
ctx.setVariable(_("mode"), to_script(kw->mode));
// Show reminder text?
bool expand = expand_type == _('1');
@@ -412,8 +412,8 @@ String KeywordDatabase::expand(const String& text,
// Combine keyword & reminder with result
if (expand) {
String reminder = kw->reminder.invoke(ctx)->toString();
ctx.setVariable(_("keyword"), toScript(total));
ctx.setVariable(_("reminder"), toScript(reminder));
ctx.setVariable(_("keyword"), to_script(total));
ctx.setVariable(_("reminder"), to_script(reminder));
result += _("<kw-"); result += expand_type; result += _(">");
result += combine_script->eval(ctx)->toString();
result += _("</kw-"); result += expand_type; result += _(">");