Skip to content

Commit

Permalink
DIRECTOR: Lingo: Simplified code generation for constants
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Aug 4, 2016
1 parent 415cefd commit 8883a03
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 134 deletions.
9 changes: 9 additions & 0 deletions engines/director/lingo/lingo-codegen.cpp
Expand Up @@ -184,6 +184,15 @@ int Lingo::codeFloat(double f) {
return _currentScript->size();
}

int Lingo::codeConst(int val) {
int res = g_lingo->code1(g_lingo->c_constpush);
inst i = 0;
WRITE_UINT32(&i, val);
g_lingo->code1(i);

return res;
}

void Lingo::codeArg(Common::String *s) {
_argstack.push_back(s);
}
Expand Down

0 comments on commit 8883a03

Please sign in to comment.