aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-02-05 09:00:43 -0500
committerPaul Gilbert2014-02-05 09:00:43 -0500
commitf6c687191834d5208cdcee5266676a8384771845 (patch)
treeec6b4a4339381aeb794599a9c19217189703c8e4
parentd0ca824a629c0ec921805c7b79e4ce1caaa84fc3 (diff)
downloadscummvm-rg350-f6c687191834d5208cdcee5266676a8384771845.tar.gz
scummvm-rg350-f6c687191834d5208cdcee5266676a8384771845.tar.bz2
scummvm-rg350-f6c687191834d5208cdcee5266676a8384771845.zip
VOYEUR: Fix preloading incriminating videos if the debug _iForceDeath is set
-rw-r--r--engines/voyeur/data.cpp1
-rw-r--r--engines/voyeur/voyeur.cpp39
2 files changed, 16 insertions, 24 deletions
diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp
index f0521d28d2..4cbfef5995 100644
--- a/engines/voyeur/data.cpp
+++ b/engines/voyeur/data.cpp
@@ -57,6 +57,7 @@ void SVoy::addEvent(int hour, int minute, VoyeurEventType type, int audioVideoId
int on, int off, int dead) {
VoyeurEvent &e = _events[_eventCount++];
+ e._type = type;
e._hour = hour;
e._minute = minute;
e._isAM = hour < 12;
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index e709bd722c..dae4e41f72 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -68,14 +68,14 @@ Common::Error VoyeurEngine::run() {
ESP_Init();
globalInitBolt();
+ // The original allows the victim to be explicitly specified via the command line.
+ // We don't currently support this in ScummVM, but I'm leaving the code below
+ // in case we ever want to make use of it.
+ if (_iForceDeath >= 1 && _iForceDeath <= 4)
+ _voy._eventFlags |= EVTFLAG_VICTIM_PRESET;
+
_eventsManager.resetMouse();
if (doHeadTitle()) {
- // The original allows the victim to be explicitly specified via the command line.
- // We don't currently support this in ScummVM, but I'm leaving the code below
- // in case we ever want to make use of it.
- if (_iForceDeath >= 1 && _iForceDeath <= 4)
- _voy._eventFlags |= EVTFLAG_VICTIM_PRESET;
-
playStamp();
if (!shouldQuit())
doTailTitle();
@@ -177,24 +177,15 @@ bool VoyeurEngine::doHeadTitle() {
if (_voy._eventFlags & EVTFLAG_VICTIM_PRESET) {
// Preset victim turned on, so add a default set of incriminating videos
- if (_voy._eventCount <= 1)
- _voy.addEvent(18, 1, EVTYPE_VIDEO, 33, 0, 998, -1);
- if (_voy._eventCount <= 2)
- _voy.addEvent(18, 2, EVTYPE_VIDEO, 41, 0, 998, -1);
- if (_voy._eventCount <= 3)
- _voy.addEvent(18, 3, EVTYPE_VIDEO, 47, 0, 998, -1);
- if (_voy._eventCount <= 4)
- _voy.addEvent(18, 4, EVTYPE_VIDEO, 53, 0, 998, -1);
- if (_voy._eventCount <= 5)
- _voy.addEvent(18, 5, EVTYPE_VIDEO, 46, 0, 998, -1);
- if (_voy._eventCount <= 6)
- _voy.addEvent(18, 6, EVTYPE_VIDEO, 50, 0, 998, -1);
- if (_voy._eventCount <= 7)
- _voy.addEvent(18, 7, EVTYPE_VIDEO, 40, 0, 998, -1);
- if (_voy._eventCount <= 8)
- _voy.addEvent(18, 8, EVTYPE_VIDEO, 43, 0, 998, -1);
- if (_voy._eventCount <= 9)
- _voy.addEvent(19, 1, EVTYPE_AUDIO, 20, 0, 998, -1);
+ _voy.addEvent(18, 1, EVTYPE_VIDEO, 33, 0, 998, -1);
+ _voy.addEvent(18, 2, EVTYPE_VIDEO, 41, 0, 998, -1);
+ _voy.addEvent(18, 3, EVTYPE_VIDEO, 47, 0, 998, -1);
+ _voy.addEvent(18, 4, EVTYPE_VIDEO, 53, 0, 998, -1);
+ _voy.addEvent(18, 5, EVTYPE_VIDEO, 46, 0, 998, -1);
+ _voy.addEvent(18, 6, EVTYPE_VIDEO, 50, 0, 998, -1);
+ _voy.addEvent(18, 7, EVTYPE_VIDEO, 40, 0, 998, -1);
+ _voy.addEvent(18, 8, EVTYPE_VIDEO, 43, 0, 998, -1);
+ _voy.addEvent(19, 1, EVTYPE_AUDIO, 20, 0, 998, -1);
}
}