aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-01-03 11:00:12 -1000
committerPaul Gilbert2014-01-03 11:00:12 -1000
commitbbecd20818f96b0128dfb0a5fb539fe3bcc4d2d5 (patch)
treed63dba655c1570e627b56ee8663e9a044cd86958
parent2db6d543a0e893d2a6827353810c73f72dd54201 (diff)
downloadscummvm-rg350-bbecd20818f96b0128dfb0a5fb539fe3bcc4d2d5.tar.gz
scummvm-rg350-bbecd20818f96b0128dfb0a5fb539fe3bcc4d2d5.tar.bz2
scummvm-rg350-bbecd20818f96b0128dfb0a5fb539fe3bcc4d2d5.zip
VOYEUR: Variable renaming for Video Id
-rw-r--r--engines/voyeur/events.cpp9
-rw-r--r--engines/voyeur/events.h3
-rw-r--r--engines/voyeur/files_threads.cpp30
-rw-r--r--engines/voyeur/voyeur.cpp3
-rw-r--r--engines/voyeur/voyeur.h1
-rw-r--r--engines/voyeur/voyeur_game.cpp26
6 files changed, 36 insertions, 36 deletions
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp
index e7f7916676..5053b38d85 100644
--- a/engines/voyeur/events.cpp
+++ b/engines/voyeur/events.cpp
@@ -84,7 +84,6 @@ EventsManager::EventsManager(): _intPtr(_gameData),
_newMouseClicked = _newMouseUnk = false;
_v2A0A2 = 0;
- _videoComputerBut4 = 0;
_videoDead = 0;
}
@@ -575,7 +574,7 @@ void EventsManager::addVideoEventStart() {
e._minute = _vm->_gameMinute;
e._isAM = _vm->_voy._isAM;
e._type = EVTYPE_VIDEO;
- e._field8 = _vm->_eventsManager._videoComputerBut4;
+ e._videoId = _vm->_videoId;
e._computerOn = _vm->_voy._vocSecondsOffset;
e._dead = _vm->_eventsManager._videoDead;
}
@@ -593,7 +592,7 @@ void EventsManager::addAudioEventStart() {
e._minute = _vm->_gameMinute;
e._isAM = _vm->_voy._isAM;
e._type = EVTYPE_AUDIO;
- e._field8 = _vm->_eventsManager._videoComputerBut4;
+ e._videoId = _vm->_videoId;
e._computerOn = _vm->_voy._field47A;
e._dead = _vm->_eventsManager._videoDead;
}
@@ -611,7 +610,7 @@ void EventsManager::addEvidEventStart(int v) {
e._minute = _vm->_gameMinute;
e._isAM = _vm->_voy._isAM;
e._type = EVTYPE_EVID;
- e._field8 = _vm->_eventsManager._videoComputerBut4;
+ e._videoId = _vm->_videoId;
e._computerOn = _vm->_voy._vocSecondsOffset;
e._dead = _vm->_eventsManager._videoDead;
@@ -630,7 +629,7 @@ void EventsManager::addComputerEventStart() {
e._minute = _vm->_gameMinute;
e._isAM = _vm->_voy._isAM;
e._type = EVTYPE_COMPUTER;
- e._field8 = _vm->_playStamp1;
+ e._videoId = _vm->_playStamp1;
e._computerOn = _vm->_voy._computerTextId;
}
diff --git a/engines/voyeur/events.h b/engines/voyeur/events.h
index 4734e541a6..1e884c684d 100644
--- a/engines/voyeur/events.h
+++ b/engines/voyeur/events.h
@@ -59,7 +59,7 @@ struct VoyeurEvent {
int _minute;
bool _isAM;
VoyeurEventType _type;
- int _field8;
+ int _videoId;
int _computerOn;
int _computerOff;
int _dead;
@@ -193,7 +193,6 @@ public:
bool _newMouseUnk;
int _v2A0A2;
- int _videoComputerBut4;
int _videoDead;
int _cycleTime[4];
byte *_cycleNext[4];
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 4a4ec61536..4adf4d7216 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -373,22 +373,22 @@ void ThreadResource::parsePlayCommands() {
v2 = READ_LE_UINT16(dataP);
if (v2 == 0 || READ_LE_UINT16(_vm->_controlPtr->_ptr + 4) == 0) {
- _vm->_eventsManager._videoComputerBut4 = READ_LE_UINT16(dataP + 2);
+ _vm->_videoId = READ_LE_UINT16(dataP + 2);
_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->_eventsManager._videoComputerBut4 = -1;
+ _vm->_videoId = -1;
} else {
_vm->_voy._vocSecondsOffset = _vm->_voy._RTVNum - _vm->_voy._field468;
_vm->_eventsManager.addAudioEventStart();
- assert(_vm->_eventsManager._videoComputerBut4 < 38);
+ assert(_vm->_videoId < 38);
_vm->_graphicsManager._backgroundPage = _vm->_bVoy->boltEntry(
- 0x7F00 + BLIND_TABLE[_vm->_eventsManager._videoComputerBut4])._picResource;
+ 0x7F00 + BLIND_TABLE[_vm->_videoId])._picResource;
_vm->_graphicsManager._backColors = _vm->_bVoy->boltEntry(0x7F01 +
- BLIND_TABLE[_vm->_eventsManager._videoComputerBut4])._cMapResource;
+ BLIND_TABLE[_vm->_videoId])._cMapResource;
(*_vm->_graphicsManager._vPort)->setupViewPort();
_vm->_graphicsManager._backColors->startFade();
@@ -397,7 +397,7 @@ void ThreadResource::parsePlayCommands() {
_vm->_voy._field478 = -2;
_vm->_soundManager.setVOCOffset(_vm->_voy._vocSecondsOffset * 11025);
Common::String filename = _vm->_soundManager.getVOCFileName(
- _vm->_eventsManager._videoComputerBut4 + 159);
+ _vm->_videoId + 159);
_vm->_soundManager.startVOCPlay(filename);
_vm->_voy._field478 |= 16;
_vm->_eventsManager.startCursorBlink();
@@ -414,7 +414,7 @@ void ThreadResource::parsePlayCommands() {
_vm->_bVoy->freeBoltGroup(0x7F00);
_vm->_voy._field478 = -17;
- _vm->_eventsManager._videoComputerBut4 = -1;
+ _vm->_videoId = -1;
_vm->_voy._field470 = 129;
parseIndex = 999;
}
@@ -427,26 +427,26 @@ void ThreadResource::parsePlayCommands() {
v2 = READ_LE_UINT16(dataP);
if (v2 == 0 || READ_LE_UINT16(_vm->_controlPtr->_ptr + 4) == 0) {
- _vm->_eventsManager._videoComputerBut4 = READ_LE_UINT16(dataP + 2);
+ _vm->_videoId = READ_LE_UINT16(dataP + 2);
_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->_eventsManager._videoComputerBut4 = -1;
+ _vm->_videoId = -1;
} else {
_vm->_voy._vocSecondsOffset = _vm->_voy._RTVNum - _vm->_voy._field468;
_vm->_eventsManager.addAudioEventStart();
_vm->_voy._field478 &= ~1;
_vm->_voy._field478 |= 0x10;
- _vm->playAVideo(_vm->_eventsManager._videoComputerBut4);
+ _vm->playAVideo(_vm->_videoId);
_vm->_voy._field478 &= ~0x10;
_vm->_voy._field478 |= 1;
_vm->_eventsManager.addVideoEventEnd();
_vm->_eventsManager.incrementTime(1);
- _vm->_eventsManager._videoComputerBut4 = -1;
+ _vm->_videoId = -1;
_vm->_playStamp1 = -1;
if (_vm->_eventsManager._videoDead != -1) {
@@ -470,7 +470,7 @@ void ThreadResource::parsePlayCommands() {
case 4:
case 22:
- _vm->_eventsManager._videoComputerBut4 = READ_LE_UINT16(dataP) - 1;
+ _vm->_videoId = READ_LE_UINT16(dataP) - 1;
dataP += 2;
if (id == 22) {
@@ -482,11 +482,11 @@ void ThreadResource::parsePlayCommands() {
_vm->_voy._vocSecondsOffset = 0;
_vm->_voy._field468 = _vm->_voy._RTVNum;
_vm->_voy._field478 &= ~0x11;
- _vm->playAVideo(_vm->_eventsManager._videoComputerBut4);
+ _vm->playAVideo(_vm->_videoId);
_vm->_voy._field478 |= 1;
if (id != 22) {
- _vm->_eventsManager._videoComputerBut4 = -1;
+ _vm->_videoId = -1;
parseIndex = 999;
} else {
// TODO: Double-check this
@@ -528,7 +528,7 @@ void ThreadResource::parsePlayCommands() {
_vm->_bVoy->freeBoltGroup(_vm->_playStamp1);
_vm->_playStamp1 = -1;
- _vm->_eventsManager._videoComputerBut4 = -1;
+ _vm->_videoId = -1;
parseIndex = 999;
}
break;
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index cf4a1352f2..24738fa639 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -44,6 +44,7 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc)
_controlPtr = NULL;
_bob = false;
_playStamp1 = _playStamp2 = 0;
+ _videoId = -1;
_checkTransitionId = -1;
_gameHour = 0;
_gameMinute = 0;
@@ -478,7 +479,7 @@ void VoyeurEngine::doOpening() {
_voy._field478 = 16;
_eventsManager._gameHour = 4;
_eventsManager._gameMinute = 0;
- _eventsManager._videoComputerBut4 = 1;
+ _videoId = 1;
_eventsManager._videoDead = -1;
addVideoEventStart();
diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h
index 302f2b45d2..f146ee2599 100644
--- a/engines/voyeur/voyeur.h
+++ b/engines/voyeur/voyeur.h
@@ -159,6 +159,7 @@ public:
bool _bob;
int _playStamp1;
int _playStamp2;
+ int _videoId;
const int *_resolvePtr;
int _iForceDeath;
int _checkTransitionId;
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index 0a4537f8c8..5f6b7b3949 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -49,7 +49,7 @@ void VoyeurEngine::playStamp() {
while (!breakFlag && !shouldQuit()) {
_eventsManager.getMouseInfo();
_playStamp1 = _playStamp2 = -1;
- _eventsManager._videoComputerBut4 = -1;
+ _videoId = -1;
threadP->parsePlayCommands();
@@ -179,7 +179,7 @@ void VoyeurEngine::playStamp() {
_playStamp2 = -1;
}
- _eventsManager._videoComputerBut4 = -1;
+ _videoId = -1;
if (_voy._field47A != -1) {
_bVoy->freeBoltGroup(_voy._field47A);
@@ -787,28 +787,28 @@ bool VoyeurEngine::checkForMurder() {
if (evt._type == EVTYPE_VIDEO) {
switch (READ_LE_UINT32(_controlPtr->_ptr + 4)) {
case 1:
- if (evt._field8 == 41 && evt._computerOn <= 15 &&
+ if (evt._videoId == 41 && evt._computerOn <= 15 &&
(evt._computerOff + evt._computerOn) >= 16) {
WRITE_LE_UINT32(_controlPtr->_ptr + 12, 1);
}
break;
case 2:
- if (evt._field8 == 53 && evt._computerOn <= 19 &&
+ if (evt._videoId == 53 && evt._computerOn <= 19 &&
(evt._computerOff + evt._computerOn) >= 21) {
WRITE_LE_UINT32(_controlPtr->_ptr + 12, 2);
}
break;
case 3:
- if (evt._field8 == 50 && evt._computerOn <= 28 &&
+ if (evt._videoId == 50 && evt._computerOn <= 28 &&
(evt._computerOff + evt._computerOn) >= 29) {
WRITE_LE_UINT32(_controlPtr->_ptr + 12, 3);
}
break;
case 4:
- if (evt._field8 == 43 && evt._computerOn <= 10 &&
+ if (evt._videoId == 43 && evt._computerOn <= 10 &&
(evt._computerOff + evt._computerOn) >= 14) {
WRITE_LE_UINT32(_controlPtr->_ptr + 12, 4);
}
@@ -837,27 +837,27 @@ bool VoyeurEngine::checkForIncriminate() {
VoyeurEvent &evt = _voy._events[idx];
if (evt._type == EVTYPE_VIDEO) {
- if (evt._field8 == 44 && evt._computerOn <= 40 &&
+ if (evt._videoId == 44 && evt._computerOn <= 40 &&
(evt._computerOff + evt._computerOn) >= 70) {
_voy._field4382 = 1;
}
- if (evt._field8 == 44 && evt._computerOn <= 79 &&
+ if (evt._videoId == 44 && evt._computerOn <= 79 &&
(evt._computerOff + evt._computerOn) >= 129) {
_voy._field4382 = 1;
}
- if (evt._field8 == 20 && evt._computerOn <= 28 &&
+ if (evt._videoId == 20 && evt._computerOn <= 28 &&
(evt._computerOff + evt._computerOn) >= 45) {
_voy._field4382 = 2;
}
- if (evt._field8 == 35 && evt._computerOn <= 17 &&
+ if (evt._videoId == 35 && evt._computerOn <= 17 &&
(evt._computerOff + evt._computerOn) >= 36) {
_voy._field4382 = 3;
}
- if (evt._field8 == 30 && evt._computerOn <= 80 &&
+ if (evt._videoId == 30 && evt._computerOn <= 80 &&
(evt._computerOff + evt._computerOn) >= 139) {
_voy._field4382 = 4;
}
@@ -876,12 +876,12 @@ bool VoyeurEngine::checkForIncriminate() {
void VoyeurEngine::playAVideoEvent(int eventIndex) {
VoyeurEvent &evt = _voy._events[eventIndex];
- _eventsManager._videoComputerBut4 = evt._field8;
+ _videoId = evt._videoId;
_voy._vocSecondsOffset = evt._computerOn;
_eventsManager._videoDead = evt._dead;
_voy._field478 &= ~1;
- playAVideoDuration(_eventsManager._videoComputerBut4, evt._computerOff);
+ playAVideoDuration(_videoId, evt._computerOff);
}
int VoyeurEngine::getChooseButton() {