diff options
author | Paul Gilbert | 2014-09-06 17:55:01 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-09-06 17:55:01 -0400 |
commit | 94068dddf7af94e3d9d784056b310f16f000db92 (patch) | |
tree | 4db1cb7005a6fe4d9265bd2fafb1a9e7c7ffa88b /engines/mads/nebular | |
parent | 5e099e90bcdfb87c289b919ddac60e60fbf6bdd7 (diff) | |
download | scummvm-rg350-94068dddf7af94e3d9d784056b310f16f000db92.tar.gz scummvm-rg350-94068dddf7af94e3d9d784056b310f16f000db92.tar.bz2 scummvm-rg350-94068dddf7af94e3d9d784056b310f16f000db92.zip |
MADS: Properly free menu items when main menu is freed
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r-- | engines/mads/nebular/dialogs_nebular.cpp | 4 | ||||
-rw-r--r-- | engines/mads/nebular/menu_nebular.cpp | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp index f5702ccb31..1792dabb15 100644 --- a/engines/mads/nebular/dialogs_nebular.cpp +++ b/engines/mads/nebular/dialogs_nebular.cpp @@ -607,6 +607,9 @@ void FullScreenDialog::display() { _vm->_screen.setClipBounds(Common::Rect(0, DIALOG_TOP, MADS_SCREEN_WIDTH, DIALOG_TOP + MADS_SCENE_HEIGHT)); _vm->_game->_scene.restrictScene(); + + if (_screenId > 0) + scene._spriteSlots.fullRefresh(); } /*------------------------------------------------------------------------*/ @@ -966,6 +969,7 @@ void GameDialog::refreshText() { DifficultyDialog::DifficultyDialog(MADSEngine *vm) : GameDialog(vm) { setLines(); + _vm->_palette->resetGamePalette(4, 8); } void DifficultyDialog::setLines() { diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp index 6e55b9c18f..85d9adf974 100644 --- a/engines/mads/nebular/menu_nebular.cpp +++ b/engines/mads/nebular/menu_nebular.cpp @@ -102,6 +102,13 @@ MainMenu::MainMenu(MADSEngine *vm): MenuView(vm) { } MainMenu::~MainMenu() { + Scene &scene = _vm->_game->_scene; + for (int i = 0; i < 7; ++i) { + if (_menuItemIndexes[i] != -1) + scene._sprites.remove(_menuItemIndexes[i]); + } + + scene._spriteSlots.reset(); } void MainMenu::display() { |