[Scummvm-git-logs] scummvm master -> 6771ac4b1a3beb2194cb69201e56dfff6c5748b8
a-yyg
76591232+a-yyg at users.noreply.github.com
Tue Jul 20 10:47:33 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:
6771ac4b1a SAGA2: Implement command to list places
Commit: 6771ac4b1a3beb2194cb69201e56dfff6c5748b8
https://github.com/scummvm/scummvm/commit/6771ac4b1a3beb2194cb69201e56dfff6c5748b8
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-07-20T19:38:22+09:00
Commit Message:
SAGA2: Implement command to list places
Changed paths:
engines/saga2/console.cpp
engines/saga2/console.h
diff --git a/engines/saga2/console.cpp b/engines/saga2/console.cpp
index 5d486acf61..ad54dc92f8 100644
--- a/engines/saga2/console.cpp
+++ b/engines/saga2/console.cpp
@@ -29,6 +29,8 @@
namespace Saga2 {
+#define MAX_MAP_FEATURES 128
+
extern pCMapFeature mapFeatures[];
Console::Console(Saga2Engine *vm) : GUI::Debugger() {
@@ -49,6 +51,8 @@ Console::Console(Saga2Engine *vm) : GUI::Debugger() {
registerCmd("teleport", WRAP_METHOD(Console, cmdTeleport));
registerCmd("goto_place", WRAP_METHOD(Console, cmdGotoPlace));
+
+ registerCmd("list_places", WRAP_METHOD(Console, cmdListPlaces));
}
Console::~Console() {
@@ -163,4 +167,17 @@ bool Console::cmdGotoPlace(int argc, const char **argv) {
return true;
}
+bool Console::cmdListPlaces(int argc, const char **argv) {
+ if (argc != 1)
+ debugPrintf("Usage: %s\n", argv[0]);
+ else {
+ for (int i = 0; i < MAX_MAP_FEATURES; ++i) {
+ if (mapFeatures[i])
+ debugPrintf("%d: %s\n", i, mapFeatures[i]->getText());
+ }
+ }
+
+ return true;
+}
+
}
diff --git a/engines/saga2/console.h b/engines/saga2/console.h
index 3f5635021f..7322f59fae 100644
--- a/engines/saga2/console.h
+++ b/engines/saga2/console.h
@@ -52,6 +52,8 @@ private:
bool cmdTeleport(int argc, const char **argv);
bool cmdGotoPlace(int argc, const char **argv);
+
+ bool cmdListPlaces(int argc, const char **argv);
};
}
More information about the Scummvm-git-logs
mailing list