diff options
Diffstat (limited to 'engines/gob/inter.cpp')
-rw-r--r-- | engines/gob/inter.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp index 9e5005f443..9c39653a1d 100644 --- a/engines/gob/inter.cpp +++ b/engines/gob/inter.cpp @@ -60,6 +60,12 @@ Inter::Inter(GobEngine *vm) : _vm(vm) { _pastePos = 0; _noBusyWait = false; + + _variables = 0; +} + +Inter::~Inter() { + delocateVars(); } void Inter::initControlVars(char full) { @@ -279,4 +285,18 @@ void Inter::callSub(int16 retFlag) { _terminate = 1; } +void Inter::allocateVars(uint32 count) { + if ((_vm->getPlatform() == Common::kPlatformAmiga) || + (_vm->getPlatform() == Common::kPlatformMacintosh) || + (_vm->getPlatform() == Common::kPlatformAtariST)) + _variables = new VariablesBE(count * 4); + else + _variables = new VariablesLE(count * 4); +} + +void Inter::delocateVars() { + delete _variables; + _variables = 0; +} + } // End of namespace Gob |