mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 16:07:39 +00:00
SAGA2: Add command to teleport on click
This commit is contained in:
parent
a9f2fa115b
commit
c2aac871a9
@ -61,6 +61,8 @@ Console::Console(Saga2Engine *vm) : GUI::Debugger() {
|
||||
|
||||
registerCmd("position", WRAP_METHOD(Console, cmdPosition));
|
||||
|
||||
registerCmd("teleport_on_click", WRAP_METHOD(Console, cmdTeleportOnClick));
|
||||
|
||||
registerCmd("teleport", WRAP_METHOD(Console, cmdTeleport));
|
||||
|
||||
registerCmd("teleport_to_npc", WRAP_METHOD(Console, cmdTeleportToNPC));
|
||||
@ -211,6 +213,17 @@ bool Console::cmdStats(int argc, const char **argv) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Console::cmdTeleportOnClick(int argc, const char **argv) {
|
||||
if (argc != 2)
|
||||
debugPrintf("Usage: %s <1/0>\n", argv[0]);
|
||||
else {
|
||||
bool teleport = atoi(argv[1]);
|
||||
_vm->_teleportOnClick = teleport;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Console::cmdTeleport(int argc, const char **argv) {
|
||||
if (argc != 4)
|
||||
debugPrintf("Usage: %s <u> <v> <z>\n", argv[0]);
|
||||
|
@ -59,6 +59,8 @@ private:
|
||||
|
||||
bool cmdStats(int argc, const char **argv);
|
||||
|
||||
bool cmdTeleportOnClick(int argc, const char **argv);
|
||||
|
||||
bool cmdTeleport(int argc, const char **argv);
|
||||
|
||||
bool cmdTeleportToNPC(int argc, const char **argv);
|
||||
|
@ -75,6 +75,7 @@ Saga2Engine::Saga2Engine(OSystem *syst)
|
||||
_speechText = true;
|
||||
_showPosition = false;
|
||||
_showStats = false;
|
||||
_teleportOnClick = false;
|
||||
|
||||
SearchMan.addSubDirectoryMatching(gameDataDir, "res");
|
||||
SearchMan.addSubDirectoryMatching(gameDataDir, "dos/drivers"); // For Miles Sound files
|
||||
|
@ -178,6 +178,7 @@ public:
|
||||
bool _autoWeapon;
|
||||
bool _showNight;
|
||||
bool _speechText;
|
||||
bool _teleportOnClick;
|
||||
|
||||
bool _showPosition;
|
||||
bool _showStats;
|
||||
|
@ -1223,7 +1223,9 @@ static APPFUNC(cmdClickTileMap) {
|
||||
// We're not pointing at an object and the mouse cursor
|
||||
// does not have an object
|
||||
else {
|
||||
if (g_vm->_mouseInfo->getIntent() == GrabInfo::WalkTo
|
||||
if (g_vm->_teleportOnClick) {
|
||||
getCenterActor()->setLocation(walkToPos);
|
||||
} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::WalkTo
|
||||
&& g_vm->_mouseInfo->getDoable()) {
|
||||
if (pickedTAI == NULL) {
|
||||
navigateDirect(walkToPos, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user