[Scummvm-cvs-logs] scummvm master -> da157fbccc7e094f16bc78e2ddadfc2ea29676f4

urukgit urukgit at users.noreply.github.com
Fri Mar 7 09:04:57 CET 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:
da157fbccc AVALANCHE: Rework use of ShootEmUp.


Commit: da157fbccc7e094f16bc78e2ddadfc2ea29676f4
    https://github.com/scummvm/scummvm/commit/da157fbccc7e094f16bc78e2ddadfc2ea29676f4
Author: uruk (koppirnyo at gmail.com)
Date: 2014-03-07T00:04:27-08:00

Commit Message:
AVALANCHE: Rework use of ShootEmUp.

Changed paths:
    engines/avalanche/avalanche.cpp
    engines/avalanche/avalanche.h
    engines/avalanche/timer.cpp



diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 3b1ca60..1bc4c53 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -57,7 +57,6 @@ AvalancheEngine::AvalancheEngine(OSystem *syst, const AvalancheGameDescription *
 	_nim = nullptr;
 	_ghostroom = nullptr;
 	_help = nullptr;
-	_shootemup = nullptr;
 
 	_platform = gd->desc.platform;
 	initVariables();
@@ -82,7 +81,6 @@ AvalancheEngine::~AvalancheEngine() {
 	delete _nim;
 	delete _ghostroom;
 	delete _help;
-	delete _shootemup;
 
 	for (int i = 0; i < 31; i++) {
 		for (int j = 0; j < 2; j++) {
@@ -167,7 +165,6 @@ Common::ErrorCode AvalancheEngine::initialize() {
 	_nim = new Nim(this);
 	_ghostroom = new GhostRoom(this);
 	_help = new Help(this);
-	_shootemup = new ShootEmUp(this);
 
 	_graphics->init();
 	_dialogs->init();
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index 1eec79f..fcca396 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -91,7 +91,6 @@ public:
 	Nim *_nim;
 	GhostRoom *_ghostroom;
 	Help *_help;
-	ShootEmUp *_shootemup;
 
 	OSystem *_system;
 
diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp
index c361203..7b6e1ee 100644
--- a/engines/avalanche/timer.cpp
+++ b/engines/avalanche/timer.cpp
@@ -331,7 +331,10 @@ void Timer::hangAround2() {
 
 	_vm->_tiedUp = false;
 
-	_vm->_shootemup->run();
+	// We don't need the ShootEmUp during the whole game, it's only playable once.
+	ShootEmUp *shootemup = new ShootEmUp(_vm);
+	shootemup->run();
+	delete shootemup;
 }
 
 void Timer::afterTheShootemup() {






More information about the Scummvm-git-logs mailing list