From 17fe756073b922cbfae0bcbcbe3f1a54de4d62f6 Mon Sep 17 00:00:00 2001 From: uruk Date: Sat, 29 Jun 2013 10:20:22 +0200 Subject: AVALANCHE: Repair class Avalot. --- engines/avalanche/avalanche.cpp | 1 + engines/avalanche/avalanche.h | 3 +++ engines/avalanche/avalot.cpp | 12 +++++++++--- engines/avalanche/avalot.h | 12 +++++++++--- 4 files changed, 22 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index f8dee8ea3f..d090f8aa2c 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -47,6 +47,7 @@ namespace Avalanche { _console = new AvalancheConsole(this); _rnd = 0; + _avalot.setParent(this); _gyro.setParent(this); _enhanced.setParent(this); _logger.setParent(this); diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h index 42523012fe..f7f5b5b6fd 100644 --- a/engines/avalanche/avalanche.h +++ b/engines/avalanche/avalanche.h @@ -29,6 +29,8 @@ #define AVALANCHE_H #include "avalanche/console.h" + +#include "avalanche/avalot.h" #include "avalanche/gyro2.h" #include "avalanche/enhanced2.h" #include "avalanche/logger2.h" @@ -57,6 +59,7 @@ static const int kSavegameVersion = 1; class AvalancheEngine : public Engine { public: + Avalot _avalot; Gyro _gyro; Enhanced _enhanced; Logger _logger; diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index 341efcadfd..11186d0357 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -28,6 +28,7 @@ #include "common/str.h" #include "common/textconsole.h" +#include "avalanche/avalanche.h" #include "avalanche/avalot.h" #include "avalanche/gyro2.h" @@ -37,9 +38,9 @@ namespace Avalanche { int16 gd, gm; checkbreak = false; - Gyro::visible = Gyro::m_no; - Gyro::to_do = 0; - Gyro::lmo = false; + _vm->_gyro.visible = _vm->_gyro.m_no; + _vm->_gyro.to_do = 0; + _vm->_gyro.lmo = false; // resetscroll(); Needs scrolls "unit" to make it work. warning("STUB: Avalot::Avalot()"); @@ -47,6 +48,11 @@ namespace Avalanche { } + void Avalot::setParent(AvalancheEngine *vm) { + _vm = vm; + } + + void Avalot::run(Common::String arg) { warning("STUB: Avalot::run(%s)", arg.c_str()); } diff --git a/engines/avalanche/avalot.h b/engines/avalanche/avalot.h index 073b07377b..4c428b6172 100644 --- a/engines/avalanche/avalot.h +++ b/engines/avalanche/avalot.h @@ -31,15 +31,21 @@ #include "common/system.h" namespace Avalanche { +class AvalancheEngine; class Avalot { -private: - bool checkbreak; // Originally located in avalot9.map - public: Avalot(); + void setParent(AvalancheEngine *vm); + void run(Common::String arg); + +private: + AvalancheEngine *_vm; + + bool checkbreak; // Originally located in avalot9.map + }; } // End of namespace Avalanche -- cgit v1.2.3