[Scummvm-cvs-logs] CVS: scummvm/sky debug.cpp,1.13,1.14 debug.h,1.6,1.7
Joost Peters
joostp at users.sourceforge.net
Fri Oct 22 11:38:10 CEST 2004
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16474/sky
Modified Files:
debug.cpp debug.h
Log Message:
add section jumping to the debugger
Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/debug.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- debug.cpp 17 Sep 2004 10:33:40 -0000 1.13
+++ debug.cpp 22 Oct 2004 18:37:42 -0000 1.14
@@ -1285,6 +1285,7 @@
DCmd_Register("compact", &Debugger::Cmd_ShowCompact);
DCmd_Register("logiccmd", &Debugger::Cmd_LogicCommand);
DCmd_Register("scriptvar", &Debugger::Cmd_ScriptVar);
+ DCmd_Register("section", &Debugger::Cmd_Section);
}
void Debugger::preEnter() {
@@ -1458,4 +1459,24 @@
return true;
}
+bool Debugger::Cmd_Section(int argc, const char **argv) {
+ if (argc < 2) {
+ DebugPrintf("Example: %s 4\n", argv[0]);
+ return true;
+ }
+
+ const int baseId[] = { START_ONE, START_S6, START_29, START_SC31, START_SC66, START_SC90, START_SC81 };
+ int section = atoi(argv[1]);
+
+ if (section >= 0 && section <= 6) {
+ _logic->fnEnterSection(section % 6, 0, 0);
+ _logic->fnAssignBase(ID_FOSTER, baseId[section], 0);
+ SkyEngine::fetchCompact(ID_FOSTER)->extCompact->megaSet = 0;
+ } else {
+ DebugPrintf("Unknown section '%s'\n", argv[1]);
+ }
+
+ return true;
+}
+
} // End of namespace Sky
Index: debug.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/debug.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- debug.h 13 Sep 2004 17:05:23 -0000 1.6
+++ debug.h 22 Oct 2004 18:37:42 -0000 1.7
@@ -49,6 +49,7 @@
bool Cmd_LogicCommand(int argc, const char **argv);
bool Cmd_Info(int argc, const char **argv);
bool Cmd_ScriptVar(int argc, const char **argv);
+ bool Cmd_Section(int argc, const char **argv);
Logic *_logic;
Mouse *_mouse;
More information about the Scummvm-git-logs
mailing list