[Scummvm-cvs-logs] scummvm master -> 94068dddf7af94e3d9d784056b310f16f000db92
dreammaster
dreammaster at scummvm.org
Sat Sep 6 23:55:39 CEST 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
94068dddf7 MADS: Properly free menu items when main menu is freed
Commit: 94068dddf7af94e3d9d784056b310f16f000db92
https://github.com/scummvm/scummvm/commit/94068dddf7af94e3d9d784056b310f16f000db92
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-09-06T17:55:01-04:00
Commit Message:
MADS: Properly free menu items when main menu is freed
Changed paths:
engines/mads/nebular/dialogs_nebular.cpp
engines/mads/nebular/menu_nebular.cpp
engines/mads/scene_data.cpp
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index f5702cc..1792dab 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 6e55b9c..85d9adf 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() {
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index 66848ca..174579a 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -232,11 +232,11 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
infoFile.close();
if (_vm->getGameID() == GType_RexNebular) {
- loadMadsV1Background(sceneId, resName, flags, bgSurface);
- loadPalette(sceneId, _artFileNum, resName, flags, bgSurface);
+ loadMadsV1Background(_sceneId, resName, flags, bgSurface);
+ loadPalette(_sceneId, _artFileNum, resName, flags, bgSurface);
} else {
- loadMadsV2Background(sceneId, resName, flags, bgSurface);
- loadPalette(sceneId, sceneId, resName, flags, bgSurface);
+ loadMadsV2Background(_sceneId, resName, flags, bgSurface);
+ loadPalette(_sceneId, _sceneId, resName, flags, bgSurface);
}
Common::Array<SpriteAsset *> spriteSets;
More information about the Scummvm-git-logs
mailing list