[Scummvm-cvs-logs] scummvm master -> 66160b983dc3938ddd9fc3b72c1d41a9d2b54846
urukgit
urukgit at users.noreply.github.com
Tue Dec 17 22:54:46 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:
66160b983d AVALANCHE: Some index fixes in Nim.
Commit: 66160b983dc3938ddd9fc3b72c1d41a9d2b54846
https://github.com/scummvm/scummvm/commit/66160b983dc3938ddd9fc3b72c1d41a9d2b54846
Author: uruk (koppirnyo at gmail.com)
Date: 2013-12-17T13:53:52-08:00
Commit Message:
AVALANCHE: Some index fixes in Nim.
Changed paths:
engines/avalanche/nim.cpp
diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp
index 4b2971c..8f73fe6 100644
--- a/engines/avalanche/nim.cpp
+++ b/engines/avalanche/nim.cpp
@@ -185,7 +185,7 @@ void Nim::setup() {
_turns = 0;
_dogfoodsTurn = true;
- _row = 1;
+ _row = 0;
_number = 1;
for (int i = 0; i < 3; i++)
_old[i] = 0;
@@ -242,7 +242,7 @@ void Nim::dogFood() {
for (int i = 0; i < 3; i++) {
if (_stones[i] > 0) {
- _r[live] = i + 1;
+ _r[live] = i;
sr[live] = _stones[i];
live++;
}
@@ -279,7 +279,7 @@ void Nim::dogFood() {
for (int i = 0; i < 3; i++) // Look for 2 equal lines.
if (_stones[other[i][0]] == _stones[other[i][1]]) {
- _row = i + 1; // This row.
+ _row = i; // This row.
_number = _stones[i]; // All of 'em.
return;
}
@@ -358,9 +358,9 @@ void Nim::findAp(byte start, byte stepSize) {
if (_stones[ooo] > (start + thisOne * stepSize)) { // Check if it's possible!
// Create an A.P.
- _row = ooo + 1; // Already calculated.
+ _row = ooo; // Already calculated.
// Start + thisone * stepsize will give the amount we SHOULD have here.
- _number = _stones[_row - 1] - (start + thisOne * stepSize);
+ _number = _stones[_row] - (start + thisOne * stepSize);
_lmo = true;
return;
}
More information about the Scummvm-git-logs
mailing list