diff options
author | Eugene Sandulenko | 2014-04-10 06:21:46 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-04-10 06:21:46 +0300 |
commit | d991a139f056c52dd15ac2a931bfcca317273f94 (patch) | |
tree | 0ebb53946db6f6f753c2060fc47ab5d09e5889b5 /engines/fullpipe | |
parent | a30c646cae0602e78d0bec73fee6637e24c4ced2 (diff) | |
download | scummvm-rg350-d991a139f056c52dd15ac2a931bfcca317273f94.tar.gz scummvm-rg350-d991a139f056c52dd15ac2a931bfcca317273f94.tar.bz2 scummvm-rg350-d991a139f056c52dd15ac2a931bfcca317273f94.zip |
FULLPIPE: Implement ModalMainMenu::enableDebugMenu()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/modal.cpp | 20 | ||||
-rw-r--r-- | engines/fullpipe/modal.h | 8 |
2 files changed, 23 insertions, 5 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index 24730710d6..999bcc4544 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -752,11 +752,12 @@ void ModalCredits::update() { ModalMainMenu::ModalMainMenu() { _areas.clear(); - _mfield_2C = 0; + _lastArea = 0; _mfield_C = 0; _mfield_34 = 0; _scene = g_fp->accessScene(SC_MAINMENU); - _mfield_50 = 0; + _debugKeyCount = 0; + _sliderOffset = 0; _screct.left = g_fp->_sceneRect.left; _screct.top = g_fp->_sceneRect.top; _screct.right = g_fp->_sceneRect.right; @@ -855,6 +856,21 @@ bool ModalMainMenu::isSaveAllowed() { return true; } +void ModalMainMenu::enableDebugMenu(int objId, char c) { + const char deb[] = "DEBUGER"; + + if (c == deb[_debugKeyCount]) { + _debugKeyCount++; + + if (deb[_debugKeyCount] ) + return; + + enableDebugMenuButton(); + } + + _debugKeyCount = 0; +} + void ModalMainMenu::enableDebugMenuButton() { MenuArea *area; diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h index d1568cee8c..1530b6130a 100644 --- a/engines/fullpipe/modal.h +++ b/engines/fullpipe/modal.h @@ -160,13 +160,13 @@ public: Common::Array<MenuArea *> _areas; int _menuSliderIdx; int _musicSliderIdx; - int _mfield_2C; - int _mfield_30; + MenuArea *_lastArea; + int _sliderOffset; int _mfield_34; Common::Rect _screct; int _bgX; int _bgY; - int _mfield_50; + int _debugKeyCount; public: ModalMainMenu(); @@ -182,6 +182,8 @@ private: bool isSaveAllowed(); void enableDebugMenuButton(); void setSliderPos(); + void enableDebugMenu(int objId, char c); + }; class ModalHelp : public BaseModalObject { |