Only in ./kyra-new: .deps
Common subdirectories: ./kyra/.svn and ./kyra-new/.svn
diff -u ./kyra/debugger.cpp ./kyra-new/debugger.cpp
old
|
new
|
|
29 | 29 | #include "kyra/debugger.h" |
30 | 30 | #include "kyra/kyra_v1.h" |
31 | 31 | #include "kyra/kyra_v2.h" |
| 32 | #include "kyra/kyra_v3.h" |
32 | 33 | #include "kyra/screen.h" |
33 | 34 | #include "kyra/timer.h" |
34 | 35 | #include "kyra/resource.h" |
… |
… |
|
449 | 450 | _vm->_dbgPass = val; |
450 | 451 | } else { |
451 | 452 | DebugPrintf("Syntax: pass_codes <0/1>\n"); |
| 453 | } |
| 454 | |
| 455 | return true; |
| 456 | } |
| 457 | |
| 458 | Debugger_v3::Debugger_v3(KyraEngine_v3 *vm) : Debugger(vm), _vm(vm) { |
| 459 | DCmd_Register("continue", WRAP_METHOD(Debugger_v3, Cmd_Exit)); |
| 460 | DCmd_Register("give", WRAP_METHOD(Debugger_v3, cmd_giveItem)); |
| 461 | } |
| 462 | |
| 463 | bool Debugger_v3::cmd_giveItem(int argc, const char **argv) { |
| 464 | if (argc == 2) { |
| 465 | int item = atoi(argv[1]); |
| 466 | |
| 467 | // Kyrandia 3 has only 73 items (-1 to 71), otherwise it will crash |
| 468 | if (item < -1 || item > 71) { |
| 469 | DebugPrintf("itemid must be any value between (including) -1 and 71\n"); |
| 470 | return true; |
| 471 | } |
| 472 | |
| 473 | _vm->setHandItem(item); |
| 474 | } else { |
| 475 | DebugPrintf("Syntax: give <itemid>\n"); |
452 | 476 | } |
453 | 477 | |
454 | 478 | return true; |
diff -u ./kyra/debugger.h ./kyra-new/debugger.h
old
|
new
|
|
33 | 33 | class KyraEngine; |
34 | 34 | class KyraEngine_v1; |
35 | 35 | class KyraEngine_v2; |
| 36 | class KyraEngine_v3; |
36 | 37 | |
37 | 38 | class Debugger : public ::GUI::Debugger { |
38 | 39 | public: |
… |
… |
|
86 | 87 | bool cmd_giveItem(int argc, const char **argv); |
87 | 88 | bool cmd_passcodes(int argc, const char **argv); |
88 | 89 | }; |
| 90 | |
| 91 | class Debugger_v3 : public Debugger { |
| 92 | public: |
| 93 | Debugger_v3(KyraEngine_v3 *vm); |
| 94 | virtual ~Debugger_v3() {} |
| 95 | |
| 96 | protected: |
| 97 | KyraEngine_v3 *_vm; |
| 98 | |
| 99 | bool cmd_giveItem(int argc, const char **argv); |
| 100 | }; |
| 101 | |
89 | 102 | |
90 | 103 | } // End of namespace Kyra |
91 | 104 | |
diff -u ./kyra/kyra_v3.cpp ./kyra-new/kyra_v3.cpp
old
|
new
|
|
32 | 32 | #include "kyra/vqa.h" |
33 | 33 | #include "kyra/gui.h" |
34 | 34 | #include "kyra/timer.h" |
| 35 | #include "kyra/debugger.h" |
35 | 36 | |
36 | 37 | #include "common/system.h" |
37 | 38 | #include "common/config-manager.h" |
… |
… |
|
130 | 131 | _invWsaFrame = -1; |
131 | 132 | _score = 0; |
132 | 133 | memset(_scoreFlagTable, 0, sizeof(_scoreFlagTable)); |
| 134 | _debugger = 0; |
133 | 135 | } |
134 | 136 | |
135 | 137 | KyraEngine_v3::~KyraEngine_v3() { |
… |
… |
|
188 | 190 | delete [] _stringBuffer; |
189 | 191 | delete [] _newShapeFiledata; |
190 | 192 | delete _invWsa; |
| 193 | delete _debugger; |
191 | 194 | } |
192 | 195 | |
193 | 196 | int KyraEngine_v3::init() { |
… |
… |
|
197 | 200 | error("_screen->init() failed"); |
198 | 201 | |
199 | 202 | KyraEngine::init(); |
| 203 | |
| 204 | _debugger = new Debugger_v3(this); |
| 205 | assert(_debugger); |
200 | 206 | |
201 | 207 | _soundDigital = new SoundDigital(this, _mixer); |
202 | 208 | assert(_soundDigital); |
… |
… |
|
1344 | 1350 | default: |
1345 | 1351 | break; |
1346 | 1352 | } |
| 1353 | |
| 1354 | if (_debugger->isAttached()) |
| 1355 | _debugger->onFrame(); |
| 1356 | |
1347 | 1357 | } |
1348 | 1358 | } |
1349 | 1359 | |
… |
… |
|
1376 | 1386 | if (event.kbd.keycode == 'd') |
1377 | 1387 | _debugger->attach(); |
1378 | 1388 | }*/ |
| 1389 | |
| 1390 | if (event.kbd.flags == Common::KBD_CTRL) { |
| 1391 | if (event.kbd.keycode == 'd') |
| 1392 | _debugger->attach(); |
| 1393 | } |
| 1394 | |
1379 | 1395 | break; |
1380 | 1396 | |
1381 | 1397 | case Common::EVENT_MOUSEMOVE: { |
diff -u ./kyra/kyra_v3.h ./kyra-new/kyra_v3.h
old
|
new
|
|
40 | 40 | class MainMenu; |
41 | 41 | class WSAMovieV2; |
42 | 42 | class TextDisplayer_v3; |
| 43 | class Debugger_v3; |
43 | 44 | struct Button; |
44 | 45 | |
45 | 46 | class KyraEngine_v3 : public KyraEngine { |
| 47 | friend class Debugger_v3; |
46 | 48 | friend class TextDisplayer_v3; |
47 | 49 | public: |
48 | 50 | KyraEngine_v3(OSystem *system, const GameFlags &flags); |
… |
… |
|
742 | 744 | |
743 | 745 | // misc |
744 | 746 | TextDisplayer_v3 *_text; |
| 747 | Debugger_v3 *_debugger; |
745 | 748 | bool _wsaPlayingVQA; |
746 | 749 | |
747 | 750 | // resource specific |