[Scummvm-cvs-logs] scummvm master -> c6acf6c0496eb95f9e3da4eb074fcbf6e92adf88

urukgit urukgit at users.noreply.github.com
Tue Dec 17 13:40:13 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:
c6acf6c049 AVALANCHE: Implement drawing of stones in Nim.


Commit: c6acf6c0496eb95f9e3da4eb074fcbf6e92adf88
    https://github.com/scummvm/scummvm/commit/c6acf6c0496eb95f9e3da4eb074fcbf6e92adf88
Author: uruk (koppirnyo at gmail.com)
Date: 2013-12-17T04:39:43-08:00

Commit Message:
AVALANCHE: Implement drawing of stones in Nim.

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



diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h
index 20f8176..d541602 100644
--- a/engines/avalanche/graphics.h
+++ b/engines/avalanche/graphics.h
@@ -82,8 +82,6 @@ public:
 	void drawRectangle(Common::Rect rect, Color color);
 	void loadNim();
 	void drawNimStone(int x, int y);
-	// Maybe we'll be able to get rid of these two and squeeze them into loadNim() later
-	// since I am not sure that we'll need to redraw them any other times.
 	void drawNimInitials();
 	void drawNimLogo();
 
diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp
index 7e63397..a0c10a2 100644
--- a/engines/avalanche/nim.cpp
+++ b/engines/avalanche/nim.cpp
@@ -188,12 +188,15 @@ void Nim::setup() {
 		_old[i] = 0;
 }
 
-void Nim::plotStone(byte x,byte y) {
-	warning("STUB: Nim::plotStone()");
+void Nim::plotStone(byte x, byte y) {
+	_vm->_graphics->drawNimStone(64 + x * 7 * 8 + x * 8, 75 + y * 35);
 }
 
 void Nim::board() {
-	warning("STUB: Nim::board()");
+	for (int i = 0; i < 3; i++)
+		for (int j = 0; j < _stones[i]; j++)
+			plotStone(j, i);
+	_vm->_graphics->refreshScreen();
 }
 
 void Nim::startMove() {
@@ -233,7 +236,7 @@ bool Nim::find(byte x) {
 	return true;
 }
 
-void Nim::findAp(byte start,byte stepsize) {
+void Nim::findAp(byte start, byte stepsize) {
 	warning("STUB: Nim::findAp()");
 }
 
diff --git a/engines/avalanche/nim.h b/engines/avalanche/nim.h
index 41ecb06..d80445e 100644
--- a/engines/avalanche/nim.h
+++ b/engines/avalanche/nim.h
@@ -56,7 +56,7 @@ private:
 
 	void chalk(int x, int y, Common::String text);
 	void setup();
-	void plotStone(byte x,byte y);
+	void plotStone(byte x, byte y);
 	void board();
 	void startMove();
 	void showChanges();
@@ -67,7 +67,7 @@ private:
 	void endOfGame();
 	void dogFood();
 	bool find(byte x);
-	void findAp(byte start,byte stepsize);
+	void findAp(byte start, byte stepsize);
 };
 
 } // End of namespace Avalanche






More information about the Scummvm-git-logs mailing list