From fcaf2af6169f0da8aaf8b8b6eabc5d94a401cfd6 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 3 Feb 2014 00:25:58 -0500 Subject: 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. --- engines/voyeur/files_threads.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'engines/voyeur/files_threads.cpp') 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(); -- cgit v1.2.3