[Scummvm-cvs-logs] scummvm master -> 47bdabdb31156f84c704e90af10ead3292f026ee

urukgit urukgit at users.noreply.github.com
Tue Dec 17 14:29:03 CET 2013


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

Summary:
30e27e11bb AVALANCHE: Get rid of plotStone().
47bdabdb31 AVALANCHE: Implement startMove() in Nim.


Commit: 30e27e11bb135b06d3f61450b5793106a695f719
    https://github.com/scummvm/scummvm/commit/30e27e11bb135b06d3f61450b5793106a695f719
Author: uruk (koppirnyo at gmail.com)
Date: 2013-12-17T05:11:35-08:00

Commit Message:
AVALANCHE: Get rid of plotStone().

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



diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp
index a0c10a2..fad0bb7 100644
--- a/engines/avalanche/nim.cpp
+++ b/engines/avalanche/nim.cpp
@@ -188,14 +188,12 @@ void Nim::setup() {
 		_old[i] = 0;
 }
 
-void Nim::plotStone(byte x, byte y) {
-	_vm->_graphics->drawNimStone(64 + x * 7 * 8 + x * 8, 75 + y * 35);
-}
-
 void Nim::board() {
 	for (int i = 0; i < 3; i++)
 		for (int j = 0; j < _stones[i]; j++)
-			plotStone(j, i);
+			_vm->_graphics->drawNimStone(64 + j * 7 * 8 + j * 8, 75 + i * 35);
+			// It's practically the body of the Pascal function "plotstone()", reimplemented.
+			// It's the only place where we use it, so there's no reason to keep it separated as a function.
 	_vm->_graphics->refreshScreen();
 }
 
diff --git a/engines/avalanche/nim.h b/engines/avalanche/nim.h
index d80445e..8b6faa1 100644
--- a/engines/avalanche/nim.h
+++ b/engines/avalanche/nim.h
@@ -56,7 +56,6 @@ private:
 
 	void chalk(int x, int y, Common::String text);
 	void setup();
-	void plotStone(byte x, byte y);
 	void board();
 	void startMove();
 	void showChanges();


Commit: 47bdabdb31156f84c704e90af10ead3292f026ee
    https://github.com/scummvm/scummvm/commit/47bdabdb31156f84c704e90af10ead3292f026ee
Author: uruk (koppirnyo at gmail.com)
Date: 2013-12-17T05:28:12-08:00

Commit Message:
AVALANCHE: Implement startMove() in Nim.

Changed paths:
    engines/avalanche/nim.cpp



diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp
index fad0bb7..cae890f 100644
--- a/engines/avalanche/nim.cpp
+++ b/engines/avalanche/nim.cpp
@@ -198,7 +198,14 @@ void Nim::board() {
 }
 
 void Nim::startMove() {
-	warning("STUB: Nim::startMove()");
+	_turns++;
+	Common::String turnsStr = Common::String::format("%d", _turns);
+	int y = 55 + _turns * 10;
+	_dogfoodsTurn = !_dogfoodsTurn;
+	chalk(433, y, turnsStr);
+	chalk(493, y, kNames[_dogfoodsTurn]);
+	for (int i = 0; i < 3; i++)
+		_old[i] = _stones[i];
 }
 
 void Nim::showChanges() {






More information about the Scummvm-git-logs mailing list