aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2013-07-24 18:12:16 +0200
committeruruk2013-07-24 18:12:16 +0200
commitcc6197d77f9fc97243473f59cda144f95c0b25c3 (patch)
tree0b676e3bea98baaba94ab1fd269faefa253c03f7 /engines
parent8c5ce549e655a0f739cd161ed33efa6750a8fd95 (diff)
downloadscummvm-rg350-cc6197d77f9fc97243473f59cda144f95c0b25c3.tar.gz
scummvm-rg350-cc6197d77f9fc97243473f59cda144f95c0b25c3.tar.bz2
scummvm-rg350-cc6197d77f9fc97243473f59cda144f95c0b25c3.zip
AVALANCHE: Change _avalot into pointer, update everything accordingly.
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/avalanche.cpp8
-rw-r--r--engines/avalanche/avalanche.h2
-rw-r--r--engines/avalanche/avalot.cpp3
-rw-r--r--engines/avalanche/avalot.h2
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();