aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur
diff options
context:
space:
mode:
authorPaul Gilbert2013-06-23 14:55:27 -0400
committerPaul Gilbert2013-06-23 14:55:27 -0400
commita4e445702f5c65337f21364ac9d5f37e28e8e657 (patch)
treee1182418357c6358b69730f0ed661c7ef050ccb8 /engines/voyeur
parent2654135257bc6771a3e18794df15b0d8fc238647 (diff)
downloadscummvm-rg350-a4e445702f5c65337f21364ac9d5f37e28e8e657.tar.gz
scummvm-rg350-a4e445702f5c65337f21364ac9d5f37e28e8e657.tar.bz2
scummvm-rg350-a4e445702f5c65337f21364ac9d5f37e28e8e657.zip
VOYEUR: Implemented doTransitionCard
Diffstat (limited to 'engines/voyeur')
-rw-r--r--engines/voyeur/files.cpp4
-rw-r--r--engines/voyeur/files.h1
-rw-r--r--engines/voyeur/game.cpp45
-rw-r--r--engines/voyeur/game.h11
-rw-r--r--engines/voyeur/voyeur.cpp32
-rw-r--r--engines/voyeur/voyeur.h6
6 files changed, 94 insertions, 5 deletions
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp
index 16566d8ef3..34098e42a1 100644
--- a/engines/voyeur/files.cpp
+++ b/engines/voyeur/files.cpp
@@ -1051,7 +1051,11 @@ void ViewPortResource::addSaveRect(int pageIndex, const Common::Rect &r) {
}
void ViewPortResource::sFillBox(int width) {
+ // TODO
+}
+void ViewPortResource::fillPic(byte onOff) {
+ _state._vm->_graphicsManager.fillPic(this, onOff);
}
/*------------------------------------------------------------------------*/
diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h
index 5d825ffce9..b66546cd0c 100644
--- a/engines/voyeur/files.h
+++ b/engines/voyeur/files.h
@@ -274,6 +274,7 @@ public:
int textWidth(const Common::String &msg);
void addSaveRect(int pageIndex, const Common::Rect &r);
void sFillBox(int width);
+ void fillPic(byte onOff = 0);
};
class ViewPortPalEntry {
diff --git a/engines/voyeur/game.cpp b/engines/voyeur/game.cpp
index 9d71fbf653..47b59b87db 100644
--- a/engines/voyeur/game.cpp
+++ b/engines/voyeur/game.cpp
@@ -50,4 +50,49 @@ void IntData::audioInit() {
/*------------------------------------------------------------------------*/
+Game::Game() {
+}
+
+void Game::doTransitionCard(const Common::String &time, const Common::String &location) {
+ _vm->_graphicsManager.setColor(128, 16, 16, 16);
+ _vm->_graphicsManager.setColor(224, 220, 220, 220);
+ _vm->_eventsManager._intPtr.field38 = true;
+ _vm->_eventsManager._intPtr._hasPalette = true;
+
+ (*_vm->_graphicsManager._vPort)->setupViewPort();
+ (*_vm->_graphicsManager._vPort)->fillPic(128);
+ _vm->_graphicsManager.flipPage();
+ _vm->_eventsManager.sWaitFlip();
+
+ (*_vm->_graphicsManager._vPort)->_parent->_flags |= DISPFLAG_8;
+ _vm->_graphicsManager.flipPage();
+ _vm->_eventsManager.sWaitFlip();
+ (*_vm->_graphicsManager._vPort)->fillPic(128);
+
+ FontInfoResource &fi = *_vm->_graphicsManager._fontPtr;
+ fi._curFont = _vm->_bVoy->boltEntry(257)._fontResource;
+ fi._foreColor = 224;
+ fi._fontSaveBack = 0;
+ fi._pos = Common::Point(0, 116);
+ fi._justify = ALIGN_CENTRE;
+ fi._justifyWidth = 384;
+ fi._justifyHeight = 120;
+
+ (*_vm->_graphicsManager._vPort)->drawText(time);
+
+ if (!location.empty()) {
+ fi._pos = Common::Point(0, 138);
+ fi._justify = ALIGN_CENTRE;
+ fi._justifyWidth = 384;
+ fi._justifyHeight = 140;
+
+ (*_vm->_graphicsManager._vPort)->drawText(location);
+ }
+
+ (*_vm->_graphicsManager._vPort)->_parent->_flags |= DISPFLAG_8;
+ _vm->_graphicsManager.flipPage();
+ _vm->_eventsManager.sWaitFlip();
+}
+
+
} // End of namespace Voyeur
diff --git a/engines/voyeur/game.h b/engines/voyeur/game.h
index e47a880422..b569cb712f 100644
--- a/engines/voyeur/game.h
+++ b/engines/voyeur/game.h
@@ -25,6 +25,7 @@
#include "common/scummsys.h"
#include "common/events.h"
+#include "common/str.h"
namespace Voyeur {
@@ -120,6 +121,16 @@ public:
void audioInit();
};
+class Game {
+private:
+ VoyeurEngine *_vm;
+public:
+ Game();
+ void setVm(VoyeurEngine *vm) { _vm = vm; }
+
+ void doTransitionCard(const Common::String &time, const Common::String &location);
+};
+
} // End of namespace Voyeur
#endif /* VOYEUR_GAME_H */
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index e7adc7d11b..f54d72acaa 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -100,6 +100,7 @@ void VoyeurEngine::initialiseManagers() {
_debugger.setVm(this);
_eventsManager.setVm(this);
_filesManager.setVm(this);
+ _game.setVm(this);
_graphicsManager.setVm(this);
_soundManager.setVm(this);
@@ -146,7 +147,7 @@ void VoyeurEngine::vInitInterrupts() {
void VoyeurEngine::initInput() {
}
-void VoyeurEngine::doHeadTitle() {
+bool VoyeurEngine::doHeadTitle() {
// char dest[144];
_eventsManager.startMainClockInt();
@@ -155,15 +156,35 @@ void VoyeurEngine::doHeadTitle() {
if (_bVoy->getBoltGroup(0x10500))
showConversionScreen();
if (shouldQuit())
- return;
+ return false;
if (ConfMan.getBool("copy_protection")) {
bool result = doLock();
if (!result || shouldQuit())
- return;
+ return false;
}
showTitleScreen();
+
+ // Opening
+ if (!_voy._incriminate) {
+ doOpening();
+ _game.doTransitionCard("Saturday Afternoon", "Player's Apartment");
+ _eventsManager.delay(90);
+ } else {
+ _voy._incriminate = false;
+ }
+
+ if (_voy._eCursorOff[58] & 0x80) {
+ if (_voy._evidence[19] == 0) {
+ // TODO
+ } else {
+ // TODO
+ }
+ }
+
+ _voy._eCursorOff[55] = 140;
+ return true;
}
void VoyeurEngine::showConversionScreen() {
@@ -428,6 +449,7 @@ void VoyeurEngine::showTitleScreen() {
_graphicsManager.screenReset();
_eventsManager.delay(200);
+ // Voyeur title
playRL2Video("a1100100.rl2");
_graphicsManager.screenReset();
@@ -435,6 +457,10 @@ void VoyeurEngine::showTitleScreen() {
}
}
+void VoyeurEngine::doOpening() {
+
+}
+
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 10fe19253c..f698aae702 100644
--- a/engines/voyeur/voyeur.h
+++ b/engines/voyeur/voyeur.h
@@ -65,7 +65,6 @@ private:
const VoyeurGameDescription *_gameDescription;
Common::RandomSource _randomSource;
- BoltFile *_bVoy;
Common::Array<int> _resolves;
FontInfoResource _defaultFontInfo;
@@ -76,18 +75,21 @@ private:
void vInitInterrupts();
void initInput();
- void doHeadTitle();
+ bool doHeadTitle();
void showConversionScreen();
bool doLock();
void showTitleScreen();
+ void doOpening();
protected:
// Engine APIs
virtual Common::Error run();
virtual bool hasFeature(EngineFeature f) const;
public:
+ BoltFile *_bVoy;
Debugger _debugger;
EventsManager _eventsManager;
FilesManager _filesManager;
+ Game _game;
GraphicsManager _graphicsManager;
SoundManager _soundManager;
SVoy _voy;