aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_stacks
diff options
context:
space:
mode:
authorBastien Bouclet2017-02-11 12:05:43 +0100
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commit1286e7fcf0d46dd2887fa466df74f3652f7af1df (patch)
tree9f13649ad91fff6cc49c7b55017c4a5fe1585c44 /engines/mohawk/riven_stacks
parentae6f248616a144050337e9687033402c4868d558 (diff)
downloadscummvm-rg350-1286e7fcf0d46dd2887fa466df74f3652f7af1df.tar.gz
scummvm-rg350-1286e7fcf0d46dd2887fa466df74f3652f7af1df.tar.bz2
scummvm-rg350-1286e7fcf0d46dd2887fa466df74f3652f7af1df.zip
MOHAWK: Use an enum for Riven's transition types
Diffstat (limited to 'engines/mohawk/riven_stacks')
-rw-r--r--engines/mohawk/riven_stacks/aspit.cpp10
-rw-r--r--engines/mohawk/riven_stacks/aspit.h4
-rw-r--r--engines/mohawk/riven_stacks/bspit.cpp4
-rw-r--r--engines/mohawk/riven_stacks/jspit.cpp8
-rw-r--r--engines/mohawk/riven_stacks/ospit.cpp4
5 files changed, 16 insertions, 14 deletions
diff --git a/engines/mohawk/riven_stacks/aspit.cpp b/engines/mohawk/riven_stacks/aspit.cpp
index f930dfc8cf..27b4c8939f 100644
--- a/engines/mohawk/riven_stacks/aspit.cpp
+++ b/engines/mohawk/riven_stacks/aspit.cpp
@@ -99,7 +99,7 @@ void ASpit::xaatrusbookback(uint16 argc, uint16 *argv) {
_vm->_inventory->backFromItemScript();
}
-bool ASpit::pageTurn(int16 transition) {
+bool ASpit::pageTurn(RivenTransition transition) {
// Wait until the previous page turn sound completes
while (_vm->_sound->isEffectPlaying() && !_vm->shouldQuit()) {
if (!mouseIsDown()) {
@@ -137,7 +137,7 @@ void ASpit::xaatrusbookprevpage(uint16 argc, uint16 *argv) {
if (page == 1)
return;
- if (!pageTurn(1)) {
+ if (!pageTurn(kRivenTransitionWipeRight)) {
return;
}
@@ -161,7 +161,7 @@ void ASpit::xaatrusbooknextpage(uint16 argc, uint16 *argv) {
if (((_vm->getFeatures() & GF_DEMO) && page == 6) || page == 10)
return;
- if (!pageTurn(0)) {
+ if (!pageTurn(kRivenTransitionWipeLeft)) {
return;
}
@@ -237,7 +237,7 @@ void ASpit::xacathbookprevpage(uint16 argc, uint16 *argv) {
_vm->_sound->playSound(5);
// Now update the screen :)
- _vm->_gfx->scheduleTransition(3);
+ _vm->_gfx->scheduleTransition(kRivenTransitionWipeDown);
_vm->getCard()->drawPicture(page);
}
@@ -254,7 +254,7 @@ void ASpit::xacathbooknextpage(uint16 argc, uint16 *argv) {
_vm->_sound->playSound(6);
// Now update the screen :)
- _vm->_gfx->scheduleTransition(2);
+ _vm->_gfx->scheduleTransition(kRivenTransitionWipeUp);
_vm->getCard()->drawPicture(page);
}
diff --git a/engines/mohawk/riven_stacks/aspit.h b/engines/mohawk/riven_stacks/aspit.h
index d64214d91f..3ac3fa86e2 100644
--- a/engines/mohawk/riven_stacks/aspit.h
+++ b/engines/mohawk/riven_stacks/aspit.h
@@ -25,6 +25,8 @@
#include "mohawk/riven_stack.h"
+#include "mohawk/riven_graphics.h"
+
namespace Mohawk {
namespace RivenStacks {
@@ -69,7 +71,7 @@ public:
void xaexittomain(uint16 argc, uint16 *argv);
private:
- bool pageTurn(int16 transition);
+ bool pageTurn(RivenTransition transition);
};
} // End of namespace RivenStacks
diff --git a/engines/mohawk/riven_stacks/bspit.cpp b/engines/mohawk/riven_stacks/bspit.cpp
index 7a8ac69abf..c5fedd7a59 100644
--- a/engines/mohawk/riven_stacks/bspit.cpp
+++ b/engines/mohawk/riven_stacks/bspit.cpp
@@ -101,7 +101,7 @@ void BSpit::xblabbookprevpage(uint16 argc, uint16 *argv) {
_vm->_sound->playSound(22);
// Now update the screen :)
- _vm->_gfx->scheduleTransition(1);
+ _vm->_gfx->scheduleTransition(kRivenTransitionWipeRight);
_vm->getCard()->drawPicture(page);
}
@@ -118,7 +118,7 @@ void BSpit::xblabbooknextpage(uint16 argc, uint16 *argv) {
_vm->_sound->playSound(23);
// Now update the screen :)
- _vm->_gfx->scheduleTransition(0);
+ _vm->_gfx->scheduleTransition(kRivenTransitionWipeLeft);
_vm->getCard()->drawPicture(page);
}
diff --git a/engines/mohawk/riven_stacks/jspit.cpp b/engines/mohawk/riven_stacks/jspit.cpp
index f4b0c0fc62..db2acfb28b 100644
--- a/engines/mohawk/riven_stacks/jspit.cpp
+++ b/engines/mohawk/riven_stacks/jspit.cpp
@@ -225,12 +225,12 @@ void JSpit::xvga1300_carriage(uint16 argc, uint16 *argv) {
_vm->_cursor->setCursor(kRivenHideCursor); // Hide the cursor
_vm->_system->updateScreen(); // Update
_vm->_video->playMovieBlockingRiven(1); // Play handle movie
- _vm->_gfx->scheduleTransition(15); // Set pan down transition
+ _vm->_gfx->scheduleTransition(kRivenTransitionPanDown);
_vm->changeToCard(_vm->getStack()->getCardStackId(0x18e77)); // Change to card facing up
_vm->_cursor->setCursor(kRivenHideCursor); // Hide the cursor (again)
_vm->_system->updateScreen(); // Update
_vm->_video->playMovieBlockingRiven(4); // Play carriage beginning to drop
- _vm->_gfx->scheduleTransition(14); // Set pan up transition
+ _vm->_gfx->scheduleTransition(kRivenTransitionPanUp);
_vm->changeToCard(_vm->getStack()->getCardStackId(0x183a9)); // Change to card looking straight again
_vm->_video->playMovieBlockingRiven(2);
@@ -265,12 +265,12 @@ void JSpit::xvga1300_carriage(uint16 argc, uint16 *argv) {
_vm->_system->updateScreen(); // Update
if (gotClick) {
- _vm->_gfx->scheduleTransition(16); // Schedule dissolve transition
+ _vm->_gfx->scheduleTransition(kRivenTransitionBlend);
_vm->changeToCard(_vm->getStack()->getCardStackId(0x18d4d)); // Move forward
_vm->_cursor->setCursor(kRivenHideCursor); // Hide the cursor
_vm->_system->updateScreen(); // Update
_vm->_system->delayMillis(500); // Delay a half second before changing again
- _vm->_gfx->scheduleTransition(12); // Schedule pan left transition
+ _vm->_gfx->scheduleTransition(kRivenTransitionPanLeft);
_vm->changeToCard(_vm->getStack()->getCardStackId(0x18ab5)); // Turn right
_vm->_cursor->setCursor(kRivenHideCursor); // Hide the cursor
_vm->_system->updateScreen(); // Update
diff --git a/engines/mohawk/riven_stacks/ospit.cpp b/engines/mohawk/riven_stacks/ospit.cpp
index 7607a93f8d..12328de744 100644
--- a/engines/mohawk/riven_stacks/ospit.cpp
+++ b/engines/mohawk/riven_stacks/ospit.cpp
@@ -228,7 +228,7 @@ void OSpit::xogehnbookprevpage(uint16 argc, uint16 *argv) {
_vm->_sound->playSound(12);
// Now update the screen :)
- _vm->_gfx->scheduleTransition(1);
+ _vm->_gfx->scheduleTransition(kRivenTransitionWipeRight);
_vm->getCard()->drawPicture(page);
}
@@ -245,7 +245,7 @@ void OSpit::xogehnbooknextpage(uint16 argc, uint16 *argv) {
_vm->_sound->playSound(13);
// Now update the screen :)
- _vm->_gfx->scheduleTransition(0);
+ _vm->_gfx->scheduleTransition(kRivenTransitionWipeLeft);
_vm->getCard()->drawPicture(page);
}