aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur/voyeur_game.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2013-12-25 19:38:32 +1100
committerPaul Gilbert2013-12-25 19:38:32 +1100
commit6e1a7abeefea61b41ff7821030758941ec642665 (patch)
treef4e926efe9e8e2c3b92a7a187093e3362ff4980e /engines/voyeur/voyeur_game.cpp
parent0c82fc1bafce8dc6e6a0852c4bd65e92005eaf39 (diff)
downloadscummvm-rg350-6e1a7abeefea61b41ff7821030758941ec642665.tar.gz
scummvm-rg350-6e1a7abeefea61b41ff7821030758941ec642665.tar.bz2
scummvm-rg350-6e1a7abeefea61b41ff7821030758941ec642665.zip
VOYEUR: Implemented checkForIncriminate
Diffstat (limited to 'engines/voyeur/voyeur_game.cpp')
-rw-r--r--engines/voyeur/voyeur_game.cpp43
1 files changed, 41 insertions, 2 deletions
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index 617b48c8d5..cce07eb497 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -648,8 +648,47 @@ bool VoyeurEngine::checkForMurder() {
return false;
}
-void VoyeurEngine::checkForIncriminate() {
- warning("TODO");
+bool VoyeurEngine::checkForIncriminate() {
+ _voy._field4382 = 0;
+
+ for (int idx = 0; idx < _voy._eventCount; ++idx) {
+ VoyeurEvent &evt = _voy._events[idx];
+
+ if (evt._type == EVTYPE_VIDEO) {
+ if (evt._field8 == 44 && evt._computerOn <= 40 &&
+ (evt._computerOff + evt._computerOn) >= 70) {
+ _voy._field4382 = 1;
+ }
+
+ if (evt._field8 == 44 && evt._computerOn <= 79 &&
+ (evt._computerOff + evt._computerOn) >= 129) {
+ _voy._field4382 = 1;
+ }
+
+ if (evt._field8 == 20 && evt._computerOn <= 28 &&
+ (evt._computerOff + evt._computerOn) >= 45) {
+ _voy._field4382 = 2;
+ }
+
+ if (evt._field8 == 35 && evt._computerOn <= 17 &&
+ (evt._computerOff + evt._computerOn) >= 36) {
+ _voy._field4382 = 3;
+ }
+
+ if (evt._field8 == 30 && evt._computerOn <= 80 &&
+ (evt._computerOff + evt._computerOn) >= 139) {
+ _voy._field4382 = 4;
+ }
+ }
+
+ if (_voy._field4382) {
+ WRITE_LE_UINT32(_controlPtr->_ptr + 12, 88);
+ _voy._videoEventId = idx;
+ return true;
+ }
+ }
+
+ _voy._videoEventId = -1;
}
void VoyeurEngine::playAVideoEvent(int eventId) {