aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/scenes.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2013-10-28 00:49:26 +0200
committerEugene Sandulenko2013-10-28 01:00:06 +0200
commit0d4055fe7f68c7cff2d69b1a3d9340061434bafc (patch)
treefb8a2e90bc13923a8d69489c83d6f5edb212760f /engines/fullpipe/scenes.cpp
parent09128132c712d183875f62290f4683b1d3342791 (diff)
downloadscummvm-rg350-0d4055fe7f68c7cff2d69b1a3d9340061434bafc.tar.gz
scummvm-rg350-0d4055fe7f68c7cff2d69b1a3d9340061434bafc.tar.bz2
scummvm-rg350-0d4055fe7f68c7cff2d69b1a3d9340061434bafc.zip
FULLPIPE: Implement sceneHandlerIntro()
Diffstat (limited to 'engines/fullpipe/scenes.cpp')
-rw-r--r--engines/fullpipe/scenes.cpp53
1 files changed, 51 insertions, 2 deletions
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 40d9f21afb..1793ffdc3a 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -1422,8 +1422,57 @@ void sceneIntro_initScene(Scene *sc) {
g_fullpipe->_modalObject = new ModalIntro;
}
-int sceneHandlerIntro(ExCommand *cmd) {
- warning("STUB: sceneHandlerIntro()");
+void sceneHandlerIntro_part1() {
+ g_fullpipe->_currentScene = g_fullpipe->accessScene(SC_INTRO1);
+ chainQueue(QU_INTR_FINISH, 0);
+}
+
+void sceneHandlerIntro_part2() {
+ g_fullpipe->_currentScene = g_fullpipe->accessScene(SC_INTRO2);
+ chainQueue(QU_IN2_DO, 0);
+}
+
+int sceneHandlerIntro(ExCommand *ex) {
+ if (ex->_messageKind != 17)
+ return 0;
+
+ switch (ex->_messageNum) {
+ case MSG_INTR_ENDINTRO:
+ g_vars->sceneIntro_playing = 0;
+ return 0;
+
+ case MSG_INTR_SWITCHTO1:
+ sceneHandlerIntro_part1();
+ return 0;
+
+ case MSG_INTR_GETUPMAN:
+ g_vars->sceneIntro_needSleep = 0;
+ g_vars->sceneIntro_needGetup = 1;
+ return 0;
+
+ case MSG_INTR_SWITCHTO2:
+ sceneHandlerIntro_part2();
+ return 0;
+
+ case 33:
+ // fall trhough
+ break;
+
+ default:
+ return 0;
+ }
+
+ if (g_vars->sceneIntro_needSleep) {
+ if (!g_vars->sceneIntro_aniin1man->_movement && g_vars->sceneIntro_aniin1man->_statics->_staticsId == ST_IN1MAN_SLEEP)
+ g_vars->sceneIntro_aniin1man->startAnim(MV_IN1MAN_SLEEP, 0, -1);
+ } else if (g_vars->sceneIntro_needGetup && !g_vars->sceneIntro_aniin1man->_movement &&
+ g_vars->sceneIntro_aniin1man->_statics->_staticsId == ST_IN1MAN_SLEEP) {
+ g_vars->sceneIntro_needGetup = 0;
+
+ chainQueue(QU_INTR_GETUPMAN, 0);
+ }
+
+ g_fullpipe->startSceneTrack();
return 0;
}