aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2013-12-17 13:39:24 +0100
committeruruk2013-12-17 13:39:43 +0100
commitc6acf6c0496eb95f9e3da4eb074fcbf6e92adf88 (patch)
tree1eb50c245425fda007d8107d9a70f281b1ae5f92
parente57745ee9520f89a9b946ad205b3b322d14ef1df (diff)
downloadscummvm-rg350-c6acf6c0496eb95f9e3da4eb074fcbf6e92adf88.tar.gz
scummvm-rg350-c6acf6c0496eb95f9e3da4eb074fcbf6e92adf88.tar.bz2
scummvm-rg350-c6acf6c0496eb95f9e3da4eb074fcbf6e92adf88.zip
AVALANCHE: Implement drawing of stones in Nim.
-rw-r--r--engines/avalanche/graphics.h2
-rw-r--r--engines/avalanche/nim.cpp11
-rw-r--r--engines/avalanche/nim.h4
3 files changed, 9 insertions, 8 deletions
diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h
index 20f8176294..d54160229a 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 7e63397179..a0c10a2e80 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 41ecb0664d..d80445efef 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