[Scummvm-git-logs] scummvm master -> 859efbb9fb8a2be6dfbfc97ec9b72891bf01d58f

scemino noreply at scummvm.org
Thu Apr 4 21:01:04 UTC 2024


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

Summary:
72afd0be1a TWP: Add game version in game description's extra
859efbb9fb TWP: Add MD5 and version in savegame


Commit: 72afd0be1a79a3e2bc71b45ab0adcd424085eec3
    https://github.com/scummvm/scummvm/commit/72afd0be1a79a3e2bc71b45ab0adcd424085eec3
Author: scemino (scemino74 at gmail.com)
Date: 2024-04-04T23:00:42+02:00

Commit Message:
TWP: Add game version in game description's extra

Changed paths:
    engines/twp/detection_tables.h


diff --git a/engines/twp/detection_tables.h b/engines/twp/detection_tables.h
index bab4be4abea..4909db31b90 100644
--- a/engines/twp/detection_tables.h
+++ b/engines/twp/detection_tables.h
@@ -30,7 +30,7 @@ const TwpGameDescription gameDescriptions[] = {
 	{
 		{
 			"twp",
-			"",
+			"STEAM/1.0.859",
 			AD_ENTRY1s("ThimbleweedPark.ggpack1", "b1c35b7a6b5b0c2e6f466ea384f22558", 435353845),
 			Common::UNK_LANG,
 			Common::kPlatformUnknown,
@@ -44,7 +44,7 @@ const TwpGameDescription gameDescriptions[] = {
 	{
 		{
 			"twp",
-			"",
+			"EPIC Games/1.0.955",
 			AD_ENTRY1s("ThimbleweedPark.ggpack1", "a97546ee2d9e19aab59714a267009a31", 502540584),
 			Common::UNK_LANG,
 			Common::kPlatformUnknown,
@@ -58,7 +58,7 @@ const TwpGameDescription gameDescriptions[] = {
 	{
 		{
 			"twp",
-			"",
+			"GOG/1.0.938",
 			AD_ENTRY1s("ThimbleweedPark.ggpack1", "5532019821c077dda5cf86b619e4b173", 502495748),
 			Common::UNK_LANG,
 			Common::kPlatformUnknown,
@@ -72,7 +72,7 @@ const TwpGameDescription gameDescriptions[] = {
   	{
 		{
 			"twp",
-			"",
+			"GOG/1.0.951",
 			AD_ENTRY1s("ThimbleweedPark.ggpack1", "f0bd29df9fcaba3d4047eac1046e0abf", 502503739),
 			Common::UNK_LANG,
 			Common::kPlatformUnknown,
@@ -86,7 +86,7 @@ const TwpGameDescription gameDescriptions[] = {
   	{
 		{
 			"twp",
-			"",
+			"GOG/1.0.957",
 			AD_ENTRY1s("ThimbleweedPark.ggpack1", "5631cf51cb7afc4babf7f2d5a8bdfc21", 502661437),
 			Common::UNK_LANG,
 			Common::kPlatformUnknown,
@@ -100,7 +100,7 @@ const TwpGameDescription gameDescriptions[] = {
 	{
 		{
 			"twp",
-			"",
+			"GOG/1.0.958",
 			AD_ENTRY1s("ThimbleweedPark.ggpack1", "6180145221d18e9e9caac6459e840579", 502661439),
 			Common::UNK_LANG,
 			Common::kPlatformUnknown,


Commit: 859efbb9fb8a2be6dfbfc97ec9b72891bf01d58f
    https://github.com/scummvm/scummvm/commit/859efbb9fb8a2be6dfbfc97ec9b72891bf01d58f
Author: scemino (scemino74 at gmail.com)
Date: 2024-04-04T23:00:42+02:00

Commit Message:
TWP: Add MD5 and version in savegame

Changed paths:
    engines/twp/twp.cpp


diff --git a/engines/twp/twp.cpp b/engines/twp/twp.cpp
index edefd209780..c44dbc9abde 100644
--- a/engines/twp/twp.cpp
+++ b/engines/twp/twp.cpp
@@ -56,6 +56,8 @@
 
 namespace Twp {
 
+#define TWP_SAVEGAME_VERSION 1
+
 TwpEngine *g_twp;
 
 TwpEngine::TwpEngine(OSystem *syst, const TwpGameDescription *gameDesc)
@@ -1057,6 +1059,9 @@ Common::Error TwpEngine::loadGameStream(Common::SeekableReadStream *stream) {
 	if (!_saveGameManager->loadGame(*stream)) {
 		return Common::kUnknownError;
 	}
+	Common::String md5 = stream->readString(0, 32);
+	uint16 savegameVersion = stream->readUint16LE();
+	debug("Load game with MD5: %s, version: %u", md5.c_str(), savegameVersion);
 	return Common::kNoError;
 }
 
@@ -1092,6 +1097,8 @@ Common::Error TwpEngine::saveGameState(int slot, const Common::String &desc, boo
 
 Common::Error TwpEngine::saveGameStream(Common::WriteStream *stream, bool isAutosave) {
 	_saveGameManager->saveGame(stream);
+	stream->writeString(_gameDescription->desc.filesDescriptions[0].md5);
+	stream->writeUint16LE(TWP_SAVEGAME_VERSION);
 	return Common::kNoError;
 }
 




More information about the Scummvm-git-logs mailing list