aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/kyra_lok.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/kyra_lok.cpp')
-rw-r--r--engines/kyra/kyra_lok.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp
index 27d0849e5f..84990bcfb8 100644
--- a/engines/kyra/kyra_lok.cpp
+++ b/engines/kyra/kyra_lok.cpp
@@ -174,6 +174,9 @@ Common::Error KyraEngine_LoK::init() {
assert(_screen);
_screen->setResolution();
+ _debugger = new Debugger_LoK(this);
+ assert(_debugger);
+
KyraEngine_v1::init();
_sprites = new Sprites(this, _system);
@@ -229,8 +232,6 @@ Common::Error KyraEngine_LoK::init() {
memset(&_scriptMain, 0, sizeof(EMCState));
memset(&_scriptClick, 0, sizeof(EMCState));
- _debugger = new Debugger_LoK(this);
- assert(_debugger);
memset(_shapes, 0, sizeof(_shapes));
for (int i = 0; i < ARRAYSIZE(_movieObjects); ++i)
@@ -254,7 +255,7 @@ Common::Error KyraEngine_LoK::init() {
_poisonDeathCounter = 0;
memset(_itemHtDat, 0, sizeof(_itemHtDat));
- memset(_exitList, 0xFFFF, sizeof(_exitList));
+ memset(_exitList, 0xFF, sizeof(_exitList));
_exitListPtr = 0;
_pathfinderFlag = _pathfinderFlag2 = 0;
_lastFindWayRet = 0;
@@ -436,6 +437,9 @@ void KyraEngine_LoK::startup() {
}
void KyraEngine_LoK::mainLoop() {
+ // Initialize debugger since how it should be fully usable
+ _debugger->initialize();
+
_eventList.clear();
while (!shouldQuit()) {