diff options
Diffstat (limited to 'engines/gob/inter.cpp')
-rw-r--r-- | engines/gob/inter.cpp | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp index de3ac4b1f5..9c39653a1d 100644 --- a/engines/gob/inter.cpp +++ b/engines/gob/inter.cpp @@ -23,6 +23,7 @@ * */ +#include <time.h> // FIXME: for Inter::renewTimeInVars() #include "common/endian.h" @@ -34,9 +35,7 @@ #include "gob/game.h" #include "gob/parse.h" #include "gob/scenery.h" -#include "gob/sound.h" - -#include <time.h> // FIXME: for Inter::renewTimeInVars() +#include "gob/sound/sound.h" namespace Gob { @@ -61,6 +60,12 @@ Inter::Inter(GobEngine *vm) : _vm(vm) { _pastePos = 0; _noBusyWait = false; + + _variables = 0; +} + +Inter::~Inter() { + delocateVars(); } void Inter::initControlVars(char full) { @@ -154,7 +159,7 @@ void Inter::storeKey(int16 key) { WRITE_VAR(12, _vm->_util->getTimeKey() - _vm->_game->_startTimeKey); storeMouse(); - WRITE_VAR(1, _vm->_snd->_playingSound); + WRITE_VAR(1, _vm->_sound->blasterPlayingSound()); if (key == 0x4800) key = 0x0B; @@ -280,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 |