diff options
author | Eugene Sandulenko | 2016-06-19 18:52:07 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 81b056ffc1670dba3e46c42eb5d16263ab724f6e (patch) | |
tree | 1e4786034be01e13a07562c1370dc6723dc281c1 /engines/director/lingo/lingo.cpp | |
parent | 4a536c57f1012c0bb4380d84ddc2ee72c3f3d332 (diff) | |
download | scummvm-rg350-81b056ffc1670dba3e46c42eb5d16263ab724f6e.tar.gz scummvm-rg350-81b056ffc1670dba3e46c42eb5d16263ab724f6e.tar.bz2 scummvm-rg350-81b056ffc1670dba3e46c42eb5d16263ab724f6e.zip |
DIRECTOR: Lingo: Add missing funcs
Diffstat (limited to 'engines/director/lingo/lingo.cpp')
-rw-r--r-- | engines/director/lingo/lingo.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 51d5312a38..1572685bc3 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -21,6 +21,7 @@ */ #include "director/lingo/lingo.h" +#include "director/lingo/lingo-gr.h" namespace Director { @@ -66,6 +67,12 @@ struct EventHandlerType { { kEventNone, 0 }, }; +Symbol::Symbol() { + name = NULL; + type = UNDEF; + u.str = NULL; +} + Lingo::Lingo(DirectorEngine *vm) : _vm(vm) { g_lingo = this; @@ -82,8 +89,7 @@ Lingo::~Lingo() { } int Lingo::codeString(const char *str) { - int instLen = sizeof(inst); - int numInsts = strlen(str) / instLen + (strlen(str) + 1 + instLen - 1) % instLen; + int numInsts = calcStringAlignment(str); // Where we copy the string over int pos = _currentScript->size(); |