diff --git a/engines/ultima/ultima4/core/debugger.cpp b/engines/ultima/ultima4/core/debugger.cpp index 3643a0bccc4..f2b9915d966 100644 --- a/engines/ultima/ultima4/core/debugger.cpp +++ b/engines/ultima/ultima4/core/debugger.cpp @@ -79,6 +79,7 @@ Debugger::Debugger() : Shared::Debugger() { registerCmd("yell", WRAP_METHOD(Debugger, cmdYell)); registerCmd("3d", WRAP_METHOD(Debugger, cmd3d)); + registerCmd("abyss", WRAP_METHOD(Debugger, cmdAbyss)); registerCmd("collisions", WRAP_METHOD(Debugger, cmdCollisions)); registerCmd("companions", WRAP_METHOD(Debugger, cmdCompanions)); registerCmd("destroy", WRAP_METHOD(Debugger, cmdDestroy)); @@ -1074,6 +1075,23 @@ bool Debugger::cmd3d(int argc, const char **argv) { return isDebuggerActive(); } +bool Debugger::cmdAbyss(int argc, const char **argv) { + // first teleport to the abyss + g_context->_location->_coords.x = 0xe9; + g_context->_location->_coords.y = 0xe9; + g_game->setMap(mapMgr->get(MAP_ABYSS), 1, NULL); + + // then to the final altar + g_context->_location->_coords.x = 7; + g_context->_location->_coords.y = 7; + g_context->_location->_coords.z = 7; + g_ultima->_saveGame->_orientation = DIR_NORTH; + g_context->_party->lightTorch(100, false); + + cmdIgnite(0, nullptr); + return isDebuggerActive(); +} + bool Debugger::cmdCollisions(int argc, const char **argv) { _collisionOverride = !_collisionOverride; print("Collision detection %s", diff --git a/engines/ultima/ultima4/core/debugger.h b/engines/ultima/ultima4/core/debugger.h index e1cddf4f6ac..3bc7ec6c217 100644 --- a/engines/ultima/ultima4/core/debugger.h +++ b/engines/ultima/ultima4/core/debugger.h @@ -235,6 +235,11 @@ private: */ bool cmd3d(int argc, const char **argv); + /** + * Teleports to the Abyss final altar + */ + bool cmdAbyss(int argc, const char **argv); + /** * Collision detection on/off */ diff --git a/engines/ultima/ultima4/game/game.cpp b/engines/ultima/ultima4/game/game.cpp index fdfa57eb0fd..ff82a024e69 100644 --- a/engines/ultima/ultima4/game/game.cpp +++ b/engines/ultima/ultima4/game/game.cpp @@ -600,25 +600,6 @@ bool GameController::keyPressed(int key) { if ((g_context->_location->_context & CTX_DUNGEON) && strchr("abefjlotxy", key)) screenMessage("%cNot here!%c\n", FG_GREY, FG_WHITE); - else - switch (key) { - case 'c' + U4_ALT: - if (settings._debug && g_context->_location->_map->isWorldMap()) { - /* first teleport to the abyss */ - g_context->_location->_coords.x = 0xe9; - g_context->_location->_coords.y = 0xe9; - setMap(mapMgr->get(MAP_ABYSS), 1, NULL); - /* then to the final altar */ - g_context->_location->_coords.x = 7; - g_context->_location->_coords.y = 7; - g_context->_location->_coords.z = 7; - } - break; - - default: - valid = false; - break; - } if (valid && endTurn) { if (eventHandler->getController() == g_game)