aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
authorPaul Gilbert2014-11-28 14:16:10 -0500
committerPaul Gilbert2014-12-12 22:50:36 -0500
commiteeb9d63a19ba3a712a8f02ecede554dc992246fe (patch)
tree4411712dba6beaabe0a96b2cc091ef53aebce0dc /engines/access
parentabecac94d4b944f1c594f6963cb308614086360a (diff)
downloadscummvm-rg350-eeb9d63a19ba3a712a8f02ecede554dc992246fe.tar.gz
scummvm-rg350-eeb9d63a19ba3a712a8f02ecede554dc992246fe.tar.bz2
scummvm-rg350-eeb9d63a19ba3a712a8f02ecede554dc992246fe.zip
ACCESS: Don't decrease timers whilst text dialogs are showing
Diffstat (limited to 'engines/access')
-rw-r--r--engines/access/events.cpp16
-rw-r--r--engines/access/events.h4
-rw-r--r--engines/access/scripts.cpp2
3 files changed, 12 insertions, 10 deletions
diff --git a/engines/access/events.cpp b/engines/access/events.cpp
index 06552b781b..8b109ea470 100644
--- a/engines/access/events.cpp
+++ b/engines/access/events.cpp
@@ -120,9 +120,9 @@ bool EventsManager::isCursorVisible() {
return CursorMan.isVisible();
}
-void EventsManager::pollEvents() {
+void EventsManager::pollEvents(bool skipTimers) {
if (checkForNextFrameCounter()) {
- nextFrame();
+ nextFrame(skipTimers);
}
_wheelUp = _wheelDown = false;
@@ -200,10 +200,12 @@ bool EventsManager::checkForNextFrameCounter() {
return false;
}
-void EventsManager::nextFrame() {
- // Update timers
- _vm->_animation->updateTimers();
- _vm->_timers.updateTimers();
+void EventsManager::nextFrame(bool skipTimers) {
+ if (skipTimers) {
+ // Update timers
+ _vm->_animation->updateTimers();
+ _vm->_timers.updateTimers();
+ }
// Give time to the debugger
_vm->_debugger->onFrame();
@@ -243,7 +245,7 @@ void EventsManager::clearEvents() {
void EventsManager::waitKeyMouse() {
while (!_vm->shouldQuit() && !_leftButton && _keypresses.size() == 0) {
- pollEvents();
+ pollEvents(true);
g_system->delayMillis(10);
}
diff --git a/engines/access/events.h b/engines/access/events.h
index c72f245412..95ba926384 100644
--- a/engines/access/events.h
+++ b/engines/access/events.h
@@ -47,7 +47,7 @@ private:
uint32 _frameCounter;
uint32 _priorFrameTime;
Graphics::Surface _invCursor;
- void nextFrame();
+ void nextFrame(bool skipTimers);
public:
CursorType _cursorId;
CursorType _normalMouse;
@@ -105,7 +105,7 @@ public:
*/
bool isCursorVisible();
- void pollEvents();
+ void pollEvents(bool skipTimers = false);
void pollEventsAndWait();
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp
index 72650f472c..d611b6fe26 100644
--- a/engines/access/scripts.cpp
+++ b/engines/access/scripts.cpp
@@ -213,7 +213,7 @@ void Scripts::printString(const Common::String &msg) {
// Wait until the bubble display is expired
while (!_vm->shouldQuit() && _vm->_timers[PRINT_TIMER]._flag) {
- _vm->_events->pollEvents();
+ _vm->_events->pollEvents(true);
}
// Restore the original screen over the text bubble