From f83de4fbfe655591186eb0c4e2df87b1695e9fe9 Mon Sep 17 00:00:00 2001 From: uruk Date: Fri, 20 Dec 2013 08:46:47 +0100 Subject: AVALANCHE: Implement Nim::endOfGame(). --- engines/avalanche/nim.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'engines/avalanche/nim.cpp') diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp index 256c713edd..a7abfa391f 100644 --- a/engines/avalanche/nim.cpp +++ b/engines/avalanche/nim.cpp @@ -226,6 +226,7 @@ bool Nim::checkMouse() { Common::Point cursorPos = _vm->getMousePos(); _vm->_graphics->refreshScreen(); Common::Event event; + // This loop needs "some" revision!!! while (_vm->getEvent(event)) { _vm->_graphics->refreshScreen(); if (event.type == Common::EVENT_LBUTTONUP) { @@ -283,7 +284,24 @@ void Nim::takeSome() { } void Nim::endOfGame() { - warning("STUB: Nim::endOfGame()"); + CursorMan.showMouse(false); + + chalk(595, 55 + _turns * 10, "Wins!"); + _vm->_graphics->drawNormalText("- - - Press any key... - - -", _vm->_font, 8, 100, 190, kColorYellow); + + Common::Event event; + bool escape = false; + while (!_vm->shouldQuit() && !escape) { + _vm->_graphics->refreshScreen(); + while (_vm->getEvent(event)) { + if ((event.type == Common::EVENT_LBUTTONUP) || (event.type == Common::EVENT_KEYDOWN)) { + escape = true; + break; + } + } + } + + CursorMan.showMouse(true); } bool Nim::find(byte x) { -- cgit v1.2.3