diff options
author | Paul Gilbert | 2013-06-24 08:51:42 -0400 |
---|---|---|
committer | Paul Gilbert | 2013-06-24 08:51:42 -0400 |
commit | d8ef42a7619113f57ce14aa3a4430e4d576ad0b4 (patch) | |
tree | fe1117faf4f6875730043df9151e26eb57376126 /engines | |
parent | a4e445702f5c65337f21364ac9d5f37e28e8e657 (diff) | |
download | scummvm-rg350-d8ef42a7619113f57ce14aa3a4430e4d576ad0b4.tar.gz scummvm-rg350-d8ef42a7619113f57ce14aa3a4430e4d576ad0b4.tar.bz2 scummvm-rg350-d8ef42a7619113f57ce14aa3a4430e4d576ad0b4.zip |
VOYEUR: Work on doOpening method
Diffstat (limited to 'engines')
-rw-r--r-- | engines/voyeur/game.cpp | 3 | ||||
-rw-r--r-- | engines/voyeur/game.h | 6 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 53 |
3 files changed, 61 insertions, 1 deletions
diff --git a/engines/voyeur/game.cpp b/engines/voyeur/game.cpp index 47b59b87db..a653a842ae 100644 --- a/engines/voyeur/game.cpp +++ b/engines/voyeur/game.cpp @@ -94,5 +94,8 @@ void Game::doTransitionCard(const Common::String &time, const Common::String &lo _vm->_eventsManager.sWaitFlip(); } +void Game::addVideoEventStart() { + +} } // End of namespace Voyeur diff --git a/engines/voyeur/game.h b/engines/voyeur/game.h index b569cb712f..eb7d5f5e59 100644 --- a/engines/voyeur/game.h +++ b/engines/voyeur/game.h @@ -125,10 +125,16 @@ class Game { private: VoyeurEngine *_vm; public: + int _v2A098; + int _v2A0A6; + int _v2A0A4; + int _v2A09A; +public: Game(); void setVm(VoyeurEngine *vm) { _vm = vm; } void doTransitionCard(const Common::String &time, const Common::String &location); + void addVideoEventStart(); }; } // End of namespace Voyeur diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index f54d72acaa..f39d9be9d0 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -259,9 +259,9 @@ bool VoyeurEngine::doLock() { _graphicsManager._backColors->startFade(); (*_graphicsManager._vPort)->_parent->_flags |= DISPFLAG_8; - _graphicsManager.flipPage(); _eventsManager.sWaitFlip(); + while (!shouldQuit() && (_eventsManager._fadeStatus & 1)) _eventsManager.delay(1); @@ -458,7 +458,58 @@ void VoyeurEngine::showTitleScreen() { } void VoyeurEngine::doOpening() { + _graphicsManager.screenReset(); + + if (!_bVoy->getBoltGroup(0x10200)) + return; + byte *frameTable = _bVoy->memberAddr(0x215); + byte *xyTable = _bVoy->memberAddr(0x216); + byte *whTable = _bVoy->memberAddr(0x217); + int frmaeIndex = 0; + int creditShow = 1; + _game._v2A098 = 1; + _voy._eCursorOff[52] = 0; + _voy._RTVNum = 0; + _voy._eCursorOff[50] = _voy._RTVNum; + _game._v2A0A6 = 4; + _game._v2A0A4 = 0; + _voy._eCursorOff[58] = 16; + _game._v2A09A = -1; + _game.addVideoEventStart(); + _voy._eCursorOff[58] &= ~1; + + for (int i = 0; i < 256; ++i) + _graphicsManager.setColor(i, 8, 8, 8); + + _eventsManager._intPtr.field38 = 1; + _eventsManager._intPtr._hasPalette = true; + (*_graphicsManager._vPort)->setupViewPort(); + (*_graphicsManager._vPort)->_parent->_flags |= DISPFLAG_8; + _graphicsManager.flipPage(); + _eventsManager.sWaitFlip(); + + ::Video::RL2Decoder decoder; + decoder.loadFile("a2300100.rl2"); + decoder.start(); + + while (!shouldQuit() && !decoder.endOfVideo() && !_voy._incriminate) { + if (decoder.hasDirtyPalette()) { + const byte *palette = decoder.getPalette(); + _graphicsManager.setPalette(palette, 0, 256); + } + + if (decoder.needsUpdate()) { + const Graphics::Surface *frame = decoder.decodeNextFrame(); + + Common::copy((byte *)frame->pixels, (byte *)frame->pixels + 320 * 200, + (byte *)_graphicsManager._screenSurface.pixels); + } + + _eventsManager.pollEvents(); + g_system->delayMillis(10); + } + } void VoyeurEngine::playRL2Video(const Common::String &filename) { |