aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
Diffstat (limited to 'engines/avalanche')
-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.