From 19bf8cf4bf0081cea7c1f531808ac0c2bed146a7 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 23 Jan 2014 11:55:01 -0800 Subject: FULLPIPE: Implement sceneHandlerFinal_startFinal() --- engines/fullpipe/constants.h | 1 + engines/fullpipe/modal.h | 12 ++++++++++++ engines/fullpipe/scenes/sceneFinal.cpp | 17 ++++++++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index d9dda00091..e25a6f464a 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -1359,6 +1359,7 @@ namespace Fullpipe { #define MSG_FIN_STARTFINAL 5025 #define MSG_FN4_STARTMUSIC 5356 #define QU_FIN1_FALLCOIN 5018 +#define QU_FIN1_TAKECOIN 5023 #define QU_FN2_DOFINAL 5066 #define QU_FN3_DOFINAL 5072 #define QU_FN4_DOFINAL 5108 diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h index af52e1b6a9..65210aaab3 100644 --- a/engines/fullpipe/modal.h +++ b/engines/fullpipe/modal.h @@ -106,6 +106,18 @@ class ModalMap : public BaseModalObject { PictureObject *getScenePicture(); }; +class ModalFinal : public BaseModalObject { + public: + ModalFinal() {} + virtual ~ModalFinal() {} + + virtual bool pollEvent() { return true; } + virtual bool handleMessage(ExCommand *message) { return false; } + virtual bool init(int counterdiff) { return true; } + virtual void update() {} + virtual void saveload() {} +}; + } // End of namespace Fullpipe #endif /* FULLPIPE_MODAL_H */ diff --git a/engines/fullpipe/scenes/sceneFinal.cpp b/engines/fullpipe/scenes/sceneFinal.cpp index 6ba72de8b4..e483e8bab7 100644 --- a/engines/fullpipe/scenes/sceneFinal.cpp +++ b/engines/fullpipe/scenes/sceneFinal.cpp @@ -33,6 +33,8 @@ #include "fullpipe/interaction.h" #include "fullpipe/behavior.h" +#include "fullpipe/modal.h" + namespace Fullpipe { @@ -93,7 +95,20 @@ void sceneHandlerFinal_goto2() { } void sceneHandlerFinal_startFinal() { - warning("STUB: sceneHandlerFinal_startFinal()"); + g_vars->sceneFinal_var01 = 1; + + getCurrSceneSc2MotionController()->clearEnabled(); + getGameLoaderInteractionController()->disableFlag24(); + + g_fp->_aniMan2 = 0; + + g_fp->_aniMan->_flags &= 0xFFFB; + + chainQueue(QU_FIN1_TAKECOIN, 1); + + g_fp->playTrack(g_fp->getGameLoaderGameVar()->getSubVarByName("SC_FINAL1"), "MUSIC2", 1); + + g_fp->_modalObject = new ModalFinal; } void sceneHandlerFinal_fallCoin() { -- cgit v1.2.3