aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-02-01 15:09:52 -0500
committerPaul Gilbert2014-02-01 15:09:52 -0500
commit971fd6304fca2b31c8f92f8a3bf2606b1f0a4e0f (patch)
tree5f5d52c747a2261b009c70992eb8ada951629c47
parent517df376a2d96b68e3a7b9f5c078be48cb12a211 (diff)
downloadscummvm-rg350-971fd6304fca2b31c8f92f8a3bf2606b1f0a4e0f.tar.gz
scummvm-rg350-971fd6304fca2b31c8f92f8a3bf2606b1f0a4e0f.tar.bz2
scummvm-rg350-971fd6304fca2b31c8f92f8a3bf2606b1f0a4e0f.zip
VOYEUR: Renamed SVoy._arr7 to _roomHotspotsEnabled
-rw-r--r--engines/voyeur/data.cpp4
-rw-r--r--engines/voyeur/data.h2
-rw-r--r--engines/voyeur/files_threads.cpp26
3 files changed, 16 insertions, 16 deletions
diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp
index 800d9d15c1..0f11c7bda2 100644
--- a/engines/voyeur/data.cpp
+++ b/engines/voyeur/data.cpp
@@ -70,8 +70,8 @@ void SVoy::synchronize(Common::Serializer &s) {
_audioHotspotTimes.synchronize(s);
_evidenceHotspotTimes.synchronize(s);
- for (int v1 = 0; v1 < 20; ++v1) {
- s.syncAsSint16LE(_arr7[20]);
+ for (int idx = 0; idx < 20; ++idx) {
+ s.syncAsByte(_roomHotspotsEnabled[idx]);
}
s.syncAsSint16LE(_field468);
diff --git a/engines/voyeur/data.h b/engines/voyeur/data.h
index 4e592d8b11..db6ec988d7 100644
--- a/engines/voyeur/data.h
+++ b/engines/voyeur/data.h
@@ -104,7 +104,7 @@ public:
HotspotTimes<8> _videoHotspotTimes;
HotspotTimes<3> _audioHotspotTimes;
HotspotTimes<3> _evidenceHotspotTimes;
- int _arr7[20];
+ bool _roomHotspotsEnabled[20];
int _field468;
int _field46A;
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 134a064b42..0b4cdd2f99 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -344,11 +344,11 @@ void ThreadResource::parsePlayCommands() {
_vm->_voy._field478 &= ~8;
_vm->_eventsManager._videoDead = -1;
- // Reset hotspot times data
+ // Reset hotspot data
_vm->_voy._videoHotspotTimes.reset();
_vm->_voy._audioHotspotTimes.reset();
_vm->_voy._evidenceHotspotTimes.reset();
- Common::fill(&_vm->_voy._arr7[0], &_vm->_voy._arr7[20], 0);
+ Common::fill(&_vm->_voy._roomHotspotsEnabled[0], &_vm->_voy._roomHotspotsEnabled[20], false);
byte *dataP = _playCommandsPtr;
int v2, v3;
@@ -619,7 +619,7 @@ void ThreadResource::parsePlayCommands() {
if (v2 == 0 || READ_LE_UINT16(_vm->_controlPtr->_ptr + 4) == 0) {
_vm->_voy._field47A = _vm->_resolvePtr[READ_LE_UINT16(dataP + 2)];
- _vm->_voy._arr7[READ_LE_UINT16(dataP + 4) - 1] = 1;
+ _vm->_voy._roomHotspotsEnabled[READ_LE_UINT16(dataP + 4) - 1] = true;
}
dataP += 6;
@@ -1145,7 +1145,7 @@ void ThreadResource::doRoom() {
voy._field437E = 1;
Common::Array<RectEntry> &hotspots = vm._bVoy->boltEntry(vm._playStampGroupId + 4)._rectResource->_entries;
- int i4e4 = -1;
+ int hotspotId = -1;
PictureResource *pic1 = vm._bVoy->boltEntry(vm._playStampGroupId + 2)._picResource;
PictureResource *pic2 = vm._bVoy->boltEntry(vm._playStampGroupId + 3)._picResource;
@@ -1179,25 +1179,25 @@ void ThreadResource::doRoom() {
vm._eventsManager.getMouseInfo();
Common::Point pt = vm._eventsManager.getMousePos();
- i4e4 = -1;
+ hotspotId = -1;
if (voy._computerTextId != -1 && voy._rect4E4.contains(pt))
- i4e4 = 999;
+ hotspotId = 999;
for (uint idx = 0; idx < hotspots.size(); ++idx) {
if (hotspots[idx].contains(pt)) {
int arrIndex = hotspots[idx]._arrIndex;
- if (voy._arr7[arrIndex - 1] == 1) {
- i4e4 = idx;
+ if (voy._roomHotspotsEnabled[arrIndex - 1]) {
+ hotspotId = idx;
break;
}
}
}
- if (i4e4 == -1) {
+ if (hotspotId == -1) {
vm._graphicsManager.sDrawPic(pic1, *vm._graphicsManager._vPort,
Common::Point(pt.x - 9, pt.y - 9));
vm._eventsManager.setCursorColor(128, 0);
- } else if (i4e4 != 999 || voy._RTVNum < voy._field4EC ||
+ } else if (hotspotId != 999 || voy._RTVNum < voy._field4EC ||
(voy._field4EE - 2) < voy._RTVNum) {
vm._graphicsManager.sDrawPic(pic2, *vm._graphicsManager._vPort,
Common::Point(pt.x - 12, pt.y - 9));
@@ -1215,7 +1215,7 @@ void ThreadResource::doRoom() {
vm._eventsManager.sWaitFlip();
} while (!vm.shouldQuit() && !vm._eventsManager._mouseClicked);
- if (!vm._eventsManager._leftClick || i4e4 == -1) {
+ if (!vm._eventsManager._leftClick || hotspotId == -1) {
if (vm._eventsManager._rightClick)
breakFlag = true;
@@ -1226,7 +1226,7 @@ void ThreadResource::doRoom() {
voy._field478 |= 16;
vm._eventsManager.startCursorBlink();
- if (i4e4 == 999) {
+ if (hotspotId == 999) {
_vm->flipPageAndWait();
if (vm._currentVocId != -1) {
@@ -1248,7 +1248,7 @@ void ThreadResource::doRoom() {
vm._bVoy->freeBoltGroup(0x4900);
} else {
- vm.doEvidDisplay(i4e4, 999);
+ vm.doEvidDisplay(hotspotId, 999);
}
voy._field478 &= ~0x10;