[Scummvm-git-logs] scummvm master -> 108c5222a27219246fa0862fdc4ca34083bbabb6

a-yyg 76591232+a-yyg at users.noreply.github.com
Tue Aug 3 11:21:14 UTC 2021


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
d17c0fd403 SAGA2: Temporarily stub checkRestartGame
7ecc231fcd SAGA2: Extend addObject command for multiple items
108c5222a2 SAGA2: Implement teleport party here command


Commit: d17c0fd403c0bd045ba2113262605d1d2759755d
    https://github.com/scummvm/scummvm/commit/d17c0fd403c0bd045ba2113262605d1d2759755d
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-08-03T20:19:30+09:00

Commit Message:
SAGA2: Temporarily stub checkRestartGame

Changed paths:
    engines/saga2/saveload.cpp


diff --git a/engines/saga2/saveload.cpp b/engines/saga2/saveload.cpp
index b742065707..6ea7d5a3ed 100644
--- a/engines/saga2/saveload.cpp
+++ b/engines/saga2/saveload.cpp
@@ -555,8 +555,11 @@ void cleanupGameState(void) {
 #endif
 
 void checkRestartGame(const char *exeName) {
+#if 0
 	Common::String saveRestart = g_vm->getSavegameFile(999);
 	g_vm->saveGameState(999, saveRestart, true);
+#endif
+	warning("STUB: checkRestartGame");
 }
 
 


Commit: 7ecc231fcda784732ee6a0924d653be555f1255e
    https://github.com/scummvm/scummvm/commit/7ecc231fcda784732ee6a0924d653be555f1255e
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-08-03T20:19:30+09:00

Commit Message:
SAGA2: Extend addObject command for multiple items

Changed paths:
    engines/saga2/console.cpp


diff --git a/engines/saga2/console.cpp b/engines/saga2/console.cpp
index 009cf2a070..e49279b56c 100644
--- a/engines/saga2/console.cpp
+++ b/engines/saga2/console.cpp
@@ -57,7 +57,7 @@ Console::Console(Saga2Engine *vm) : GUI::Debugger() {
 
 	registerCmd("search", WRAP_METHOD(Console, cmdSearchObj));
 
-	registerCmd("add_obj", WRAP_METHOD(Console, cmdAddObj));
+	registerCmd("add", WRAP_METHOD(Console, cmdAddObj));
 
 	registerCmd("position", WRAP_METHOD(Console, cmdPosition));
 
@@ -183,12 +183,15 @@ bool Console::cmdSearchObj(int argc, const char **argv) {
 }
 
 bool Console::cmdAddObj(int argc, const char **argv) {
-	if (argc != 2)
-		debugPrintf("Usage: %s <ObjectID>\n", argv[0]);
-	else {
+	if (argc == 2) {
 		Actor *a = getCenterActor();
 		a->placeObject(a->thisID(), atoi(argv[1]));
-	}
+	} else if (argc == 3) {
+		Actor *a = getCenterActor();
+		int num = atoi(argv[2]);
+		a->placeObject(a->thisID(), atoi(argv[1]), true, num);
+	} else
+		debugPrintf("Usage: %s <ObjectID> <num = 1>\n", argv[0]);
 
 	return true;
 }


Commit: 108c5222a27219246fa0862fdc4ca34083bbabb6
    https://github.com/scummvm/scummvm/commit/108c5222a27219246fa0862fdc4ca34083bbabb6
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-08-03T20:19:30+09:00

Commit Message:
SAGA2: Implement teleport party here command

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


diff --git a/engines/saga2/console.cpp b/engines/saga2/console.cpp
index e49279b56c..eb6608e68a 100644
--- a/engines/saga2/console.cpp
+++ b/engines/saga2/console.cpp
@@ -71,6 +71,8 @@ Console::Console(Saga2Engine *vm) : GUI::Debugger() {
 
 	registerCmd("teleport_npc_here", WRAP_METHOD(Console, cmdTeleportNPCHere));
 
+	registerCmd("teleport_party_here", WRAP_METHOD(Console, cmdTeleportPartyHere));
+
 	registerCmd("save_loc", WRAP_METHOD(Console, cmdSaveLoc));
 
 	registerCmd("load_loc", WRAP_METHOD(Console, cmdLoadLoc));
@@ -289,6 +291,21 @@ bool Console::cmdTeleportNPCHere(int argc, const char **argv) {
 	return true;
 }
 
+bool Console::cmdTeleportPartyHere(int argc, const char **argv) {
+	if (argc != 1)
+		debugPrintf("Usage: %s\n", argv[0]);
+	else {
+		TilePoint loc = getCenterActor()->getLocation();
+
+		for (ObjectID id = ActorBaseID; id < ActorBaseID + kPlayerActors; ++id) {
+			Actor *p = (Actor *)GameObject::objectAddress(id);
+			p->setLocation(loc);
+		}
+	}
+
+	return true;
+}
+
 bool Console::cmdSaveLoc(int argc, const char **argv) {
 	if (argc != 1)
 		debugPrintf("Usage: %s\n", argv[0]);
diff --git a/engines/saga2/console.h b/engines/saga2/console.h
index 64c0821373..8574389ef7 100644
--- a/engines/saga2/console.h
+++ b/engines/saga2/console.h
@@ -69,6 +69,8 @@ private:
 
 	bool cmdTeleportNPCHere(int argc, const char **argv);
 
+	bool cmdTeleportPartyHere(int argc, const char **argv);
+
 	bool cmdSaveLoc(int argc, const char **argv);
 
 	bool cmdLoadLoc(int argc, const char **argv);




More information about the Scummvm-git-logs mailing list