diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/avalanche.cpp | 8 | ||||
-rw-r--r-- | engines/avalanche/avalanche.h | 2 | ||||
-rw-r--r-- | engines/avalanche/avalot.cpp | 3 | ||||
-rw-r--r-- | engines/avalanche/avalot.h | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index 4b51c8babd..f5013cd338 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -57,11 +57,14 @@ AvalancheEngine::~AvalancheEngine() { delete _rnd; delete _graphics; + + delete _avalot; } Common::ErrorCode AvalancheEngine::initialize() { _graphics = new Graphics(this); + _avalot = new Avalot(this); _gyro.setParent(this); _enhanced.setParent(this); _logger.setParent(this); @@ -78,7 +81,6 @@ Common::ErrorCode AvalancheEngine::initialize() { _basher.setParent(this); _dropdown.setParent(this); _closing.setParent(this); - _avalot.setParent(this); _graphics->init(); @@ -124,7 +126,7 @@ void AvalancheEngine::updateEvents() { while (_eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_KEYDOWN: - _avalot.handleKeyDown(event); + _avalot->handleKeyDown(event); } } } @@ -258,7 +260,7 @@ void AvalancheEngine::demo() { void AvalancheEngine::run_avalot() { bflight_on(); - _avalot.run(Common::String(runcodes[first_time]) + arguments); + _avalot->run(Common::String(runcodes[first_time]) + arguments); // TODO: Check if parameteres are ever used (probably not) and eventually remove them. // If there's an error initalizing avalot, i'll handle it in there, not here diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h index 676f3f909a..c6c4b2c618 100644 --- a/engines/avalanche/avalanche.h +++ b/engines/avalanche/avalanche.h @@ -67,7 +67,7 @@ class AvalancheEngine : public Engine { public: Graphics *_graphics; - Avalot _avalot; + Avalot *_avalot; Gyro _gyro; Enhanced _enhanced; Logger _logger; diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index 9e64ae4ab4..61d5ad34e4 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -57,12 +57,11 @@ namespace Avalanche { -void Avalot::setParent(AvalancheEngine *vm) { +Avalot::Avalot(AvalancheEngine *vm) { _vm = vm; } - void Avalot::setup() { int16 gd, gm; diff --git a/engines/avalanche/avalot.h b/engines/avalanche/avalot.h index d309138c5a..138d4b3ff6 100644 --- a/engines/avalanche/avalot.h +++ b/engines/avalanche/avalot.h @@ -38,7 +38,7 @@ class AvalancheEngine; class Avalot { public: - void setParent(AvalancheEngine *vm); + Avalot(AvalancheEngine *vm); void setup(); |