diff options
-rw-r--r-- | engines/voyeur/animation.cpp | 5 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 12 | ||||
-rw-r--r-- | engines/voyeur/voyeur.h | 2 | ||||
-rw-r--r-- | engines/voyeur/voyeur_game.cpp | 7 |
4 files changed, 15 insertions, 11 deletions
diff --git a/engines/voyeur/animation.cpp b/engines/voyeur/animation.cpp index 4f8cca5707..4099ea87bd 100644 --- a/engines/voyeur/animation.cpp +++ b/engines/voyeur/animation.cpp @@ -37,7 +37,8 @@ RL2Decoder::~RL2Decoder() { } bool RL2Decoder::loadVideo(int videoId) { - Common::String filename = Common::String::format("%s.rl2", ::Voyeur::SZ_FILENAMES[videoId]); + Common::String filename = Common::String::format("%s.rl2", + ::Voyeur::SZ_FILENAMES[videoId * 2]); return loadFile(filename); } @@ -161,7 +162,7 @@ RL2Decoder::RL2VideoTrack::RL2VideoTrack(const RL2FileHeader &header, RL2AudioTr _surface = new Graphics::Surface(); _surface->create(320, 200, Graphics::PixelFormat::createFormatCLUT8()); - if (header._backSize == 0) { + if (header._backSize == 0 || !strncmp((char *)&header._signature, "RLV3", 4)) { _backSurface = NULL; } else { _backSurface = new Graphics::Surface(); diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index b2256f06b5..dbd48f7a6a 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -535,14 +535,18 @@ void VoyeurEngine::playRL2Video(const Common::String &filename) { } } +void VoyeurEngine::playAVideo(int videoId) { + playAVideoDuration(videoId, 9999); +} + void VoyeurEngine::playAVideoDuration(int videoId, int duration) { byte *dataP = NULL; int totalFrames = duration * 10; - if (videoId != -1) + if (videoId == -1) return; - if (videoId != 42) { + if (videoId == 42) { _eventsManager._videoDead = 0; dataP = _bVoy->memberAddr(0xE00); } @@ -625,10 +629,6 @@ void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::St flipPageAndWait(); } -void VoyeurEngine::playAVideo(int id) { - warning("TODO: playAVideo"); -} - void VoyeurEngine::saveLastInplay() { LockClass lock; lock.getThePassword(); diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index f18ec4be16..2dde65c5d3 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -143,7 +143,7 @@ public: void playRL2Video(const Common::String &filename); void doTransitionCard(const Common::String &time, const Common::String &location); - void playAVideo(int id); + void playAVideo(int videoId); void playAVideoDuration(int videoId, int duration); /** diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp index 8f49680202..46b4ef6ce1 100644 --- a/engines/voyeur/voyeur_game.cpp +++ b/engines/voyeur/voyeur_game.cpp @@ -498,8 +498,11 @@ void VoyeurEngine::doGossip() { // Transfer initial background to video decoder PictureResource videoFrame(decoder.getVideoSurface()); - _graphicsManager.sDrawPic(bgPic, &videoFrame, Common::Point(-32, -20)); + _graphicsManager.sDrawPic(bgPic, &videoFrame, Common::Point(-32, -20)); + flipPageAndWait(); + + /* byte *frameNumsP = _bVoy->memberAddr(0x309); byte *posP = _bVoy->boltEntry(0x30A)._data; @@ -557,7 +560,7 @@ void VoyeurEngine::doGossip() { _eventsManager.pollEvents(); g_system->delayMillis(10); } - + */ _bVoy->freeBoltGroup(0x300); _graphicsManager.screenReset(); } |