From 2308ba8aafcd4d9f4f1ef7c0281177455c8e3e14 Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Wed, 15 Dec 2004 06:48:08 +0000 Subject: moved compacts and related static data out of the scummvm.exe into an external file (available from www.lavosspawn.de/tmp/sky_cpt.zip) svn-id: r16053 --- sky/debug.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sky/debug.cpp') diff --git a/sky/debug.cpp b/sky/debug.cpp index 54fb33519f..1b3a522f2d 100644 --- a/sky/debug.cpp +++ b/sky/debug.cpp @@ -28,6 +28,7 @@ #include "sky/screen.h" #include "sky/sky.h" #include "sky/struc.h" +#include "sky/compact.h" #include "common/debugger.cpp" @@ -1276,7 +1277,8 @@ void Debug::mcode(uint32 mcode, uint32 a, uint32 b, uint32 c) { -Debugger::Debugger(Logic *logic, Mouse *mouse, Screen *screen) : _logic(logic), _mouse(mouse), _screen(screen), _showGrid(false) { +Debugger::Debugger(Logic *logic, Mouse *mouse, Screen *screen, SkyCompact *skyCompact) +: _logic(logic), _mouse(mouse), _screen(screen), _skyCompact(skyCompact), _showGrid(false) { DCmd_Register("exit", &Debugger::Cmd_Exit); DCmd_Register("help", &Debugger::Cmd_Help); DCmd_Register("info", &Debugger::Cmd_Info); @@ -1356,7 +1358,7 @@ bool Debugger::Cmd_ShowCompact(int argc, const char **argv) { for (i = 0; i < numCompacts; ++i) { if (0 == strcmp(section_0_compacts[i], argv[1])) { - cpt = SkyEngine::fetchCompact(i); + cpt = _skyCompact->fetchCpt(i); break; } } @@ -1372,10 +1374,10 @@ bool Debugger::Cmd_ShowCompact(int argc, const char **argv) { DebugPrintf("getToFlag : %d\n", cpt->getToFlag); DebugPrintf("mode : %d\n", cpt->mode); // Mega / extCompact info - if (cpt->extCompact) { + /*if (cpt->extCompact) { DebugPrintf("waitingFor : %d\n", cpt->extCompact->waitingFor); DebugPrintf("arTargetX/Y: %d/%d\n", cpt->extCompact->arTargetX, cpt->extCompact->arTargetY); - } + }*/ } else { DebugPrintf("Unknown compact: '%s'\n", argv[1]); } @@ -1471,7 +1473,7 @@ bool Debugger::Cmd_Section(int argc, const char **argv) { if (section >= 0 && section <= 6) { _logic->fnEnterSection(section == 6 ? 4 : section, 0, 0); _logic->fnAssignBase(ID_FOSTER, baseId[section], 0); - SkyEngine::fetchCompact(ID_FOSTER)->extCompact->megaSet = 0; + _skyCompact->fetchCpt(ID_FOSTER)->megaSet = 0; } else { DebugPrintf("Unknown section '%s'\n", argv[1]); } -- cgit v1.2.3