aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-02 16:27:09 +0200
committerEugene Sandulenko2014-01-02 16:27:09 +0200
commita48ce090c2413edebd4054304637c4fdc41478f6 (patch)
tree75b05f9cbd865cc721a04df03e8725540e0e4546
parent7331a7cbefed7be415da170a32a2549b1c18fd12 (diff)
downloadscummvm-rg350-a48ce090c2413edebd4054304637c4fdc41478f6.tar.gz
scummvm-rg350-a48ce090c2413edebd4054304637c4fdc41478f6.tar.bz2
scummvm-rg350-a48ce090c2413edebd4054304637c4fdc41478f6.zip
FULLPIPE: Implement sceneHandler20()
-rw-r--r--engines/fullpipe/constants.h1
-rw-r--r--engines/fullpipe/scenes/scene20.cpp41
2 files changed, 42 insertions, 0 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index e99f8831ce..03c9984bcf 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -725,6 +725,7 @@ namespace Fullpipe {
// Scene 20
#define ANI_GRANDMA_20 2427
+#define MSG_SC20_UPDATELOCKABLE 5217
#define ST_GMA20_FLOOR 2429
#define ST_GMA20_STAND 2436
#define ST_GMA20_STOOL 2432
diff --git a/engines/fullpipe/scenes/scene20.cpp b/engines/fullpipe/scenes/scene20.cpp
index 45d59718d6..d349b25999 100644
--- a/engines/fullpipe/scenes/scene20.cpp
+++ b/engines/fullpipe/scenes/scene20.cpp
@@ -98,4 +98,45 @@ void scene20_initScene(Scene *sc) {
g_vars->scene20_var05 = g_fp->_rnd->getRandomNumber(200) + 400;
}
+void sceneHandler20_updateFlies() {
+ warning("STUB: sceneHandler20_updateFlies()");
+}
+
+int sceneHandler20(ExCommand *cmd) {
+ if (cmd->_messageKind != 17)
+ return 0;
+
+ switch (cmd->_messageNum) {
+ case MSG_SC20_UPDATELOCKABLE:
+ scene20_setExits(g_fp->_currentScene);
+ break;
+
+ case 33:
+ if (g_fp->_aniMan2) {
+ int x = g_fp->_aniMan2->_ox;
+
+ if (x < g_fp->_sceneRect.left + g_vars->scene20_var01)
+ g_fp->_currentScene->_x = x - g_vars->scene20_var03 - g_fp->_sceneRect.left;
+
+ if (x > g_fp->_sceneRect.right - g_vars->scene20_var01)
+ g_fp->_currentScene->_x = x + g_vars->scene20_var03 - g_fp->_sceneRect.right;
+ }
+
+ --g_vars->scene20_var05;
+
+ if (g_vars->scene20_var05 <= 0)
+ sceneHandler20_updateFlies();
+
+ g_fp->_floaters->update();
+
+ g_fp->_behaviorManager->updateBehaviors();
+
+ g_fp->startSceneTrack();
+
+ break;
+ }
+
+ return 0;
+}
+
} // End of namespace Fullpipe