aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/avalanche/avalanche.cpp2
-rw-r--r--engines/avalanche/avalot.cpp6
-rw-r--r--engines/avalanche/gyro2.h2
-rw-r--r--engines/avalanche/timeout2.cpp27
4 files changed, 21 insertions, 16 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 8c893176e8..2c4ae6f9ea 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -456,6 +456,8 @@ bool AvalancheEngine::loadGame(const int16 slot) {
delete f;
+ _gyro->isLoaded = true;
+
_gyro->seescroll = true; // This prevents display of the new sprites before the new picture is loaded.
if (_gyro->holdthedawn) {
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index 9cf66606ab..cb73123d2e 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -192,14 +192,12 @@ void Avalot::setup() {
int16 loadSlot = Common::ConfigManager::instance().getInt("save_slot");
if (loadSlot >= 0) {
_vm->loadGame(loadSlot);
-
- _vm->_gyro->reloaded = true;
} else
- _vm->_gyro->reloaded = false;
+ _vm->_gyro->isLoaded = false; // Set to true in _vm->loadGame().
- if (!_vm->_gyro->reloaded) {
+ if (!_vm->_gyro->isLoaded) {
_vm->_gyro->newgame(); // No game was requested- load the default.
_vm->_gyro->soundfx = ! _vm->_gyro->soundfx;
diff --git a/engines/avalanche/gyro2.h b/engines/avalanche/gyro2.h
index 7ddfe62de4..547b324af0 100644
--- a/engines/avalanche/gyro2.h
+++ b/engines/avalanche/gyro2.h
@@ -594,7 +594,7 @@ public:
uint16 storage_seg, storage_ofs; /* Seg and ofs of the Storage area. */
uint16 skellern; /* Offset of the timer variable - 1 more than storage_OFS */
- bool reloaded; /* Is this NOT the primary loading? */
+ bool isLoaded; // Is it a loaded gamestate?
bool super_was_virtual, super_was_off; /* Used by Super_Off and Super_On */
diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp
index 459f12415d..dba78870e9 100644
--- a/engines/avalanche/timeout2.cpp
+++ b/engines/avalanche/timeout2.cpp
@@ -57,17 +57,22 @@ Timeout::Timeout(AvalancheEngine *vm) {
}
void Timeout::set_up_timer(int32 howlong, byte whither, byte why) {
- fv = 0;
- while ((fv < 7) && (times[fv].time_left != 0))
- fv++;
-
- if (fv == 7)
- return; /* Oh dear... */
-
- /* Everything's OK here! */
- times[fv].time_left = howlong;
- times[fv].then_where = whither;
- times[fv].what_for = why;
+ if (_vm->_gyro->isLoaded == false) {
+ byte i = 0;
+ while ((i < 7) && (times[i].time_left != 0))
+ i++;
+
+ if (i == 7)
+ return; // Oh dear...
+
+ // Everything's OK here!
+ times[i].time_left = howlong;
+ times[i].then_where = whither;
+ times[i].what_for = why;
+ } else {
+ _vm->_gyro->isLoaded = false;
+ return;
+ }
}
void Timeout::one_tick() {