diff options
author | Sven Hesse | 2008-05-28 21:15:11 +0000 |
---|---|---|
committer | Sven Hesse | 2008-05-28 21:15:11 +0000 |
commit | 8da68b29648f9dbdcc05b3a1efe4a29ed2c4e88c (patch) | |
tree | 7f2416cbf176f53a871b0cc3bea4785284ba4889 /engines/gob/game_v2.cpp | |
parent | c9fd5fef7645cc7ba6e14ddfeaab91d941f3b8f7 (diff) | |
download | scummvm-rg350-8da68b29648f9dbdcc05b3a1efe4a29ed2c4e88c.tar.gz scummvm-rg350-8da68b29648f9dbdcc05b3a1efe4a29ed2c4e88c.tar.bz2 scummvm-rg350-8da68b29648f9dbdcc05b3a1efe4a29ed2c4e88c.zip |
Script variables are now always stored in the game version's native endianess.
This should make Woodruff playable on big-endian systems.
svn-id: r32352
Diffstat (limited to 'engines/gob/game_v2.cpp')
-rw-r--r-- | engines/gob/game_v2.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp index e783f5bfb5..adf75176ab 100644 --- a/engines/gob/game_v2.cpp +++ b/engines/gob/game_v2.cpp @@ -54,7 +54,6 @@ void Game_v2::playTot(int16 skipPlay) { int16 _captureCounter; int16 breakFrom; int16 nestLevel; - int32 variablesCount; int32 totSize; byte *filePtr; byte *savedIP; @@ -72,7 +71,7 @@ void Game_v2::playTot(int16 skipPlay) { if (skipPlay <= 0) { while (!_vm->_quitRequested) { - if (_vm->_global->_inter_variables) + if (_vm->_inter->_variables) _vm->_draw->animateCursor(4); if (skipPlay != -1) { @@ -204,12 +203,8 @@ void Game_v2::playTot(int16 skipPlay) { _vm->_global->_inter_animDataSize = READ_LE_UINT16(_totFileData + 0x38); - if (!_vm->_global->_inter_variables) { - variablesCount = READ_LE_UINT16(_totFileData + 0x2C); - _vm->_global->_inter_variables = new byte[variablesCount * 4]; - _vm->_global->_inter_variablesSizes = new byte[variablesCount * 4]; - _vm->_global->clearVars(variablesCount); - } + if (!_vm->_inter->_variables) + _vm->_inter->allocateVars(READ_LE_UINT16(_totFileData + 0x2C)); _vm->_global->_inter_execPtr = _totFileData; _vm->_global->_inter_execPtr += @@ -1408,7 +1403,7 @@ int16 Game_v2::inputArea(int16 xPos, int16 yPos, int16 width, int16 height, flag = 1; - if (_vm->_global->_inter_variables) + if (_vm->_inter->_variables) WRITE_VAR(56, pos); while (1) { |