[Scummvm-git-logs] scummvm master -> 0ff7c95812d9aa6b608fa39e15d46b66dd73318a
a-yyg
76591232+a-yyg at users.noreply.github.com
Tue Sep 14 03:30:00 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0ff7c95812 SAGA2: Add command to toggle original status messages
Commit: 0ff7c95812d9aa6b608fa39e15d46b66dd73318a
https://github.com/scummvm/scummvm/commit/0ff7c95812d9aa6b608fa39e15d46b66dd73318a
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-09-14T12:28:10+09:00
Commit Message:
SAGA2: Add command to toggle original status messages
Changed paths:
engines/saga2/console.cpp
engines/saga2/console.h
engines/saga2/main.cpp
engines/saga2/saga2.cpp
engines/saga2/saga2.h
diff --git a/engines/saga2/console.cpp b/engines/saga2/console.cpp
index d89436f360..79b830c589 100644
--- a/engines/saga2/console.cpp
+++ b/engines/saga2/console.cpp
@@ -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]);
diff --git a/engines/saga2/console.h b/engines/saga2/console.h
index 29ac930538..54d9555a37 100644
--- a/engines/saga2/console.h
+++ b/engines/saga2/console.h
@@ -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);
diff --git a/engines/saga2/main.cpp b/engines/saga2/main.cpp
index 4e00bcc047..76e4aa2624 100644
--- a/engines/saga2/main.cpp
+++ b/engines/saga2/main.cpp
@@ -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);
diff --git a/engines/saga2/saga2.cpp b/engines/saga2/saga2.cpp
index 310a15c5af..38abcf10d4 100644
--- a/engines/saga2/saga2.cpp
+++ b/engines/saga2/saga2.cpp
@@ -92,6 +92,7 @@ Saga2Engine::Saga2Engine(OSystem *syst, const SAGA2GameDescription *desc)
_showPosition = false;
_showStats = false;
+ _showStatusMsg = false;
_teleportOnClick = false;
_teleportOnMap = false;
diff --git a/engines/saga2/saga2.h b/engines/saga2/saga2.h
index 492e16ac23..f54ac941e2 100644
--- a/engines/saga2/saga2.h
+++ b/engines/saga2/saga2.h
@@ -199,6 +199,7 @@ public:
bool _teleportOnMap;
bool _showPosition;
bool _showStats;
+ bool _showStatusMsg;
bool _indivControlsFlag;
bool _userControlsSetup;
More information about the Scummvm-git-logs
mailing list