aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-03-07 09:01:12 +0100
committeruruk2014-03-07 09:01:28 +0100
commitea5bd95492f9848236f4194d182a91bca1a3dab0 (patch)
tree4694f768efc6e4618904c4e6a14d6e04fc39e9d0
parent62e58fd6b8faaa8391a9244ab9f4e54f8a5418f0 (diff)
downloadscummvm-rg350-ea5bd95492f9848236f4194d182a91bca1a3dab0.tar.gz
scummvm-rg350-ea5bd95492f9848236f4194d182a91bca1a3dab0.tar.bz2
scummvm-rg350-ea5bd95492f9848236f4194d182a91bca1a3dab0.zip
AVALANACHE: Rework use of MainMenu.
-rw-r--r--engines/avalanche/avalanche.cpp3
-rw-r--r--engines/avalanche/avalanche.h1
-rw-r--r--engines/avalanche/avalot.cpp8
3 files changed, 6 insertions, 6 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 3f83f82191..3b1ca6026d 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -58,7 +58,6 @@ AvalancheEngine::AvalancheEngine(OSystem *syst, const AvalancheGameDescription *
_ghostroom = nullptr;
_help = nullptr;
_shootemup = nullptr;
- _mainmenu = nullptr;
_platform = gd->desc.platform;
initVariables();
@@ -84,7 +83,6 @@ AvalancheEngine::~AvalancheEngine() {
delete _ghostroom;
delete _help;
delete _shootemup;
- delete _mainmenu;
for (int i = 0; i < 31; i++) {
for (int j = 0; j < 2; j++) {
@@ -170,7 +168,6 @@ Common::ErrorCode AvalancheEngine::initialize() {
_ghostroom = new GhostRoom(this);
_help = new Help(this);
_shootemup = new ShootEmUp(this);
- _mainmenu = new MainMenu(this);
_graphics->init();
_dialogs->init();
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index 41ec00e6a5..1eec79f28c 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -92,7 +92,6 @@ public:
GhostRoom *_ghostroom;
Help *_help;
ShootEmUp *_shootemup;
- MainMenu *_mainmenu;
OSystem *_system;
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index ae96ac4c74..8f619e6a13 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -190,7 +190,6 @@ void AvalancheEngine::setup() {
_animation->resetAnims();
- drawToolbar();
_dialogs->setReadyLight(2);
fadeIn();
@@ -210,12 +209,17 @@ void AvalancheEngine::setup() {
loadGame(loadSlot);
} else {
- _mainmenu->run();
+ // We don't need the MainMenu during the whole game, only at the beginning of it.
+ MainMenu *mainmenu = new MainMenu(this);
+ mainmenu->run();
+ delete mainmenu;
if (_letMeOut)
return;
newGame();
+ drawToolbar();
+
thinkAbout(kObjectMoney, kThing);
_dialogs->displayScrollChain('Q', 83); // Info on the game, etc.