[Scummvm-cvs-logs] scummvm master -> 9ed37e68d2a5e413ec12487329361480bf290b7a

Strangerke Strangerke at scummvm.org
Fri Jan 3 08:11:21 CET 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9ed37e68d2 AVALANCHE: Split AvalancheEngine::resetVariables() in two, to make a part of it reusable


Commit: 9ed37e68d2a5e413ec12487329361480bf290b7a
    https://github.com/scummvm/scummvm/commit/9ed37e68d2a5e413ec12487329361480bf290b7a
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-01-02T23:10:40-08:00

Commit Message:
AVALANCHE: Split AvalancheEngine::resetVariables() in two, to make a part of it reusable

Changed paths:
    engines/avalanche/avalanche.cpp
    engines/avalanche/avalanche.h
    engines/avalanche/avalot.cpp



diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 2bb9276..06585cd 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 87eb3c2..7392bf3 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 52ba3b2..9555bb4 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();
 






More information about the Scummvm-git-logs mailing list