aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur
diff options
context:
space:
mode:
authorPaul Gilbert2014-01-30 22:10:59 -0500
committerPaul Gilbert2014-01-30 22:10:59 -0500
commit77e86b3d4805603166330c47f47789d7e4d09398 (patch)
tree2b51be5acea5c7a098c59383b4661c4a7123018b /engines/voyeur
parentdbc8e6bb31fbb01c88403cfe712a7ecadbcd83b5 (diff)
downloadscummvm-rg350-77e86b3d4805603166330c47f47789d7e4d09398.tar.gz
scummvm-rg350-77e86b3d4805603166330c47f47789d7e4d09398.tar.bz2
scummvm-rg350-77e86b3d4805603166330c47f47789d7e4d09398.zip
VOYEUR: Renaming of _videoId to _audioVideoId and extra comments
Diffstat (limited to 'engines/voyeur')
-rw-r--r--engines/voyeur/data.cpp18
-rw-r--r--engines/voyeur/data.h6
-rw-r--r--engines/voyeur/files_threads.cpp30
-rw-r--r--engines/voyeur/voyeur.cpp6
-rw-r--r--engines/voyeur/voyeur.h6
-rw-r--r--engines/voyeur/voyeur_game.cpp36
6 files changed, 53 insertions, 49 deletions
diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp
index 64b15f72c6..5d311a8385 100644
--- a/engines/voyeur/data.cpp
+++ b/engines/voyeur/data.cpp
@@ -30,7 +30,7 @@ void VoyeurEvent::synchronize(Common::Serializer &s) {
s.syncAsByte(_minute);
s.syncAsByte(_isAM);
s.syncAsByte(_type);
- s.syncAsSint16LE(_videoId);
+ s.syncAsSint16LE(_audioVideoId);
s.syncAsSint16LE(_computerOn);
s.syncAsSint16LE(_computerOff);
s.syncAsSint16LE(_dead);
@@ -47,14 +47,14 @@ void SVoy::setVm(VoyeurEngine *vm) {
_vm = vm;
}
-void SVoy::addEvent(int hour, int minute, VoyeurEventType type, int videoId,
+void SVoy::addEvent(int hour, int minute, VoyeurEventType type, int audioVideoId,
int on, int off, int dead) {
VoyeurEvent &e = _events[_eventCount++];
e._hour = hour;
e._minute = minute;
e._isAM = hour < 12;
- e._videoId = videoId;
+ e._audioVideoId = audioVideoId;
e._computerOn = on;
e._computerOff = off;
e._dead = dead;
@@ -134,7 +134,7 @@ void SVoy::addVideoEventStart() {
e._minute = _vm->_gameMinute;
e._isAM = _isAM;
e._type = EVTYPE_VIDEO;
- e._videoId = _vm->_videoId;
+ e._audioVideoId = _vm->_audioVideoId;
e._computerOn = _vocSecondsOffset;
e._dead = _vm->_eventsManager._videoDead;
}
@@ -152,7 +152,7 @@ void SVoy::addAudioEventStart() {
e._minute = _vm->_gameMinute;
e._isAM = _isAM;
e._type = EVTYPE_AUDIO;
- e._videoId = _vm->_videoId;
+ e._audioVideoId = _vm->_audioVideoId;
e._computerOn = _vocSecondsOffset;
e._dead = _vm->_eventsManager._videoDead;
}
@@ -170,7 +170,7 @@ void SVoy::addEvidEventStart(int v) {
e._minute = _vm->_gameMinute;
e._isAM = _isAM;
e._type = EVTYPE_EVID;
- e._videoId = _vm->_playStampGroupId;
+ e._audioVideoId = _vm->_playStampGroupId;
e._computerOn = _field47A;
e._computerOff = v;
}
@@ -188,7 +188,7 @@ void SVoy::addComputerEventStart() {
e._minute = _vm->_gameMinute;
e._isAM = _isAM;
e._type = EVTYPE_COMPUTER;
- e._videoId = _vm->_playStampGroupId;
+ e._audioVideoId = _vm->_playStampGroupId;
e._computerOn = _computerTextId;
}
@@ -201,7 +201,7 @@ void SVoy::addComputerEventEnd(int v) {
void SVoy::reviewAnEvidEvent(int eventIndex) {
VoyeurEvent &e = _events[eventIndex];
- _vm->_playStampGroupId = e._videoId;
+ _vm->_playStampGroupId = e._audioVideoId;
_field47A = e._computerOn;
int frameOff = e._computerOff;
@@ -224,7 +224,7 @@ void SVoy::reviewAnEvidEvent(int eventIndex) {
void SVoy::reviewComputerEvent(int eventIndex) {
VoyeurEvent &e = _events[eventIndex];
- _vm->_playStampGroupId = e._videoId;
+ _vm->_playStampGroupId = e._audioVideoId;
_computerTextId = e._computerOn;
if (_vm->_bVoy->getBoltGroup(_vm->_playStampGroupId)) {
diff --git a/engines/voyeur/data.h b/engines/voyeur/data.h
index 15df79d9af..37b2671ea7 100644
--- a/engines/voyeur/data.h
+++ b/engines/voyeur/data.h
@@ -39,7 +39,7 @@ struct VoyeurEvent {
int _minute;
bool _isAM;
VoyeurEventType _type;
- int _videoId;
+ int _audioVideoId;
int _computerOn;
int _computerOff;
int _dead;
@@ -123,8 +123,8 @@ public:
/**
* Add an event to the list of game events that have occurred
*/
- void addEvent(int hour, int minute, VoyeurEventType type, int videoId, int on,
- int off, int dead);
+ void addEvent(int hour, int minute, VoyeurEventType type, int audioVideoId,
+ int on, int off, int dead);
void addVideoEventStart();
void addVideoEventEnd();
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 0179894254..3746a89a62 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -373,23 +373,23 @@ void ThreadResource::parsePlayCommands() {
v2 = READ_LE_UINT16(dataP);
if (v2 == 0 || READ_LE_UINT16(_vm->_controlPtr->_ptr + 4) == 0) {
- _vm->_videoId = READ_LE_UINT16(dataP + 2) - 1;
+ _vm->_audioVideoId = READ_LE_UINT16(dataP + 2) - 1;
_vm->_voy._field468 = READ_LE_UINT16(dataP + 4);
_vm->_voy._field46A = READ_LE_UINT16(dataP + 6);
if (_vm->_voy._RTVNum < _vm->_voy._field468 ||
(_vm->_voy._field468 + _vm->_voy._field46A) < _vm->_voy._RTVNum) {
- _vm->_videoId = -1;
+ _vm->_audioVideoId = -1;
} else {
_vm->_voy._vocSecondsOffset = _vm->_voy._RTVNum - _vm->_voy._field468;
_vm->_voy.addAudioEventStart();
- assert(_vm->_videoId < 38);
+ assert(_vm->_audioVideoId < 38);
_vm->_bVoy->getBoltGroup(0x7F00);
_vm->_graphicsManager._backgroundPage = _vm->_bVoy->boltEntry(
- 0x7F00 + BLIND_TABLE[_vm->_videoId])._picResource;
+ 0x7F00 + BLIND_TABLE[_vm->_audioVideoId])._picResource;
_vm->_graphicsManager._backColors = _vm->_bVoy->boltEntry(0x7F01 +
- BLIND_TABLE[_vm->_videoId])._cMapResource;
+ BLIND_TABLE[_vm->_audioVideoId])._cMapResource;
(*_vm->_graphicsManager._vPort)->setupViewPort();
_vm->_graphicsManager._backColors->startFade();
@@ -398,7 +398,7 @@ void ThreadResource::parsePlayCommands() {
_vm->_voy._field478 &= ~1;
_vm->_soundManager.setVOCOffset(_vm->_voy._vocSecondsOffset);
Common::String filename = _vm->_soundManager.getVOCFileName(
- _vm->_videoId + 159);
+ _vm->_audioVideoId + 159);
_vm->_soundManager.startVOCPlay(filename);
_vm->_voy._field478 |= 16;
_vm->_eventsManager.startCursorBlink();
@@ -415,7 +415,7 @@ void ThreadResource::parsePlayCommands() {
_vm->_bVoy->freeBoltGroup(0x7F00);
_vm->_voy._field478 &= ~0x10;
- _vm->_videoId = -1;
+ _vm->_audioVideoId = -1;
_vm->_voy._field470 = 129;
parseIndex = 999;
}
@@ -428,26 +428,26 @@ void ThreadResource::parsePlayCommands() {
v2 = READ_LE_UINT16(dataP);
if (v2 == 0 || READ_LE_UINT16(_vm->_controlPtr->_ptr + 4) == 0) {
- _vm->_videoId = READ_LE_UINT16(dataP + 2) - 1;
+ _vm->_audioVideoId = READ_LE_UINT16(dataP + 2) - 1;
_vm->_voy._field468 = READ_LE_UINT16(dataP + 4);
_vm->_voy._field46A = READ_LE_UINT16(dataP + 6);
if (_vm->_voy._RTVNum < _vm->_voy._field468 ||
(_vm->_voy._field468 + _vm->_voy._field46A) < _vm->_voy._RTVNum) {
- _vm->_videoId = -1;
+ _vm->_audioVideoId = -1;
} else {
_vm->_voy._vocSecondsOffset = _vm->_voy._RTVNum - _vm->_voy._field468;
_vm->_voy.addVideoEventStart();
_vm->_voy._field478 &= ~1;
_vm->_voy._field478 |= 0x10;
- _vm->playAVideo(_vm->_videoId);
+ _vm->playAVideo(_vm->_audioVideoId);
_vm->_voy._field478 &= ~0x10;
_vm->_voy._field478 |= 1;
_vm->_voy.addVideoEventEnd();
_vm->_eventsManager.incrementTime(1);
- _vm->_videoId = -1;
+ _vm->_audioVideoId = -1;
_vm->_playStampGroupId = -1;
if (_vm->_eventsManager._videoDead != -1) {
@@ -471,7 +471,7 @@ void ThreadResource::parsePlayCommands() {
case 4:
case 22:
- _vm->_videoId = READ_LE_UINT16(dataP) - 1;
+ _vm->_audioVideoId = READ_LE_UINT16(dataP) - 1;
dataP += 2;
if (id == 22) {
@@ -483,11 +483,11 @@ void ThreadResource::parsePlayCommands() {
_vm->_voy._vocSecondsOffset = 0;
_vm->_voy._field468 = _vm->_voy._RTVNum;
_vm->_voy._field478 &= ~0x11;
- _vm->playAVideo(_vm->_videoId);
+ _vm->playAVideo(_vm->_audioVideoId);
_vm->_voy._field478 |= 1;
if (id != 22) {
- _vm->_videoId = -1;
+ _vm->_audioVideoId = -1;
parseIndex = 999;
} else {
// TODO: Double-check this
@@ -529,7 +529,7 @@ void ThreadResource::parsePlayCommands() {
_vm->_bVoy->freeBoltGroup(_vm->_playStampGroupId);
_vm->_playStampGroupId = -1;
- _vm->_videoId = -1;
+ _vm->_audioVideoId = -1;
parseIndex = 999;
}
break;
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 12d627ddb4..cfd05765b3 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -46,7 +46,7 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc)
_bob = false;
_stampFlags = 0;
_playStampGroupId = _currentVocId = 0;
- _videoId = -1;
+ _audioVideoId = -1;
_checkTransitionId = -1;
_gameHour = 0;
_gameMinute = 0;
@@ -469,7 +469,7 @@ void VoyeurEngine::doOpening() {
_voy._field478 = 16;
_gameHour = 4;
_gameMinute = 0;
- _videoId = 1;
+ _audioVideoId = 1;
_eventsManager._videoDead = -1;
_voy.addVideoEventStart();
@@ -745,7 +745,7 @@ void VoyeurEngine::synchronize(Common::Serializer &s) {
s.syncAsSint16LE(_stampFlags);
s.syncAsSint16LE(_playStampGroupId);
s.syncAsSint16LE(_currentVocId);
- s.syncAsSint16LE(_videoId);
+ s.syncAsSint16LE(_audioVideoId);
s.syncAsSint16LE(_iForceDeath);
s.syncAsSint16LE(_gameHour);
diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h
index bdbf3c138e..5d729fd757 100644
--- a/engines/voyeur/voyeur.h
+++ b/engines/voyeur/voyeur.h
@@ -173,7 +173,11 @@ public:
int _stampFlags;
int _playStampGroupId;
int _currentVocId;
- int _videoId;
+
+ /**
+ * Id for the current video, audio, or evidence scene being viewed
+ */
+ int _audioVideoId;
const int *_resolvePtr;
int _iForceDeath; // CHECKME: The original initializes it in ESP_init()
int _checkTransitionId;
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index c645643163..6844fadfd3 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -49,7 +49,7 @@ void VoyeurEngine::playStamp() {
_voyeurArea = AREA_NONE;
_eventsManager.getMouseInfo();
_playStampGroupId = _currentVocId = -1;
- _videoId = -1;
+ _audioVideoId = -1;
_mainThread->parsePlayCommands();
@@ -178,7 +178,7 @@ void VoyeurEngine::playStamp() {
_currentVocId = -1;
}
- _videoId = -1;
+ _audioVideoId = -1;
if (_voy._field47A != -1) {
_bVoy->freeBoltGroup(_voy._field47A);
@@ -668,14 +668,14 @@ void VoyeurEngine::reviewTape() {
break;
case EVTYPE_AUDIO: {
- _videoId = e._videoId;
+ _audioVideoId = e._audioVideoId;
_voy._vocSecondsOffset = e._computerOn;
_bVoy->getBoltGroup(0x7F00);
_graphicsManager._backgroundPage = _bVoy->boltEntry(0x7F00 +
- BLIND_TABLE[_videoId])._picResource;
+ BLIND_TABLE[_audioVideoId])._picResource;
_graphicsManager._backColors = _bVoy->boltEntry(0x7F01 +
- BLIND_TABLE[_videoId])._cMapResource;
+ BLIND_TABLE[_audioVideoId])._cMapResource;
(*_graphicsManager._vPort)->setupViewPort(_graphicsManager._backgroundPage);
_graphicsManager._backColors->startFade();
@@ -687,7 +687,7 @@ void VoyeurEngine::reviewTape() {
// Play suond for the given duration
_soundManager.setVOCOffset(_voy._vocSecondsOffset);
- _soundManager.startVOCPlay(_videoId + 159);
+ _soundManager.startVOCPlay(_audioVideoId + 159);
uint32 secondsDuration = e._computerOff;
_eventsManager.getMouseInfo();
@@ -812,28 +812,28 @@ bool VoyeurEngine::checkForMurder() {
if (evt._type == EVTYPE_VIDEO) {
switch (READ_LE_UINT32(_controlPtr->_ptr + 4)) {
case 1:
- if (evt._videoId == 41 && evt._computerOn <= 15 &&
+ if (evt._audioVideoId == 41 && evt._computerOn <= 15 &&
(evt._computerOff + evt._computerOn) >= 16) {
WRITE_LE_UINT32(_controlPtr->_ptr + 12, 1);
}
break;
case 2:
- if (evt._videoId == 53 && evt._computerOn <= 19 &&
+ if (evt._audioVideoId == 53 && evt._computerOn <= 19 &&
(evt._computerOff + evt._computerOn) >= 21) {
WRITE_LE_UINT32(_controlPtr->_ptr + 12, 2);
}
break;
case 3:
- if (evt._videoId == 50 && evt._computerOn <= 28 &&
+ if (evt._audioVideoId == 50 && evt._computerOn <= 28 &&
(evt._computerOff + evt._computerOn) >= 29) {
WRITE_LE_UINT32(_controlPtr->_ptr + 12, 3);
}
break;
case 4:
- if (evt._videoId == 43 && evt._computerOn <= 10 &&
+ if (evt._audioVideoId == 43 && evt._computerOn <= 10 &&
(evt._computerOff + evt._computerOn) >= 14) {
WRITE_LE_UINT32(_controlPtr->_ptr + 12, 4);
}
@@ -862,27 +862,27 @@ bool VoyeurEngine::checkForIncriminate() {
VoyeurEvent &evt = _voy._events[idx];
if (evt._type == EVTYPE_VIDEO) {
- if (evt._videoId == 44 && evt._computerOn <= 40 &&
+ if (evt._audioVideoId == 44 && evt._computerOn <= 40 &&
(evt._computerOff + evt._computerOn) >= 70) {
_voy._field4382 = 1;
}
- if (evt._videoId == 44 && evt._computerOn <= 79 &&
+ if (evt._audioVideoId == 44 && evt._computerOn <= 79 &&
(evt._computerOff + evt._computerOn) >= 129) {
_voy._field4382 = 1;
}
- if (evt._videoId == 20 && evt._computerOn <= 28 &&
+ if (evt._audioVideoId == 20 && evt._computerOn <= 28 &&
(evt._computerOff + evt._computerOn) >= 45) {
_voy._field4382 = 2;
}
- if (evt._videoId == 35 && evt._computerOn <= 17 &&
+ if (evt._audioVideoId == 35 && evt._computerOn <= 17 &&
(evt._computerOff + evt._computerOn) >= 36) {
_voy._field4382 = 3;
}
- if (evt._videoId == 30 && evt._computerOn <= 80 &&
+ if (evt._audioVideoId == 30 && evt._computerOn <= 80 &&
(evt._computerOff + evt._computerOn) >= 139) {
_voy._field4382 = 4;
}
@@ -901,12 +901,12 @@ bool VoyeurEngine::checkForIncriminate() {
void VoyeurEngine::playAVideoEvent(int eventIndex) {
VoyeurEvent &evt = _voy._events[eventIndex];
- _videoId = evt._videoId;
+ _audioVideoId = evt._audioVideoId;
_voy._vocSecondsOffset = evt._computerOn;
_eventsManager._videoDead = evt._dead;
_voy._field478 &= ~1;
- playAVideoDuration(_videoId, evt._computerOff);
+ playAVideoDuration(_audioVideoId, evt._computerOff);
_voy._field478 |= 1;
if (_eventsManager._videoDead != -1) {
@@ -916,7 +916,7 @@ void VoyeurEngine::playAVideoEvent(int eventIndex) {
_eventsManager._videoDead = -1;
}
- _videoId = -1;
+ _audioVideoId = -1;
if (_eventsManager._videoDead != -1) {
_bVoy->freeBoltGroup(0xE00);
_eventsManager._videoDead = -1;