[Scummvm-cvs-logs] scummvm master -> 3f6d71dd258cf998c8fbca25ad98b4b8dfd1a9a6

urukgit urukgit at users.noreply.github.com
Mon Feb 10 10:50:11 CET 2014


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:
3f6d71dd25 AVALANCHE: Implement 'winning_pic'.


Commit: 3f6d71dd258cf998c8fbca25ad98b4b8dfd1a9a6
    https://github.com/scummvm/scummvm/commit/3f6d71dd258cf998c8fbca25ad98b4b8dfd1a9a6
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-10T01:49:39-08:00

Commit Message:
AVALANCHE: Implement 'winning_pic'.

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



diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index 6cafc0b..8699ad1 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -718,6 +718,19 @@ void GraphicManager::shiftScreen() {
 	_surface.drawLine(0, 0, _surface.w, 0, kColorBlack);
 }
 
+void GraphicManager::drawWinningPic() {
+	Common::File file;
+
+	if (!file.open("finale.avd"))
+		error("AVALANCHE: Timer: File not found: finale.avd");
+
+	Graphics::Surface winning = loadPictureRaw(file, 640, 200);
+	drawPicture(_surface, winning, 0, 0);
+
+	winning.free();
+	file.close();
+}
+
 void GraphicManager::clearAlso() {
 	_magics.fillRect(Common::Rect(0, 0, 640, 200), 0);
 	_magics.frameRect(Common::Rect(0, 45, 640, 161), 15);
diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h
index d6625cc..822b4c7 100644
--- a/engines/avalanche/graphics.h
+++ b/engines/avalanche/graphics.h
@@ -92,6 +92,9 @@ public:
 	// Used in wobble()
 	void shiftScreen();
 
+	// Used in winning()
+	void drawWinningPic();
+
 	// Ghostroom's functions:
 	void ghostDrawGhost(byte ghostArr[2][66][26], uint16 destX, int16 destY); // Very similar to loadPictureSign(). TODO: Unify the two later if possible.
 	void ghostDrawGlerk(byte glerkArr[4][35][9], uint16 destX, uint16 destY); // Very similar to ghostDrawGhost(), but not enough to unify the two.
diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp
index 091045f..f63098a 100644
--- a/engines/avalanche/timer.cpp
+++ b/engines/avalanche/timer.cpp
@@ -632,11 +632,39 @@ void Timer::arkataShouts() {
 	addTimer(160, kProcArkataShouts, kReasonArkataShouts);
 }
 
+/**
+ * @remarks Contains the content of the function 'winning_pic', originally located in PINGO.
+ */
 void Timer::winning() {
 	_vm->_dialogs->displayScrollChain('Q', 79);
 
-	//_vm->_pingo->winningPic();
-	warning("STUB: Timer::winning()");
+	// This was originally located in winning_pic:
+	CursorMan.showMouse(false);
+	_vm->_graphics->saveScreen();
+	_vm->fadeOut();
+	_vm->_graphics->drawWinningPic();
+	_vm->_graphics->refreshScreen();
+	_vm->fadeIn();
+
+	// Waiting for a keypress or a left mouseclick:
+	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;
+			}
+		}
+	}
+
+	_vm->fadeOut();
+	_vm->_graphics->restoreScreen();
+	_vm->_graphics->removeBackup();
+	_vm->fadeIn();
+	CursorMan.showMouse(true);
+	// winning_pic's end.
 
 	_vm->callVerb(kVerbCodeScore);
 	_vm->_dialogs->displayText(" T H E    E N D ");






More information about the Scummvm-git-logs mailing list