diff options
author | Eugene Sandulenko | 2014-02-01 22:11:50 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-02-01 22:25:53 +0200 |
commit | 1a77fba3f9c8b5b980c814335950731c3063a908 (patch) | |
tree | 2ac6c914b20531183f75b2070219cc55b0222d79 | |
parent | 5cf538bc01d8a29d268415238b9b8d021f8f0915 (diff) | |
download | scummvm-rg350-1a77fba3f9c8b5b980c814335950731c3063a908.tar.gz scummvm-rg350-1a77fba3f9c8b5b980c814335950731c3063a908.tar.bz2 scummvm-rg350-1a77fba3f9c8b5b980c814335950731c3063a908.zip |
FULLPIPE: Starter ModalHelp implementation
-rw-r--r-- | engines/fullpipe/constants.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/modal.cpp | 23 | ||||
-rw-r--r-- | engines/fullpipe/modal.h | 11 |
3 files changed, 34 insertions, 1 deletions
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: @@ -163,8 +164,16 @@ 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; } |