aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/kyra.cpp7
-rw-r--r--engines/kyra/kyra.h4
-rw-r--r--engines/kyra/kyra_v1.cpp2
-rw-r--r--engines/kyra/kyra_v1.h2
-rw-r--r--engines/kyra/kyra_v2.cpp2
-rw-r--r--engines/kyra/kyra_v2.h2
6 files changed, 11 insertions, 8 deletions
diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp
index 05d8b79a4e..e35e91731d 100644
--- a/engines/kyra/kyra.cpp
+++ b/engines/kyra/kyra.cpp
@@ -35,6 +35,7 @@
#include "kyra/text.h"
#include "kyra/timer.h"
#include "kyra/script.h"
+#include "kyra/debugger.h"
namespace Kyra {
@@ -46,6 +47,7 @@ KyraEngine::KyraEngine(OSystem *system, const GameFlags &flags)
_staticres = 0;
_timer = 0;
_emc = 0;
+ _debugger = 0;
_gameSpeed = 60;
_tickLength = (uint8)(1000.0 / _gameSpeed);
@@ -78,6 +80,10 @@ KyraEngine::KyraEngine(OSystem *system, const GameFlags &flags)
system->getEventManager()->registerRandomSource(_rnd, "kyra");
}
+::GUI::Debugger *KyraEngine::getDebugger() {
+ return _debugger;
+}
+
int KyraEngine::init() {
registerDefaultSettings();
@@ -201,6 +207,7 @@ KyraEngine::~KyraEngine() {
delete _text;
delete _timer;
delete _emc;
+ delete _debugger;
}
void KyraEngine::quitGame() {
diff --git a/engines/kyra/kyra.h b/engines/kyra/kyra.h
index 18a4a52fe2..66ecb2704c 100644
--- a/engines/kyra/kyra.h
+++ b/engines/kyra/kyra.h
@@ -97,6 +97,7 @@ class Movie;
class TextDisplayer;
class StaticResource;
class TimerManager;
+class Debugger;
class KyraEngine : public Engine {
friend class Debugger;
@@ -106,6 +107,8 @@ public:
KyraEngine(OSystem *system, const GameFlags &flags);
virtual ~KyraEngine();
+ ::GUI::Debugger *getDebugger();
+
bool quit() const { return _quitFlag; }
uint8 game() const { return _flags.gameID; }
@@ -176,6 +179,7 @@ protected:
StaticResource *_staticres;
TimerManager *_timer;
EMCInterpreter *_emc;
+ Debugger *_debugger;
// config specific
virtual void registerDefaultSettings();
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index e9bb25fe5f..98514a3c37 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -77,7 +77,6 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
_drinkAnimationTable = _brandonToWispTable = _magicAnimationTable = _brandonStoneTable = 0;
_drinkAnimationTableSize = _brandonToWispTableSize = _magicAnimationTableSize = _brandonStoneTableSize = 0;
memset(&_specialPalettes, 0, sizeof(_specialPalettes));
- _debugger = 0;
_sprites = 0;
_animator = 0;
_seq = 0;
@@ -113,7 +112,6 @@ KyraEngine_v1::~KyraEngine_v1() {
Common::clearAllSpecialDebugLevels();
delete _screen;
- delete _debugger;
delete _sprites;
delete _animator;
delete _seq;
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index 50791c3ade..801d3b9189 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -37,7 +37,6 @@ class Movie;
class SoundDigital;
class SeqPlayer;
class Sprites;
-class Debugger;
class Animator_v1;
class TextDisplayer;
class KyraEngine_v1;
@@ -480,7 +479,6 @@ protected:
SeqPlayer *_seq;
Sprites *_sprites;
Screen_v1 *_screen;
- Debugger *_debugger;
EMCState _scriptMain;
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index c3d5b430b9..ccea7e08bb 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -64,7 +64,6 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const Engi
memset(_hiddenItems, -1, sizeof(_hiddenItems));
- _debugger = 0;
_screenBuffer = 0;
memset(&_mainCharacter, 0, sizeof(_mainCharacter));
@@ -89,7 +88,6 @@ KyraEngine_v2::~KyraEngine_v2() {
delete *i;
_opcodesAnimation.clear();
- delete _debugger;
delete[] _screenBuffer;
}
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index f0d26ca011..b8b7c843dd 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -36,7 +36,6 @@
namespace Kyra {
class Screen_v2;
-class Debugger_v2;
class KyraEngine_v2 : public KyraEngine {
friend class Debugger_v2;
@@ -63,7 +62,6 @@ public:
const EngineDesc &engineDesc() const { return _desc; }
protected:
EngineDesc _desc;
- Debugger_v2 *_debugger;
// run
bool _runFlag;