aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-01-03 08:10:40 +0100
committerStrangerke2014-01-03 08:10:40 +0100
commit9ed37e68d2a5e413ec12487329361480bf290b7a (patch)
treef60f4c0d7177b4cde12f7c2e3728e4ede93b853c
parentc091afa297343ae5d0037fc91fad7f07a03ab333 (diff)
downloadscummvm-rg350-9ed37e68d2a5e413ec12487329361480bf290b7a.tar.gz
scummvm-rg350-9ed37e68d2a5e413ec12487329361480bf290b7a.tar.bz2
scummvm-rg350-9ed37e68d2a5e413ec12487329361480bf290b7a.zip
AVALANCHE: Split AvalancheEngine::resetVariables() in two, to make a part of it reusable
-rw-r--r--engines/avalanche/avalanche.cpp2
-rw-r--r--engines/avalanche/avalanche.h1
-rw-r--r--engines/avalanche/avalot.cpp5
3 files changed, 6 insertions, 2 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 2bb927646e..06585cd98c 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -444,7 +444,7 @@ bool AvalancheEngine::loadGame(const int16 slot) {
t.tm_mon = f->readSint16LE();
t.tm_year = f->readSint16LE();
- resetVariables();
+ resetAllVariables();
Common::Serializer sz(f, NULL);
synchronize(sz);
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index 87eb3c2158..7392bf3fae 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -340,6 +340,7 @@ private:
void checkClick();
void fixFlashers();
void loadAlso(byte num);
+ void resetAllVariables();
void resetVariables();
};
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index 52ba3b2189..9555bb4505 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -1478,7 +1478,10 @@ void AvalancheEngine::resetVariables() {
_givenPenToAyles = false;
_askedDogfoodAboutNim = false;
_startTime = getTimeInSeconds();
+}
+void AvalancheEngine::resetAllVariables() {
+ resetVariables();
_parser->resetVariables();
_nim->resetVariables();
_animation->resetVariables();
@@ -1500,7 +1503,7 @@ void AvalancheEngine::newGame() {
avvy->init(0, true);
_alive = true;
- resetVariables();
+ resetAllVariables();
_dialogs->setBubbleStateNatural();