diff options
Diffstat (limited to 'engines/mads')
-rw-r--r-- | engines/mads/configure.engine | 2 | ||||
-rw-r--r-- | engines/mads/detection_tables.h | 4 | ||||
-rw-r--r-- | engines/mads/nebular/game_nebular.cpp | 4 | ||||
-rw-r--r-- | engines/mads/nebular/menu_nebular.cpp | 26 | ||||
-rw-r--r-- | engines/mads/nebular/menu_nebular.h | 15 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes1.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/sound_nebular.cpp | 6 | ||||
-rw-r--r-- | engines/mads/resources.cpp | 4 |
8 files changed, 54 insertions, 9 deletions
diff --git a/engines/mads/configure.engine b/engines/mads/configure.engine index 60d833e9e8..412d65e180 100644 --- a/engines/mads/configure.engine +++ b/engines/mads/configure.engine @@ -1,3 +1,3 @@ # This file is included from the main "configure" script # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] -add_engine mads "Rex Nebular and the Cosmic Gender Bender" no +add_engine mads "Rex Nebular and the Cosmic Gender Bender" yes diff --git a/engines/mads/detection_tables.h b/engines/mads/detection_tables.h index 56df09577c..f0eb21f5d9 100644 --- a/engines/mads/detection_tables.h +++ b/engines/mads/detection_tables.h @@ -55,7 +55,7 @@ static const MADSGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformDOS, - ADGF_TESTING, + ADGF_NO_FLAGS, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE) }, GType_RexNebular, @@ -73,7 +73,7 @@ static const MADSGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformDOS, - ADGF_TESTING, + ADGF_NO_FLAGS, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE) }, GType_RexNebular, diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp index 1976bcb928..5526845552 100644 --- a/engines/mads/nebular/game_nebular.cpp +++ b/engines/mads/nebular/game_nebular.cpp @@ -118,6 +118,10 @@ void GameNebular::startGame() { initializeGlobals(); + if (_loadGameSlot >= 0) + // User selected to resume a savegame + return; + // Check copy protection ProtectionResult protectionResult = checkCopyProtection(); 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; diff --git a/engines/mads/nebular/menu_nebular.h b/engines/mads/nebular/menu_nebular.h index 35af0bb34f..8a0cc3575d 100644 --- a/engines/mads/nebular/menu_nebular.h +++ b/engines/mads/nebular/menu_nebular.h @@ -35,7 +35,10 @@ class MADSEngine; namespace Nebular { -enum MADSGameAction { START_GAME, RESUME_GAME, SHOW_INTRO, CREDITS, QUOTES, EXIT }; +enum MADSGameAction { + START_GAME, RESUME_GAME, SHOW_INTRO, CREDITS, QUOTES, EXIT, + SETS, EVOLVE +}; class MainMenu: public MenuView { private: @@ -45,6 +48,7 @@ private: int _frameIndex; uint32 _delayTimeout; bool _skipFlag; + bool _showEvolve, _showSets; /** * Currently highlighted menu item @@ -81,7 +85,16 @@ private: */ void addSpriteSlot(); + /** + * Returns true if the Quotes item should be shown. + * i.e. if the player has completed the game + */ bool shouldShowQuotes(); + + /** + * Show the bonus item icons, if available + */ + void showBonusItems(); protected: /** * Display the menu diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp index c33ce7f780..9207d87be7 100644 --- a/engines/mads/nebular/nebular_scenes1.cpp +++ b/engines/mads/nebular/nebular_scenes1.cpp @@ -84,7 +84,7 @@ void Scene1xx::setPlayerSpritesPrefix() { } else if (_scene->_nextSceneId == 112) _game._player._spritesPrefix = ""; - if (oldName == _game._player._spritesPrefix) + if (oldName != _game._player._spritesPrefix) _game._player._spritesChanged = true; if (_scene->_nextSceneId == 105 || (_scene->_nextSceneId == 109 && _globals[kHoovicAlive])) { diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp index 711f82a05b..4c360b23d5 100644 --- a/engines/mads/nebular/sound_nebular.cpp +++ b/engines/mads/nebular/sound_nebular.cpp @@ -216,6 +216,8 @@ ASound::ASound(Audio::Mixer *mixer, OPL::OPL *opl, const Common::String &filenam } ASound::~ASound() { + _opl->stop(); + Common::List<CachedDataEntry>::iterator i; for (i = _dataCache.begin(); i != _dataCache.end(); ++i) delete[] (*i)._data; @@ -2025,8 +2027,8 @@ const ASound4::CommandPtr ASound4::_commandList[61] = { &ASound4::nullCommand, &ASound4::nullCommand, &ASound4::nullCommand, &ASound4::command43, &ASound4::nullCommand, &ASound4::nullCommand, &ASound4::nullCommand, &ASound4::nullCommand, &ASound4::nullCommand, &ASound4::nullCommand, &ASound4::nullCommand, &ASound4::nullCommand, - &ASound4::nullCommand, &ASound4::nullCommand, &ASound4::nullCommand, &ASound4::nullCommand, - &ASound4::nullCommand, &ASound4::command57, &ASound4::nullCommand, &ASound4::command59, + &ASound4::command52, &ASound4::command53, &ASound4::command54, &ASound4::command55, + &ASound4::command56, &ASound4::command57, &ASound4::command58, &ASound4::command59, &ASound4::command60 }; diff --git a/engines/mads/resources.cpp b/engines/mads/resources.cpp index d5352fb205..3b7cf2cab0 100644 --- a/engines/mads/resources.cpp +++ b/engines/mads/resources.cpp @@ -151,7 +151,7 @@ void HagArchive::loadIndex(MADSEngine *vm) { Common::File hagFile; for (int sectionIndex = -1; sectionIndex < 11; ++sectionIndex) { - if (sectionIndex == 0) + if (sectionIndex == 0 && !Common::File::exists("SECTION0.HAG")) continue; // Dragonsphere does not have some sections - skip them @@ -239,7 +239,7 @@ Common::String HagArchive::getResourceFilename(const Common::String &resourceNam int value = atoi(resourceName.c_str() + 2); int hagFileNum = (resType == RESTYPE_ROOM) ? value / 100 : value; - if (hagFileNum > 0) + if (hagFileNum >= 0) outputFilename = Common::String::format("SECTION%d.HAG", hagFileNum); } |