aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur
diff options
context:
space:
mode:
Diffstat (limited to 'engines/voyeur')
-rw-r--r--engines/voyeur/voyeur.cpp46
-rw-r--r--engines/voyeur/voyeur.h1
2 files changed, 45 insertions, 2 deletions
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 1e140f8621..75d97aa174 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -163,8 +163,7 @@ void VoyeurEngine::doHeadTitle() {
return;
}
- playRL2Video("a1100100.rl2");
- // TODO
+ showTitleScreen();
}
void VoyeurEngine::showConversionScreen() {
@@ -392,6 +391,49 @@ bool VoyeurEngine::doLock() {
return result;
}
+void VoyeurEngine::showTitleScreen() {
+ if (_bVoy->getBoltGroup(0x10500)) {
+ _graphicsManager._backgroundPage = _bVoy->getPictureResource(0x500);
+
+ (*_graphicsManager._vPort)->setupViewPort();
+ (*_graphicsManager._vPort)->_flags |= DISPFLAG_8;
+ _graphicsManager.flipPage();
+ _eventsManager.sWaitFlip();
+
+ // Immediate palette load to show the initial screen
+ CMapResource *cMap = _bVoy->getCMapResource(0x501);
+ assert(cMap);
+ cMap->_steps = 60;
+ cMap->startFade();
+
+ // Wait briefly
+ _eventsManager.delay(200);
+ if (shouldQuit())
+ return;
+
+ // Fade out the screen
+ cMap = _bVoy->getCMapResource(0x504);
+ cMap->_steps = 30;
+ cMap->startFade();
+
+ (*_graphicsManager._vPort)->_flags |= DISPFLAG_8;
+ _graphicsManager.flipPage();
+ _eventsManager.sWaitFlip();
+
+ while (!shouldQuit() && (_eventsManager._fadeStatus & 1))
+ _eventsManager.delay(1);
+ if (shouldQuit())
+ return;
+
+ _graphicsManager.screenReset();
+ _eventsManager.delay(200);
+ _bVoy->freeBoltGroup(0x10500);
+
+ playRL2Video("a1100100.rl2");
+ _graphicsManager.screenReset();
+ }
+}
+
void VoyeurEngine::playRL2Video(const Common::String &filename) {
::Video::RL2Decoder decoder;
decoder.loadFile(filename);
diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h
index 06ac691569..10fe19253c 100644
--- a/engines/voyeur/voyeur.h
+++ b/engines/voyeur/voyeur.h
@@ -79,6 +79,7 @@ private:
void doHeadTitle();
void showConversionScreen();
bool doLock();
+ void showTitleScreen();
protected:
// Engine APIs
virtual Common::Error run();