From 50f3cfa625e338276e8a4d38836227877ab93e3a Mon Sep 17 00:00:00 2001 From: Bendegúz Nagy Date: Fri, 26 Aug 2016 22:51:17 +0200 Subject: DM: Add debug command godmode --- engines/dm/dm.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'engines/dm/dm.cpp') diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index 2f52b07ff6..8cd5771302 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -367,8 +367,21 @@ 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]; + if (_console->_debugGodmodeHP) + champ._currHealth = champ._maxHealth; + if (_console->_debugGodmodeMana) + champ._currMana = champ._maxMana; + if (_console->_debugGodmodeStamina) + champ._currStamina = champ._maxStamina; + } for (;;) { + + if (_g327_newPartyMapIndex != kM1_mapIndexNone) { f3_processNewPartyMap(_g327_newPartyMapIndex); _moveSens->f267_getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_g306_partyMapX, _dungeonMan->_g307_partyMapY); -- cgit v1.2.3