diff options
Diffstat (limited to 'engines/director/lingo/lingo-codegen.cpp')
-rw-r--r-- | engines/director/lingo/lingo-codegen.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp index a7a004e7d9..553213cc33 100644 --- a/engines/director/lingo/lingo-codegen.cpp +++ b/engines/director/lingo/lingo-codegen.cpp @@ -123,11 +123,14 @@ void Lingo::cleanLocalVars() { delete g_lingo->_localvars; } -void Lingo::define(Common::String &name, int start, int nargs) { +void Lingo::define(Common::String &name, int start, int nargs, Common::String *prefix) { debug(3, "define(\"%s\", %d, %d, %d)", name.c_str(), start, _currentScript->size() - 1, nargs); Symbol *sym; + if (prefix) + name = *prefix + "-" + name; + if (!_handlers.contains(name)) { // Create variable if it was not defined sym = new Symbol; @@ -249,4 +252,8 @@ void Lingo::processIf(int elselabel, int endlabel) { } } +void Lingo::codeFactory(Common::String &name) { + _currentFactory = name; +} + } |