mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
ULTIMA4: Shifted abyss jump to debugger command
This commit is contained in:
parent
bfb9290138
commit
c4d188249c
@ -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",
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user