[Scummvm-cvs-logs] scummvm master -> ee34fcef43a527f2de12b48f89934ebab4478c08
Strangerke
Strangerke at scummvm.org
Tue Dec 17 07:52:36 CET 2013
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:
ee34fcef43 AVALANCHE: Fix variable initialization in Nim
Commit: ee34fcef43a527f2de12b48f89934ebab4478c08
https://github.com/scummvm/scummvm/commit/ee34fcef43a527f2de12b48f89934ebab4478c08
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-12-16T22:52:06-08:00
Commit Message:
AVALANCHE: Fix variable initialization in Nim
Changed paths:
engines/avalanche/nim.cpp
diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp
index a2572f1..15146ea 100644
--- a/engines/avalanche/nim.cpp
+++ b/engines/avalanche/nim.cpp
@@ -35,11 +35,27 @@ const char * const Nim::kNames[2] = {"Avalot", "Dogfood"};
Nim::Nim(AvalancheEngine *vm) {
_vm = vm;
- _playedNim = 0;
+ resetVariables();
}
void Nim::resetVariables() {
_playedNim = 0;
+ _turns = 0;
+ _dogfoodsTurn = false;
+ _stonesLeft = 0;
+ _clicked = false;
+ _row = 0;
+ _number = 0;
+ _squeak = false;
+ _mNum = 0;
+ _mRow = 0;
+
+ for (int i = 0; i < 3; i++) {
+ _old[i] = 0;
+ _stones[i] = 0;
+ }
+
+ memset(_stonePic, 0, 4 * 23 * 7);
}
void Nim::synchronize(Common::Serializer &sz) {
More information about the Scummvm-git-logs
mailing list