aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur
diff options
context:
space:
mode:
authorPaul Gilbert2014-01-29 21:08:52 -0500
committerPaul Gilbert2014-01-29 21:08:52 -0500
commitdacdca192df99e4a29c32bf275f529be3959a11b (patch)
tree175160b37b85c7dab0e704dddd916e79816a03b1 /engines/voyeur
parent336a02047b1b52f7a052712bcce2b3608958f8b6 (diff)
downloadscummvm-rg350-dacdca192df99e4a29c32bf275f529be3959a11b.tar.gz
scummvm-rg350-dacdca192df99e4a29c32bf275f529be3959a11b.tar.bz2
scummvm-rg350-dacdca192df99e4a29c32bf275f529be3959a11b.zip
VOYEUR: Fixes for evidence viewing and review tape playback
Diffstat (limited to 'engines/voyeur')
-rw-r--r--engines/voyeur/data.cpp11
-rw-r--r--engines/voyeur/data.h2
-rw-r--r--engines/voyeur/voyeur_game.cpp29
3 files changed, 19 insertions, 23 deletions
diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp
index 9104d5f560..be22a58f28 100644
--- a/engines/voyeur/data.cpp
+++ b/engines/voyeur/data.cpp
@@ -170,15 +170,14 @@ void SVoy::addEvidEventStart(int v) {
e._minute = _vm->_gameMinute;
e._isAM = _isAM;
e._type = EVTYPE_EVID;
- e._videoId = _vm->_videoId;
- e._computerOn = _vocSecondsOffset;
- e._dead = _vm->_eventsManager._videoDead;
-
+ e._videoId = _vm->_playStampGroupId;
+ e._computerOn = _field47A;
+ e._computerOff = v;
}
-void SVoy::addEvidEventEnd(int dead) {
+void SVoy::addEvidEventEnd(int totalPages) {
VoyeurEvent &e = _events[_eventCount];
- e._dead = dead;
+ e._dead = totalPages;
if (_eventCount < (TOTAL_EVENTS - 1))
++_eventCount;
}
diff --git a/engines/voyeur/data.h b/engines/voyeur/data.h
index e33c3c7b2b..15df79d9af 100644
--- a/engines/voyeur/data.h
+++ b/engines/voyeur/data.h
@@ -131,7 +131,7 @@ public:
void addAudioEventStart();
void addAudioEventEnd();
void addEvidEventStart(int v);
- void addEvidEventEnd(int dead);
+ void addEvidEventEnd(int totalPages);
void addComputerEventStart();
void addComputerEventEnd(int v);
void reviewAnEvidEvent(int eventIndex);
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index ed04c875b9..ded40ce121 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -413,15 +413,14 @@ void VoyeurEngine::doPiracy() {
}
void VoyeurEngine::reviewTape() {
-// int var22 = 0;
int eventStart = 0;
int newX = -1;
int newY = -1;
int eventLine = 7;
Common::Rect tempRect(58, 30, 58 + 223, 30 + 124);
Common::Point pt;
- int evtIndex = 0;
int foundIndex;
+ int eventNum;
_bVoy->getBoltGroup(0x900);
PictureResource *cursor = _bVoy->boltEntry(0x903)._picResource;
@@ -485,8 +484,8 @@ void VoyeurEngine::reviewTape() {
_graphicsManager._backgroundPage->sFillBox(tempRect.width(), tempRect.height());
int yp = 45;
- evtIndex = eventStart;
- for (int lineNum = 0; lineNum < 8 && evtIndex < _voy._eventCount; ++lineNum) {
+ int eventNum = eventStart;
+ for (int lineNum = 0; lineNum < 8 && eventNum < _voy._eventCount; ++lineNum, ++eventNum) {
_graphicsManager._fontPtr->_picFlags = 0;
_graphicsManager._fontPtr->_picSelect = 0xff;
_graphicsManager._fontPtr->_picPick = 7;
@@ -496,11 +495,10 @@ void VoyeurEngine::reviewTape() {
_graphicsManager._fontPtr->_justifyWidth = 0;
_graphicsManager._fontPtr->_justifyHeight = 0;
- Common::String msg = _eventsManager.getEvidString(evtIndex);
+ Common::String msg = _eventsManager.getEvidString(eventNum);
_graphicsManager._backgroundPage->drawText(msg);
yp += 15;
- ++evtIndex;
}
(*_graphicsManager._vPort)->addSaveRect(
@@ -517,6 +515,7 @@ void VoyeurEngine::reviewTape() {
_eventsManager.getMouseInfo();
foundIndex = -1;
+
Common::Point tempPos = _eventsManager.getMousePos() + Common::Point(14, 7);
for (uint idx = 0; idx < hotspots.size(); ++idx) {
if (hotspots[idx].contains(tempPos)) {
@@ -546,10 +545,9 @@ void VoyeurEngine::reviewTape() {
_graphicsManager._drawPtr->_pos = Common::Point(tempRect.left, tempRect.top);
_graphicsManager._backgroundPage->sFillBox(tempRect.width(), tempRect.height());
- evtIndex = eventStart;
int yp = 45;
-
- for (int idx = 0; idx < 8 && evtIndex < _voy._eventCount; ++idx) {
+ eventNum = eventStart;
+ for (int idx = 0; idx < 8 && eventNum < _voy._eventCount; ++idx, ++eventNum) {
_graphicsManager._fontPtr->_picFlags = 0;
_graphicsManager._fontPtr->_picSelect = 0xff;
_graphicsManager._fontPtr->_picPick = 7;
@@ -559,11 +557,10 @@ void VoyeurEngine::reviewTape() {
_graphicsManager._fontPtr->_justifyWidth = 0;
_graphicsManager._fontPtr->_justifyHeight = 0;
- Common::String msg = _eventsManager.getEvidString(evtIndex);
+ Common::String msg = _eventsManager.getEvidString(eventNum);
_graphicsManager._backgroundPage->drawText(msg);
yp += 15;
- ++evtIndex;
}
(*_graphicsManager._vPort)->addSaveRect(
@@ -667,7 +664,7 @@ void VoyeurEngine::reviewTape() {
VoyeurEvent &e = _voy._events[eventIndex];
switch (e._type) {
case EVTYPE_VIDEO:
- playAVideoEvent(eventIndex);
+ playAVideoEvent(eventLine);
break;
case EVTYPE_AUDIO: {
@@ -705,7 +702,7 @@ void VoyeurEngine::reviewTape() {
case EVTYPE_EVID:
_bVoy->freeBoltGroup(0x900);
- _voy.reviewAnEvidEvent(evtIndex);
+ _voy.reviewAnEvidEvent(eventLine);
_voy._vocSecondsOffset = _voy._RTVNum - _voy._field4AC;
_soundManager.stopVOCPlay();
@@ -714,7 +711,7 @@ void VoyeurEngine::reviewTape() {
case EVTYPE_COMPUTER:
_bVoy->freeBoltGroup(0x900);
- _voy.reviewComputerEvent(evtIndex);
+ _voy.reviewComputerEvent(eventLine);
_voy._vocSecondsOffset = _voy._RTVNum - _voy._field4AC;
_soundManager.stopVOCPlay();
@@ -1364,7 +1361,7 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) {
_eventsManager.stopEvidDim();
if (eventId == 999)
- _voy.addEvidEventStart(eventId);
+ _voy.addEvidEventStart(evidId);
_eventsManager.getMouseInfo();
@@ -1403,7 +1400,7 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) {
--count;
}
- if (eventId != 999)
+ if (eventId == 999)
_voy.addEvidEventEnd(evidIdx);
count = (int16)READ_LE_UINT16(dataP + evidId * 12 + 4);