aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur/files_threads.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-02-03 00:25:58 -0500
committerPaul Gilbert2014-02-03 00:25:58 -0500
commitfcaf2af6169f0da8aaf8b8b6eabc5d94a401cfd6 (patch)
tree18702cfa669e51b16d38f6544ab050f73464b26e /engines/voyeur/files_threads.cpp
parent2234724891dc9df1e04f76e1c80090224794e9c0 (diff)
downloadscummvm-rg350-fcaf2af6169f0da8aaf8b8b6eabc5d94a401cfd6.tar.gz
scummvm-rg350-fcaf2af6169f0da8aaf8b8b6eabc5d94a401cfd6.tar.bz2
scummvm-rg350-fcaf2af6169f0da8aaf8b8b6eabc5d94a401cfd6.zip
VOYEUR: Add a hotspot to the aprtment for the ScummVM GMM
The original game doesn't have any savegame support, so this will provide users with a more obvious hint than knowing to explicitly show the GMM when in the apartment.
Diffstat (limited to 'engines/voyeur/files_threads.cpp')
-rw-r--r--engines/voyeur/files_threads.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 1d66483ffe..40f4fe6f04 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -507,9 +507,10 @@ void ThreadResource::parsePlayCommands() {
break;
case 5:
- // Load the time information for the new time period
+ // Check whether transition to a given time period is allowed, and
+ // if so, load the time information for the new time period
v2 = READ_LE_UINT16(dataP);
- if (v2 == 0 || READ_LE_UINT16(_vm->_controlPtr->_ptr + 4) == 0) {
+ if (v2 == 0 || READ_LE_UINT16(_vm->_controlPtr->_ptr + 4) == v2) {
_vm->_voy._field470 = 5;
int count = READ_LE_UINT16(dataP + 2);
_vm->_voy._RTVLimit = READ_LE_UINT16(dataP + 4);
@@ -997,6 +998,8 @@ int ThreadResource::doApt() {
int prevHotspotId = -1;
Common::Point pt;
PictureResource *pic;
+ Common::Rect gmmHotspot(75, 125, 130, 140);
+
do {
_vm->_voyeurArea = AREA_APARTMENT;
@@ -1044,6 +1047,10 @@ int ThreadResource::doApt() {
}
}
+ // Check for presence in ScummVM GMM
+ if (gmmHotspot.contains(pt))
+ hotspotId = 42;
+
// Draw either standard or highlighted eye cursor
pic = _vm->_bVoy->boltEntry((hotspotId == -1) ? _vm->_playStampGroupId + 2 :
_vm->_playStampGroupId + 3)._picResource;
@@ -1051,6 +1058,12 @@ int ThreadResource::doApt() {
_vm->flipPageAndWait();
+ if (hotspotId == 42 && _vm->_eventsManager._leftClick) {
+ // Show the ScummVM GMM
+ _vm->_eventsManager.getMouseInfo();
+ _vm->openMainMenuDialog();
+ }
+
} while (!_vm->shouldQuit() && (!_vm->_eventsManager._leftClick || hotspotId == -1));
pt = _vm->_eventsManager.getMousePos();