mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 11:36:22 +00:00
SAGA2: Add command to toggle original status messages
This commit is contained in:
parent
570482a075
commit
0ff7c95812
@ -81,6 +81,8 @@ Console::Console(Saga2Engine *vm) : GUI::Debugger() {
|
||||
|
||||
registerCmd("stats", WRAP_METHOD(Console, cmdStats));
|
||||
|
||||
registerCmd("status_msg", WRAP_METHOD(Console, cmdStatusMsg));
|
||||
|
||||
registerCmd("dump_map", WRAP_METHOD(Console, cmdDumpMap));
|
||||
|
||||
registerCmd("play_music", WRAP_METHOD(Console, cmdPlayMusic));
|
||||
@ -222,6 +224,17 @@ bool Console::cmdStats(int argc, const char **argv) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Console::cmdStatusMsg(int argc, const char **argv) {
|
||||
if (argc != 2)
|
||||
debugPrintf("Usage: %s <1/0>\n", argv[0]);
|
||||
else {
|
||||
bool show = atoi(argv[1]);
|
||||
_vm->_showStatusMsg = show;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Console::cmdTeleportOnClick(int argc, const char **argv) {
|
||||
if (argc != 2)
|
||||
debugPrintf("Usage: %s <1/0>\n", argv[0]);
|
||||
|
@ -68,6 +68,9 @@ private:
|
||||
// Input: <1/0>. Sets whether an item's stats show when holding it.
|
||||
bool cmdStats(int argc, const char **argv);
|
||||
|
||||
// Input: <1/0>. Sets whether the original debug status messages show.
|
||||
bool cmdStatusMsg(int argc, const char **argv);
|
||||
|
||||
// Input: <1/0>. Sets whether you can teleport by right clicking on the screen.
|
||||
bool cmdTeleportOnClick(int argc, const char **argv);
|
||||
|
||||
|
@ -773,6 +773,9 @@ void cleanupGUIMessagers() {
|
||||
|
||||
#ifdef WriteStatus
|
||||
void WriteStatusF(int16 line, const char *msg, ...) {
|
||||
if (!g_vm->_showStatusMsg)
|
||||
return;
|
||||
|
||||
va_list argptr;
|
||||
if (displayEnabled()) {
|
||||
va_start(argptr, msg);
|
||||
@ -788,6 +791,9 @@ void WriteStatusF(int16 line, const char *msg, ...) {
|
||||
}
|
||||
|
||||
void WriteStatusF2(int16 line, const char *msg, ...) {
|
||||
if (!g_vm->_showStatusMsg)
|
||||
return;
|
||||
|
||||
va_list argptr;
|
||||
if (displayEnabled()) {
|
||||
va_start(argptr, msg);
|
||||
|
@ -92,6 +92,7 @@ Saga2Engine::Saga2Engine(OSystem *syst, const SAGA2GameDescription *desc)
|
||||
|
||||
_showPosition = false;
|
||||
_showStats = false;
|
||||
_showStatusMsg = false;
|
||||
_teleportOnClick = false;
|
||||
_teleportOnMap = false;
|
||||
|
||||
|
@ -199,6 +199,7 @@ public:
|
||||
bool _teleportOnMap;
|
||||
bool _showPosition;
|
||||
bool _showStats;
|
||||
bool _showStatusMsg;
|
||||
|
||||
bool _indivControlsFlag;
|
||||
bool _userControlsSetup;
|
||||
|
Loading…
x
Reference in New Issue
Block a user