From 1a77fba3f9c8b5b980c814335950731c3063a908 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 1 Feb 2014 22:11:50 +0200 Subject: FULLPIPE: Starter ModalHelp implementation --- engines/fullpipe/constants.h | 1 + engines/fullpipe/modal.cpp | 23 +++++++++++++++++++++++ engines/fullpipe/modal.h | 11 ++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 91882173c5..70b77d2194 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -215,6 +215,7 @@ namespace Fullpipe { #define SC_INTRO2 3907 #define SC_INV 858 #define SC_LDR 635 +#define SC_MAINMENU 4620 #define SC_MAP 5222 #define SC_TITLES 5166 #define SND_CMN_031 3516 diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index f52dc95a7c..f80d96b3cf 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -755,6 +755,29 @@ ModalMainMenu::ModalMainMenu() { _field_34 = 0; } +ModalHelp::ModalHelp() { + _mainMenuScene = 0; + _bg = 0; + _isRunning = false; + _rect = g_fp->_sceneRect; + _hx = g_fp->_currentScene->_x; + _hy = g_fp->_currentScene->_y; + + g_fp->_sceneRect.left = 0; + g_fp->_sceneRect.bottom = 600; + g_fp->_sceneRect.top = 0; + g_fp->_sceneRect.right = 800; +} + +ModalHelp::~ModalHelp() { + g_fp->_gameLoader->unloadScene(SC_MAINMENU); + + g_fp->_sceneRect = _rect; + + g_fp->_currentScene->_x = _hx; + g_fp->_currentScene->_y = _hy; +} + void FullpipeEngine::openHelp() { warning("STUB: FullpipeEngine::openHelp()"); } diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h index 72d439f8af..0cb3c3096b 100644 --- a/engines/fullpipe/modal.h +++ b/engines/fullpipe/modal.h @@ -26,6 +26,7 @@ namespace Fullpipe { class PictureObject; +class Picture; class BaseModalObject { public: @@ -162,9 +163,17 @@ public: }; class ModalHelp : public BaseModalObject { +public: + Scene *_mainMenuScene; + Picture *_bg; + bool _isRunning; + Common::Rect _rect; + int _hx; + int _hy; + public: ModalHelp(); - virtual ~ModalHelp() {} + virtual ~ModalHelp(); virtual bool pollEvent() { return true; } virtual bool handleMessage(ExCommand *message) { return false; } -- cgit v1.2.3