aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2013-07-25 22:54:28 +0200
committeruruk2013-07-25 22:54:28 +0200
commit5e257a500b982c77d617f2103e504d72d489697b (patch)
tree58f99c55ed4c01994d14b9c26ccdfa6807d1aef4 /engines
parent395b917e94c4cc02035ec2e54cfe3e2b2074596c (diff)
downloadscummvm-rg350-5e257a500b982c77d617f2103e504d72d489697b.tar.gz
scummvm-rg350-5e257a500b982c77d617f2103e504d72d489697b.tar.bz2
scummvm-rg350-5e257a500b982c77d617f2103e504d72d489697b.zip
AVALANCHE: Implement Timeout::one_tick().
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/avalot.cpp2
-rw-r--r--engines/avalanche/timeout2.cpp15
2 files changed, 8 insertions, 9 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index 4674ceacaa..408da93bea 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -197,7 +197,7 @@ void Avalot::run(Common::String arg) {
if (_vm->_gyro->visible == _vm->_gyro->m_virtual)
_vm->_gyro->wipe_vmc(_vm->_gyro->cp);
- //_vm->_timeout->one_tick();
+ _vm->_timeout->one_tick();
diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp
index 647cfe4b46..88277ef2f6 100644
--- a/engines/avalanche/timeout2.cpp
+++ b/engines/avalanche/timeout2.cpp
@@ -74,13 +74,12 @@ void Timeout::one_tick() {
if (_vm->_gyro->ddmnow)
return;
- for (fv = 1; fv <= 7; fv++) {
- timetype &with = times[fv];
- if (with.time_left > 0) {
- with.time_left -= 1;
+ for (fv = 0; fv < 7; fv++) {
+ if (times[fv].time_left > 0) {
+ times[fv].time_left --;
- if (with.time_left == 0) {
- switch (with.then_where) {
+ if (times[fv].time_left == 0) {
+ switch (times[fv].then_where) {
case procopen_drawbridge :
open_drawbridge();
break;
@@ -208,8 +207,8 @@ void Timeout::one_tick() {
}
}
}
- _vm->_gyro->roomtime += 1; /* Cycles since you've been in this room. */
- _vm->_gyro->dna.total_time += 1; /* Total amount of time for this game. */
+ _vm->_gyro->roomtime++; /* Cycles since you've been in this room. */
+ _vm->_gyro->dna.total_time++; /* Total amount of time for this game. */
}
void Timeout::lose_timer(byte which) {