aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
authorPaul Gilbert2014-08-17 22:09:03 -0400
committerPaul Gilbert2014-08-17 22:09:03 -0400
commit38acce33fd95171a5d3a7a00cad57bb4a5711bad (patch)
treeabb39a59082e356c761b80ea83c6de65d0d358aa /engines/access
parenta8a7018926f68d4792f3114ea8496ae721c2490c (diff)
downloadscummvm-rg350-38acce33fd95171a5d3a7a00cad57bb4a5711bad.tar.gz
scummvm-rg350-38acce33fd95171a5d3a7a00cad57bb4a5711bad.tar.bz2
scummvm-rg350-38acce33fd95171a5d3a7a00cad57bb4a5711bad.zip
ACCESS: Add updateTimers so bubble boxes can be removed
Diffstat (limited to 'engines/access')
-rw-r--r--engines/access/bubble_box.cpp4
-rw-r--r--engines/access/data.cpp12
-rw-r--r--engines/access/data.h5
-rw-r--r--engines/access/events.cpp1
4 files changed, 20 insertions, 2 deletions
diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp
index 5a17b3b1a3..6ea7ed8a0b 100644
--- a/engines/access/bubble_box.cpp
+++ b/engines/access/bubble_box.cpp
@@ -198,9 +198,9 @@ void BubbleBox::doBox(int item, int box) {
delete[] iconData;
// Set the up boundaries and color to use for the box background
- _vm->_screen->_orgX1 = _bounds.left;
+ _vm->_screen->_orgX1 = _bounds.left - 2;
_vm->_screen->_orgY1 = _bounds.top;
- _vm->_screen->_orgX2 = _bounds.right;
+ _vm->_screen->_orgX2 = _bounds.right - 2;
_vm->_screen->_orgY2 = _bounds.bottom;
_vm->_screen->_lColor = 1;
diff --git a/engines/access/data.cpp b/engines/access/data.cpp
index 90f712af3b..124bfbca5a 100644
--- a/engines/access/data.cpp
+++ b/engines/access/data.cpp
@@ -46,6 +46,18 @@ void TimerList::restoreTimers() {
}
}
+void TimerList::updateTimers() {
+ for (uint i = 0; i < size(); ++i) {
+ TimerEntry &te = (*this)[i];
+ if (te._flag) {
+ if (!--te._timer) {
+ te._timer = te._initTm;
+ te._flag = false;
+ }
+ }
+ }
+}
+
/*------------------------------------------------------------------------*/
byte Font::_fontColors[4];
diff --git a/engines/access/data.h b/engines/access/data.h
index 7ddc5d610e..8ba3c58c82 100644
--- a/engines/access/data.h
+++ b/engines/access/data.h
@@ -68,6 +68,11 @@ public:
* Resetore the set of previously saved timers
*/
void restoreTimers();
+
+ /**
+ * Update the timer list
+ */
+ void updateTimers();
};
class ExtraCell {
diff --git a/engines/access/events.cpp b/engines/access/events.cpp
index 71ed5f433e..25a77f82de 100644
--- a/engines/access/events.cpp
+++ b/engines/access/events.cpp
@@ -175,6 +175,7 @@ bool EventsManager::checkForNextFrameCounter() {
void EventsManager::nextFrame() {
// Update timers
_vm->_animation->updateTimers();
+ _vm->_timers.updateTimers();
// Give time to the debugger
_vm->_debugger->onFrame();