1 | Index: debug.cpp
|
---|
2 | ===================================================================
|
---|
3 | RCS file: /cvsroot/scummvm/scummvm/debug.cpp,v
|
---|
4 | retrieving revision 1.5
|
---|
5 | diff -u -r1.5 debug.cpp
|
---|
6 | --- debug.cpp 2001/11/06 20:07:42 1.5
|
---|
7 | +++ debug.cpp 2001/11/07 17:10:07
|
---|
8 | @@ -30,6 +30,7 @@
|
---|
9 | CMD_GO,
|
---|
10 | CMD_ACTOR,
|
---|
11 | CMD_SCRIPTS,
|
---|
12 | + CMD_EXIT
|
---|
13 | };
|
---|
14 |
|
---|
15 | void ScummDebugger::attach(Scumm *s) {
|
---|
16 | @@ -48,14 +49,18 @@
|
---|
17 |
|
---|
18 | switch(get_command()) {
|
---|
19 | case CMD_HELP:
|
---|
20 | - printf("Debugger commands:\n"
|
---|
21 | - "help -> display this help text\n"
|
---|
22 | - "quit -> quit the debugger\n"
|
---|
23 | - "go [numframes] -> increase frame\n"
|
---|
24 | - "actor [actornum] -> show actor information\n"
|
---|
25 | - "scripts -> show running scripts\n"
|
---|
26 | + printf( "Debugger commands:\n"
|
---|
27 | + "(h)elp -> display this help text\n"
|
---|
28 | + "(q)uit -> quit the debugger\n"
|
---|
29 | + "(g)o [numframes] -> increase frame\n"
|
---|
30 | + "(a)ctor [actornum] -> show actor information\n"
|
---|
31 | + "(s)cripts -> show running scripts\n"
|
---|
32 | + "(e)xit -> exit game\n"
|
---|
33 | );
|
---|
34 | return true;
|
---|
35 | +
|
---|
36 | + case CMD_EXIT:
|
---|
37 | + exit(1);
|
---|
38 |
|
---|
39 | case CMD_QUIT:
|
---|
40 | detach();
|
---|
41 | @@ -77,6 +82,9 @@
|
---|
42 | printScripts();
|
---|
43 | return true;
|
---|
44 | }
|
---|
45 | +
|
---|
46 | + printf("unknown debugger command - see help for possible commands\n");
|
---|
47 | + return true;
|
---|
48 | }
|
---|
49 |
|
---|
50 | void ScummDebugger::enter() {
|
---|
51 | @@ -114,6 +122,7 @@
|
---|
52 | { "g", 1, CMD_GO },
|
---|
53 | { "a", 1, CMD_ACTOR },
|
---|
54 | { "s", 1, CMD_SCRIPTS },
|
---|
55 | + { "e", 1, CMD_EXIT },
|
---|
56 | { 0, 0, 0 },
|
---|
57 | };
|
---|
58 |
|
---|
59 | @@ -165,6 +174,18 @@
|
---|
60 | printf("|%2d|%4d|%3d %3d|%4d|%3d|%5d|%3d|%3d|%2d|%5d|%5d|%3d|%3d|\n",
|
---|
61 | i,a->room,a->x,a->y,a->elevation,a->costume,a->width,a->walkbox,a->moving,a->neverZClip,a->animIndex,a->scalex,a->speedx,a->facing);
|
---|
62 | }
|
---|
63 | + printf("+--------------------------------------------------------------+\n");
|
---|
64 | + }
|
---|
65 | + else
|
---|
66 | + {
|
---|
67 | + printf("+--------------------------------------------------------------+\n");
|
---|
68 | + printf("|# |room| x y |elev|cos|width|box|mov|zp|frame|scale|spd|dir|\n");
|
---|
69 | + printf("+--+----+--------+----+---+-----+---+---+--+-----+-----+---+---+\n");
|
---|
70 | +
|
---|
71 | + a = &_s->actor[act];
|
---|
72 | + if (a->visible)
|
---|
73 | + printf("|%2d|%4d|%3d %3d|%4d|%3d|%5d|%3d|%3d|%2d|%5d|%5d|%3d|%3d|\n",
|
---|
74 | + act,a->room,a->x,a->y,a->elevation,a->costume,a->width,a->walkbox,a->moving,a->neverZClip,a->animIndex,a->scalex,a->speedx,a->facing);
|
---|
75 | printf("+--------------------------------------------------------------+\n");
|
---|
76 | }
|
---|
77 | }
|
---|