aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/lingo/lingo-code.cpp18
-rw-r--r--engines/director/lingo/lingo.h2
2 files changed, 14 insertions, 6 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 344fbc2885..fb1ad93c5d 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -55,6 +55,13 @@ void Lingo::push(Datum d) {
_stack.push_back(d);
}
+void Lingo::pushVoid() {
+ Datum d;
+ d.u.i = 0;
+ d.type = VOID;
+ push(d);
+}
+
Datum Lingo::pop(void) {
if (_stack.size() == 0)
error("stack underflow");
@@ -692,10 +699,7 @@ void Lingo::c_call() {
g_lingo->pop();
// Push dummy value
- Datum d;
- d.u.i = 0;
- d.type = VOID;
- g_lingo->push(d);
+ g_lingo->pushVoid();
return;
}
@@ -714,8 +718,10 @@ void Lingo::c_call() {
for (int i = 0; i < nargs; i++)
g_lingo->pop();
- return;
- }
+ g_lingo->pushVoid();
+
+ return;
+ }
(*sym->u.func)();
return;
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index e15e979bd9..ec2c018926 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -189,6 +189,8 @@ public:
int codeFloat(double f);
void codeFactory(Common::String &s);
+ void pushVoid();
+
static void c_xpop();
static void c_printtop();