From a5c0a324462b9f149eea3ef78589999d193de71e Mon Sep 17 00:00:00 2001 From: Bendegúz Nagy Date: Wed, 10 Aug 2016 14:44:54 +0200 Subject: DM: Add debug command .pos --- engines/dm/dm.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'engines/dm/dm.cpp') diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index 8cd5771302..f4ab7f4fbc 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -76,6 +76,13 @@ void warning(bool repeat, const char* s, ...) { } } +const char* debugGetDirectionName(Direction dir) { + static const char* directionNames[] = {"North", "East", "South", "West"}; + if (dir < 0 || dir > 3) + return "Invalid direction"; + return directionNames[dir]; +} + void turnDirRight(Direction &dir) { dir = (Direction)((dir + 1) & 3); } @@ -367,7 +374,7 @@ void DMEngine::f2_gameloop() { while (true) { if (_engineShouldQuit) return; - + // DEBUG CODE for (int16 i = 0; i < _championMan->_g305_partyChampionCount; ++i) { Champion &champ = _championMan->_gK71_champions[i]; @@ -380,7 +387,7 @@ void DMEngine::f2_gameloop() { } for (;;) { - + if (_g327_newPartyMapIndex != kM1_mapIndexNone) { f3_processNewPartyMap(_g327_newPartyMapIndex); -- cgit v1.2.3