[Scummvm-cvs-logs] SF.net SVN: scummvm:[50336] scummvm/trunk/engines/mohawk

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Sat Jun 26 20:27:19 CEST 2010


Revision: 50336
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50336&view=rev
Author:   mthreepwood
Date:     2010-06-26 18:27:18 +0000 (Sat, 26 Jun 2010)

Log Message:
-----------
Add the page turning sound for the Riven journals and stub off the swipe transition used when turning pages.

Modified Paths:
--------------
    scummvm/trunk/engines/mohawk/graphics.cpp
    scummvm/trunk/engines/mohawk/riven_external.cpp

Modified: scummvm/trunk/engines/mohawk/graphics.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/graphics.cpp	2010-06-26 18:07:41 UTC (rev 50335)
+++ scummvm/trunk/engines/mohawk/graphics.cpp	2010-06-26 18:27:18 UTC (rev 50336)
@@ -466,27 +466,22 @@
 	// transitions were found by hacking scripts.
 
 	switch (_scheduledTransition) {
+	case 0:  // Swipe Left
+	case 1:  // Swipe Right
+	case 2:  // Swipe Up
+	case 3:  // Swipe Down
 	case 12: // Pan Left
-		warning ("STUB: Pan left");
-		break;
 	case 13: // Pan Right
-		warning ("STUB: Pan right");
-		break;
 	case 14: // Pan Up
-		warning ("STUB: Pan up");
-		break;
 	case 15: // Pan Down
-		warning ("STUB: Pan down");
-		break;
 	case 16: // Dissolve
 	case 17: // Dissolve (tspit CARD 155)
-		warning ("STUB: Dissolve");
 		break;
 	default:
-		if (_scheduledTransition < 12)
-			error ("Found unused transition %d", _scheduledTransition);
+		if (_scheduledTransition >= 4 && _scheduledTransition <= 11)
+			error("Found unused transition %d", _scheduledTransition);
 		else
-			error ("Found unknown transition %d", _scheduledTransition);
+			error("Found unknown transition %d", _scheduledTransition);
 	}
 
 	// For now, just copy the image to screen without doing any transition.

Modified: scummvm/trunk/engines/mohawk/riven_external.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven_external.cpp	2010-06-26 18:07:41 UTC (rev 50335)
+++ scummvm/trunk/engines/mohawk/riven_external.cpp	2010-06-26 18:27:18 UTC (rev 50336)
@@ -284,9 +284,14 @@
 		return;
 	(*page)--;
 
-	// TODO: Play the page turning sound
+	// Play the page turning sound
+	if (_vm->getFeatures() & GF_DEMO)
+		_vm->_sound->playSound(4, false);
+	else
+		_vm->_sound->playSound(3, false);
 
 	// Now update the screen :)
+	_vm->_gfx->scheduleTransition(1);
 	_vm->_gfx->updateScreen();
 }
 
@@ -299,9 +304,14 @@
 		return;
 	(*page)++;
 
-	// TODO: Play the page turning sound
+	// Play the page turning sound
+	if (_vm->getFeatures() & GF_DEMO)
+		_vm->_sound->playSound(5, false);
+	else
+		_vm->_sound->playSound(4, false);
 
 	// Now update the screen :)
+	_vm->_gfx->scheduleTransition(0);
 	_vm->_gfx->updateScreen();
 }
 
@@ -349,9 +359,11 @@
 		return;
 	(*page)--;
 
-	// TODO: Play the page turning sound
+	// Play the page turning sound
+	_vm->_sound->playSound(5, false);
 
 	// Now update the screen :)
+	_vm->_gfx->scheduleTransition(3);
 	_vm->_gfx->updateScreen();
 }
 
@@ -364,9 +376,11 @@
 		return;
 	(*page)++;
 
-	// TODO: Play the page turning sound
+	// Play the page turning sound
+	_vm->_sound->playSound(6, false);
 
 	// Now update the screen :)
+	_vm->_gfx->scheduleTransition(2);
 	_vm->_gfx->updateScreen();
 }
 
@@ -380,12 +394,20 @@
 void RivenExternal::xatrapbookclose(uint16 argc, uint16 *argv) {
 	// Close the trap book
 	*_vm->matchVarToString("atrap") = 0;
+
+	// Play the page turning sound
+	_vm->_sound->playSound(8, false);
+
 	_vm->refreshCard();
 }
 
 void RivenExternal::xatrapbookopen(uint16 argc, uint16 *argv) {
 	// Open the trap book
 	*_vm->matchVarToString("atrap") = 1;
+
+	// Play the page turning sound
+	_vm->_sound->playSound(9, false);
+
 	_vm->refreshCard();
 }
 
@@ -437,7 +459,11 @@
 		return;
 	(*page)--;
 
+	// Play the page turning sound
+	_vm->_sound->playSound(22, false);
+
 	// Now update the screen :)
+	_vm->_gfx->scheduleTransition(1);
 	_vm->_gfx->updateScreen();
 }
 
@@ -450,7 +476,11 @@
 		return;
 	(*page)++;
 
+	// Play the page turning sound
+	_vm->_sound->playSound(23, false);
+
 	// Now update the screen :)
+	_vm->_gfx->scheduleTransition(0);
 	_vm->_gfx->updateScreen();
 }
 
@@ -1270,9 +1300,11 @@
 		return;
 	(*page)--;
 
-	// TODO: Play the page turning sound
+	// Play the page turning sound
+	_vm->_sound->playSound(12, false);
 
 	// Now update the screen :)
+	_vm->_gfx->scheduleTransition(1);
 	_vm->_gfx->updateScreen();
 }
 
@@ -1285,9 +1317,11 @@
 		return;
 	(*page)++;
 
-	// TODO: Play the page turning sound
+	// Play the page turning sound
+	_vm->_sound->playSound(13, false);
 
 	// Now update the screen :)
+	_vm->_gfx->scheduleTransition(0);
 	_vm->_gfx->updateScreen();
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list