aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/scenes
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-02 00:42:04 +0200
committerEugene Sandulenko2014-01-02 00:48:34 +0200
commitdd143adbaaf21dfc19b7ad20a2e6243164ddfc39 (patch)
treeca93eefff24651f238cc8c2d759ca0e8e7a0302e /engines/fullpipe/scenes
parent6212cc64aacb07141a8ba6d0fde747efc73b682e (diff)
downloadscummvm-rg350-dd143adbaaf21dfc19b7ad20a2e6243164ddfc39.tar.gz
scummvm-rg350-dd143adbaaf21dfc19b7ad20a2e6243164ddfc39.tar.bz2
scummvm-rg350-dd143adbaaf21dfc19b7ad20a2e6243164ddfc39.zip
FULLPIPE: Implement scene17_restoreState()
Diffstat (limited to 'engines/fullpipe/scenes')
-rw-r--r--engines/fullpipe/scenes/scene17.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/engines/fullpipe/scenes/scene17.cpp b/engines/fullpipe/scenes/scene17.cpp
index cd2a004804..ef9c0d2c0a 100644
--- a/engines/fullpipe/scenes/scene17.cpp
+++ b/engines/fullpipe/scenes/scene17.cpp
@@ -44,6 +44,32 @@ void scene17_initScene(Scene *sc) {
g_vars->scene17_hand = sc->getStaticANIObject1ById(ANI_HAND17, -1);
}
+void scene17_restoreState() {
+ if (g_fp->getObjectState(sO_UsherHand) == g_fp->getObjectEnumState(sO_UsherHand, sO_WithCoin)) {
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_ASK, 0);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_TOCYCLE, 0);
+
+ g_vars->scene17_handPhase = false;
+ } else {
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_ASK, 0);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_TOCYCLE, 1);
+
+ g_vars->scene17_handPhase = true;
+ }
+
+ g_fp->_floaters->init(g_fp->getGameLoaderGameVar()->getSubVarByName("SC_17"));
+
+ g_vars->scene17_flyState = g_fp->getObjectState(sO_Fly_17);
+
+ if (g_vars->scene17_flyState <= 0 ) {
+ g_vars->scene17_flyCountdown = g_fp->_rnd->getRandomNumber(600) + 600; // FIXME. Check
+
+ g_vars->scene17_flyState = g_fp->_rnd->getRandomNumber(4) + 1; // FIXME. Check
+ }
+
+ g_fp->setObjectState(sO_Fly_17, g_vars->scene17_flyState - 1);
+}
+
void sceneHandler17_drop() {
StaticANIObject *mug = g_fp->_currentScene->getStaticANIObject1ById(ANI_MUG_17, -1);
StaticANIObject *jet = g_fp->_currentScene->getStaticANIObject1ById(ANI_JET_17, -1);