aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur
diff options
context:
space:
mode:
authorPaul Gilbert2013-12-28 20:32:17 +1100
committerPaul Gilbert2013-12-28 20:32:17 +1100
commit8fa75375d417ee8b52b6b0ca71d58771c5093e16 (patch)
treed8f8e19048ab348418ca8b91bb249ff34273ef56 /engines/voyeur
parentf88c4727781b6e6eea4a8a5a7dd09ae90e55ba68 (diff)
downloadscummvm-rg350-8fa75375d417ee8b52b6b0ca71d58771c5093e16.tar.gz
scummvm-rg350-8fa75375d417ee8b52b6b0ca71d58771c5093e16.tar.bz2
scummvm-rg350-8fa75375d417ee8b52b6b0ca71d58771c5093e16.zip
VOYEUR: Bugfixes for doEvidDisplay
Diffstat (limited to 'engines/voyeur')
-rw-r--r--engines/voyeur/events.cpp14
-rw-r--r--engines/voyeur/voyeur_game.cpp4
2 files changed, 11 insertions, 7 deletions
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp
index 94f137e569..6b2b49639a 100644
--- a/engines/voyeur/events.cpp
+++ b/engines/voyeur/events.cpp
@@ -217,12 +217,11 @@ void EventsManager::delayClick(int cycles) {
uint32 totalMilli = cycles * 1000 / GAME_FRAME_RATE;
uint32 delayEnd = g_system->getMillis() + totalMilli;
- while (!_vm->shouldQuit() && g_system->getMillis() < delayEnd
- && !_vm->_voy._mouseClicked) {
+ do {
g_system->delayMillis(10);
-
- pollEvents();
- }
+ getMouseInfo();
+ } while (!_vm->shouldQuit() && g_system->getMillis() < delayEnd
+ && !_vm->_voy._mouseClicked);
}
void EventsManager::pollEvents() {
@@ -462,6 +461,11 @@ void EventsManager::getMouseInfo() {
_vm->_voy._leftClick = _vm->_voy._newLeftClick;
_vm->_voy._rightClick = _vm->_voy._newRightClick;
_vm->_voy._mouseUnk = _vm->_voy._newMouseUnk;
+
+ _vm->_voy._newMouseClicked = false;
+ _vm->_voy._newLeftClick = false;
+ _vm->_voy._newRightClick = false;
+ _vm->_voy._mouseUnk = false;
}
void EventsManager::checkForKey() {
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index a7fab19ad1..7ea19109ff 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -1085,7 +1085,7 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) {
_bVoy->getBoltGroup(_voy._field47A);
PictureResource *pic = _bVoy->boltEntry(_voy._field47A + evidId * 2)._picResource;
_graphicsManager.sDrawPic(pic, *_graphicsManager._vPort, Common::Point(
- 384 - pic->_bounds.width() / 2, 240 - pic->_bounds.height() / 2));
+ (384 - pic->_bounds.width()) / 2, (240 - pic->_bounds.height()) / 2));
_bVoy->freeBoltMember(_voy._field47A + evidId * 2);
CMapResource *pal = _bVoy->boltEntry(_voy._field47A + evidId * 2 + 1)._cMapResource;
@@ -1126,7 +1126,7 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) {
_soundManager.startVOCPlay(_playStamp2);
}
- _eventsManager.delay(600);
+ _eventsManager.delayClick(600);
if (_voy._rightClick)
break;
if (count == 0 || evidIdx >= eventId)