aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular/menu_nebular.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-11-16 22:25:53 -0500
committerPaul Gilbert2015-11-16 22:25:53 -0500
commitf96a108503844e66b3072447fe46eace8f54df16 (patch)
treea6c83a81345d3cee312e6a675ec5bdd556aedbf1 /engines/mads/nebular/menu_nebular.cpp
parent0f530e06be47c724a096796eb735aaeffa7810f8 (diff)
downloadscummvm-rg350-f96a108503844e66b3072447fe46eace8f54df16.tar.gz
scummvm-rg350-f96a108503844e66b3072447fe46eace8f54df16.tar.bz2
scummvm-rg350-f96a108503844e66b3072447fe46eace8f54df16.zip
MADS: Add buttons to the main menu to show the secret bonus animations
The buttons will only appear if section0.hag is present, along with evolve.res and/or sets.res. The Evolve animation works, but the Sets animation still needs some work, since something funky is happening with palette usage
Diffstat (limited to 'engines/mads/nebular/menu_nebular.cpp')
-rw-r--r--engines/mads/nebular/menu_nebular.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index 6fe17f3beb..0520294b29 100644
--- a/engines/mads/nebular/menu_nebular.cpp
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -48,6 +48,7 @@ MainMenu::MainMenu(MADSEngine *vm): MenuView(vm) {
_highlightedIndex = -1;
_selectedIndex = -1;
_buttonDown = false;
+ _showEvolve = _showSets = false;
for (int i = 0; i < 7; ++i)
_menuItems[i] = nullptr;
@@ -137,12 +138,14 @@ void MainMenu::doFrame() {
}
_vm->_events->showCursor();
+ showBonusItems();
} else {
if ((_menuItemIndex == -1) || (_frameIndex == 0)) {
if (++_menuItemIndex == 6) {
// Reached end of display animation
_vm->_events->showCursor();
+ showBonusItems();
return;
} else if (_menuItemIndex == 4 && !shouldShowQuotes()) {
++_menuItemIndex;
@@ -180,6 +183,17 @@ void MainMenu::addSpriteSlot() {
_redrawFlag = true;
}
+void MainMenu::showBonusItems() {
+ Scene &scene = _vm->_game->_scene;
+ _showEvolve = Common::File::exists("SECTION0.HAG") && Common::File::exists("evolve.res");
+ _showSets = Common::File::exists("SECTION0.HAG") && Common::File::exists("sets.res");
+
+ if (_showSets)
+ scene._kernelMessages.add(Common::Point(290, 143), 0x4140, 0, 0, 0, "S");
+ if (_showEvolve)
+ scene._kernelMessages.add(Common::Point(305, 143), 0x4140, 0, 0, 0, "E");
+}
+
bool MainMenu::onEvent(Common::Event &event) {
Scene &scene = _vm->_game->_scene;
if (_selectedIndex != -1)
@@ -280,6 +294,10 @@ bool MainMenu::onEvent(Common::Event &event) {
_selectedIndex = _highlightedIndex;
unhighlightItem();
_frameIndex = 0;
+ } else if (_showSets && Common::Rect(290, 165, 300, 185).contains(event.mouse)) {
+ handleAction(SETS);
+ } else if (_showEvolve && Common::Rect(305, 165, 315, 185).contains(event.mouse)) {
+ handleAction(EVOLVE);
}
return true;
@@ -334,6 +352,14 @@ void MainMenu::handleAction(MADSGameAction action) {
TextView::execute(_vm, "quotes");
return;
+ case SETS:
+ AnimationView::execute(_vm, "sets");
+ break;
+
+ case EVOLVE:
+ AnimationView::execute(_vm, "evolve");
+ break;
+
case EXIT:
_vm->_dialogs->_pendingDialog = DIALOG_ADVERT;
break;