diff options
-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 { |