diff options
author | David Corrales | 2007-08-05 19:34:20 +0000 |
---|---|---|
committer | David Corrales | 2007-08-05 19:34:20 +0000 |
commit | 6856535010bd2fa4449bcfde1c88dc06cd46e26f (patch) | |
tree | b81a2234c2beff0312c93e039d6cafda4babeca6 /engines/gob/init.cpp | |
parent | 1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7 (diff) | |
parent | ec1803f838d5efc7decf75c05a1fb4a9633751e5 (diff) | |
download | scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.gz scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.bz2 scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.zip |
Merged fsnode with trunk: r27971:28460
svn-id: r28462
Diffstat (limited to 'engines/gob/init.cpp')
-rw-r--r-- | engines/gob/init.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/engines/gob/init.cpp b/engines/gob/init.cpp index 2f1dbe5326..4712a19a5d 100644 --- a/engines/gob/init.cpp +++ b/engines/gob/init.cpp @@ -37,7 +37,7 @@ #include "gob/palanim.h" #include "gob/sound.h" #include "gob/video.h" -#include "gob/imd.h" +#include "gob/videoplayer.h" namespace Gob { @@ -147,10 +147,12 @@ void Init::initGame(const char *totName) { handle = _vm->_dataIO->openData(buffer); if (handle >= 0) { - // Get variables count - _vm->_dataIO->seekData(handle, 0x2C, SEEK_SET); - varsCount = _vm->_dataIO->readUint16(handle); - _vm->_dataIO->closeData(handle); + DataStream *stream = _vm->_dataIO->openAsStream(handle, true); + + stream->seek(0x2C); + varsCount = stream->readUint16LE(); + + delete stream; _vm->_global->_inter_variables = new byte[varsCount * 4]; _vm->_global->_inter_variablesSizes = new byte[varsCount * 4]; @@ -167,14 +169,23 @@ void Init::initGame(const char *totName) { _vm->_dataIO->closeData(imdHandle); _vm->_draw->initScreen(); _vm->_draw->_cursorIndex = -1; + _vm->_util->longDelay(200); // Letting everything settle - _vm->_imdPlayer->play("coktel", -1, -1, true); + + if (_vm->_vidPlayer->openVideo("coktel.imd")) { + _vm->_vidPlayer->play(); + _vm->_vidPlayer->closeVideo(); + } + _vm->_draw->closeScreen(); } else if ((imdHandle = _vm->_dataIO->openData("coktel.clt")) >= 0) { _vm->_draw->initScreen(); + + stream = _vm->_dataIO->openAsStream(imdHandle, true); _vm->_util->clearPalette(); - _vm->_dataIO->readData(imdHandle, (byte *) _vm->_draw->_vgaPalette, 768); - _vm->_dataIO->closeData(imdHandle); + stream->read((byte *) _vm->_draw->_vgaPalette, 768); + delete stream; + imdHandle = _vm->_dataIO->openData("coktel.ims"); if (imdHandle >= 0) { byte *sprBuf; |