[Scummvm-git-logs] scummvm master -> 0a9a66111b2cd61078050d3cce3a3d49efb41673

bluegr noreply at scummvm.org
Tue Jul 9 21:44:22 UTC 2024


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:
0a9a66111b DGDS: Add the "scene" command to the debugger


Commit: 0a9a66111b2cd61078050d3cce3a3d49efb41673
    https://github.com/scummvm/scummvm/commit/0a9a66111b2cd61078050d3cce3a3d49efb41673
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-07-10T00:44:13+03:00

Commit Message:
DGDS: Add the "scene" command to the debugger

Changed paths:
    engines/dgds/console.cpp
    engines/dgds/console.h


diff --git a/engines/dgds/console.cpp b/engines/dgds/console.cpp
index bd0b604aeee..7b4bc56d4ba 100644
--- a/engines/dgds/console.cpp
+++ b/engines/dgds/console.cpp
@@ -48,6 +48,7 @@ Console::Console(DgdsEngine *vm) : _vm(vm) {
 	registerCmd("imagedump", WRAP_METHOD(Console, cmdImageDump));
 	registerCmd("imagedumpall", WRAP_METHOD(Console, cmdImageDumpAll));
 	registerCmd("global", WRAP_METHOD(Console, cmdGlobal));
+	registerCmd("scene", WRAP_METHOD(Console, cmdScene));
 }
 
 bool Console::cmdFileInfo(int argc, const char **argv) {
@@ -269,4 +270,18 @@ bool Console::cmdGlobal(int argc, const char **argv) {
 	return true;
 }
 
+bool Console::cmdScene(int argc, const char **argv) {
+	if (argc == 1) {
+		int curSceneNum = _vm->getScene()->getNum();
+		debugPrintf("Current scene is %d\n", curSceneNum);
+		debugPrintf("Use %s <num> to change the scene\n", argv[0]);
+	} else {
+		int num = atoi(argv[1]);
+		_vm->changeScene(num);
+		debugPrintf("Scene changed to %d\n", num);
+	}
+
+	return true;
+}
+
 } // End of namespace Dgds
diff --git a/engines/dgds/console.h b/engines/dgds/console.h
index 2586db2762e..eaf148fde71 100644
--- a/engines/dgds/console.h
+++ b/engines/dgds/console.h
@@ -41,6 +41,7 @@ private:
 	bool cmdImageDumpAll(int argc, const char **argv);
 	bool cmdImageDump(int argc, const char **argv);
 	bool cmdGlobal(int argc, const char **argv);
+	bool cmdScene(int argc, const char **argv);
 	DgdsEngine *_vm;
 };
 




More information about the Scummvm-git-logs mailing list