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

svn-id: r50336
This commit is contained in:
Matthew Hoops
2010-06-26 18:27:18 +00:00
parent 58fcda82f3
commit c2cb3bb799
2 changed files with 47 additions and 18 deletions
+7 -12
View File
@@ -466,27 +466,22 @@ void RivenGraphics::runScheduledTransition() {
// 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.
+40 -6
View File
@@ -284,9 +284,14 @@ void RivenExternal::xaatrusbookprevpage(uint16 argc, uint16 *argv) {
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 @@ void RivenExternal::xaatrusbooknextpage(uint16 argc, uint16 *argv) {
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 @@ void RivenExternal::xacathbookprevpage(uint16 argc, uint16 *argv) {
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 @@ void RivenExternal::xacathbooknextpage(uint16 argc, uint16 *argv) {
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::xtrapbookback(uint16 argc, uint16 *argv) {
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 @@ void RivenExternal::xblabbookprevpage(uint16 argc, uint16 *argv) {
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 @@ void RivenExternal::xblabbooknextpage(uint16 argc, uint16 *argv) {
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 @@ void RivenExternal::xogehnbookprevpage(uint16 argc, uint16 *argv) {
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 @@ void RivenExternal::xogehnbooknextpage(uint16 argc, uint16 *argv) {
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();
}