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/init.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/init.cpp')
-rw-r--r-- | engines/gob/init.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/engines/gob/init.cpp b/engines/gob/init.cpp index b1e31b34c2..c2f8b48626 100644 --- a/engines/gob/init.cpp +++ b/engines/gob/init.cpp @@ -33,6 +33,7 @@ #include "gob/draw.h" #include "gob/game.h" #include "gob/palanim.h" +#include "gob/inter.h" #include "gob/video.h" #include "gob/videoplayer.h" #include "gob/sound/sound.h" @@ -62,7 +63,6 @@ void Init::initGame(const char *totName) { char *infPtr; char *infEnd; char buffer[128]; - int32 varsCount; initVideo(); @@ -90,8 +90,6 @@ void Init::initGame(const char *totName) { _vm->_game->_totTextData = 0; _vm->_game->_totFileData = 0; _vm->_game->_totResourceTable = 0; - _vm->_global->_inter_variables = 0; - _vm->_global->_inter_variablesSizes = 0; _palDesc = new Video::PalDesc; _vm->validateVideoMode(_vm->_global->_videoMode); @@ -157,14 +155,10 @@ void Init::initGame(const char *totName) { DataStream *stream = _vm->_dataIO->openAsStream(handle, true); stream->seek(0x2C); - varsCount = stream->readUint16LE(); + _vm->_inter->allocateVars(stream->readUint16LE()); delete stream; - _vm->_global->_inter_variables = new byte[varsCount * 4]; - _vm->_global->_inter_variablesSizes = new byte[varsCount * 4]; - _vm->_global->clearVars(varsCount); - strcpy(_vm->_game->_curTotFile, buffer); _vm->_sound->cdTest(1, "GOB"); @@ -214,8 +208,6 @@ void Init::initGame(const char *totName) { _vm->_sound->cdStop(); _vm->_sound->cdUnloadLIC(); - delete[] _vm->_global->_inter_variables; - delete[] _vm->_global->_inter_variablesSizes; delete[] _vm->_game->_totFileData; if (_vm->_game->_totTextData) { if (_vm->_game->_totTextData->items) |