diff options
author | Paul Gilbert | 2014-10-18 11:42:11 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-10-18 11:42:11 -0400 |
commit | a657c3982447704c9262926f853875ca80e7a7c4 (patch) | |
tree | 01a217ed3288c6def88bc0bd91fc2eb5fe33593e /engines | |
parent | 72303564f70573dc4bacd9c726dc626920bf21e8 (diff) | |
download | scummvm-rg350-a657c3982447704c9262926f853875ca80e7a7c4.tar.gz scummvm-rg350-a657c3982447704c9262926f853875ca80e7a7c4.tar.bz2 scummvm-rg350-a657c3982447704c9262926f853875ca80e7a7c4.zip |
MADS: Only show Quotes main menu item after winning the game
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/nebular/menu_nebular.cpp | 14 | ||||
-rw-r--r-- | engines/mads/nebular/menu_nebular.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp index 46dc411678..f2f90e2291 100644 --- a/engines/mads/nebular/menu_nebular.cpp +++ b/engines/mads/nebular/menu_nebular.cpp @@ -21,6 +21,7 @@ */ #include "common/scummsys.h" +#include "common/config-manager.h" #include "mads/game.h" #include "mads/mads.h" #include "mads/menu_views.h" @@ -62,6 +63,10 @@ MainMenu::~MainMenu() { scene._spriteSlots.reset(); } +bool MainMenu::shouldShowQuotes() { + return ConfMan.hasKey("ShowQuotes") && ConfMan.getBool("ShowQuotes"); +} + void MainMenu::display() { MenuView::display(); Scene &scene = _vm->_game->_scene; @@ -101,6 +106,9 @@ void MainMenu::doFrame() { handleAction((MADSGameAction)_selectedIndex); } else { for (_menuItemIndex = 0; _menuItemIndex < 6; ++_menuItemIndex) { + if (_menuItemIndex == 4 && !shouldShowQuotes()) + continue; + if (_menuItemIndex != _selectedIndex) { addSpriteSlot(); } @@ -120,6 +128,9 @@ void MainMenu::doFrame() { if (_skipFlag && _menuItemIndex >= 0) { // Quickly loop through all the menu items to display each's final frame for (; _menuItemIndex < 6; ++_menuItemIndex) { + if (_menuItemIndex == 4 && !shouldShowQuotes()) + continue; + // Draw the final frame of the menuitem _frameIndex = 0; addSpriteSlot(); @@ -129,9 +140,12 @@ void MainMenu::doFrame() { } else { if ((_menuItemIndex == -1) || (_frameIndex == 0)) { if (++_menuItemIndex == 6) { + // Reached end of display animation _vm->_events->showCursor(); return; + } else if (_menuItemIndex == 4 && !shouldShowQuotes()) { + ++_menuItemIndex; } _frameIndex = _menuItems[_menuItemIndex]->getCount() - 1; diff --git a/engines/mads/nebular/menu_nebular.h b/engines/mads/nebular/menu_nebular.h index d00439c1e4..77b8b6fc6e 100644 --- a/engines/mads/nebular/menu_nebular.h +++ b/engines/mads/nebular/menu_nebular.h @@ -80,6 +80,8 @@ private: * Add a sprite slot for the current menuitem frame */ void addSpriteSlot(); + + bool shouldShowQuotes(); protected: /** * Display the menu |