[Scummvm-git-logs] scummvm master -> 4760b533d11544812faa002387542bdaa7241bfa
bluegr
noreply at scummvm.org
Mon Nov 18 18:18:18 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:
383993f11e GOB: Skip the copy protection screen in the Amiga version of Gob2
4760b533d1 GOB: Add version fallback from our detection tables - bug #14857
Commit: 383993f11e4948ff8aafaab00fac9a3c4d19bc94
https://github.com/scummvm/scummvm/commit/383993f11e4948ff8aafaab00fac9a3c4d19bc94
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-11-18T20:17:54+02:00
Commit Message:
GOB: Skip the copy protection screen in the Amiga version of Gob2
We already skip the copy protection in the PC floppy version.
We are in direct contact with the current IP right owners, so there is
no issue with skipping copy protection in gob games
Changed paths:
engines/gob/detection/tables_gob2.h
engines/gob/inter_v1.cpp
diff --git a/engines/gob/detection/tables_gob2.h b/engines/gob/detection/tables_gob2.h
index 22dfd3450d3..f48ada6219a 100644
--- a/engines/gob/detection/tables_gob2.h
+++ b/engines/gob/detection/tables_gob2.h
@@ -502,7 +502,7 @@
EN_GRB,
kPlatformAmiga,
ADGF_NO_FLAGS,
- GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
+ GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
@@ -515,7 +515,7 @@
DE_DEU,
kPlatformAmiga,
ADGF_NO_FLAGS,
- GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
+ GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
@@ -528,7 +528,7 @@
IT_ITA,
kPlatformAmiga,
ADGF_NO_FLAGS,
- GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
+ GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GAMEOPTION_COPY_PROTECTION)
},
kFeaturesNone,
0, 0, 0
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index 13ce13fcaad..4b595ee925c 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -705,8 +705,8 @@ void Inter_v1::o1_callSub(OpFuncParams ¶ms) {
debugC(2, kDebugGameFlow, "Skipping copy protection screen");
return;
}
- // Skipping the copy protection screen in Gobliins 2
- if (!_vm->_copyProtection && (_vm->getGameType() == kGameTypeGob2) && (offset == 1746) &&
+ // Skipping the copy protection screen in Gobliins 2 (offset 1722 - Amiga, offset 1746 - PC)
+ if (!_vm->_copyProtection && (_vm->getGameType() == kGameTypeGob2) && (offset == 1722 || offset == 1746) &&
_vm->isCurrentTot("intro0.tot")) {
debugC(2, kDebugGameFlow, "Skipping copy protection screen");
return;
Commit: 4760b533d11544812faa002387542bdaa7241bfa
https://github.com/scummvm/scummvm/commit/4760b533d11544812faa002387542bdaa7241bfa
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-11-18T20:17:55+02:00
Commit Message:
GOB: Add version fallback from our detection tables - bug #14857
If the VERSION file is missing, we now provide a fallback. Version
files exist in gob3 and inca2, so this should cover all known cases
Changed paths:
engines/gob/gob.cpp
engines/gob/gob.h
engines/gob/inter_v2.cpp
engines/gob/metaengine.cpp
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index baad98dd3ae..4debdc80e65 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -243,6 +243,19 @@ bool GobEngine::isDemo() const {
return (isSCNDemo() || isBATDemo());
}
+const char *GobEngine::getGameVersion() const {
+ // Making sure that we return a set of predetermined versions
+ const Common::String extra = _extra;
+ if (extra.hasSuffix("1.01"))
+ return "1.01";
+ else if (extra.hasSuffix("1.02"))
+ return "1.02";
+ else if (extra.hasSuffix("1.07"))
+ return "1.07";
+ else
+ return "1.00";
+}
+
bool GobEngine::hasResourceSizeWorkaround() const {
return _resourceSizeWorkaround;
}
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index 405d23fa561..71fffd8814c 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -165,6 +165,7 @@ private:
GameType _gameType;
int32 _features;
Common::Platform _platform;
+ const char *_extra;
EndiannessMethod _endiannessMethod;
@@ -259,6 +260,13 @@ public:
void initGame(const GOBGameDescription *gd);
GameType getGameType(const char *gameId) const;
+
+ /**
+ * Used to obtain the game version as a fallback
+ * from our detection tables, if the VERSION file
+ * is missing
+ */
+ const char *getGameVersion() const;
};
} // End of namespace Gob
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index b384fc3d9a6..99d08ce602a 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -1538,6 +1538,15 @@ void Inter_v2::o2_readData(OpFuncParams ¶ms) {
WRITE_VAR(1, 1);
Common::SeekableReadStream *stream = _vm->_dataIO->getFile(file);
+
+ // Fall back to the version from our detection tables, if the VERSION
+ // file does not exist - bug #14857
+ if (!stream && !scumm_stricmp(file, "version") && !offset && size == 5) {
+ Common::strlcpy((char *)buf, _vm->getGameVersion(), 5);
+ WRITE_VAR(1, 0);
+ return;
+ }
+
if (!stream)
return;
diff --git a/engines/gob/metaengine.cpp b/engines/gob/metaengine.cpp
index e0e7e77b607..d2dc956f3f5 100644
--- a/engines/gob/metaengine.cpp
+++ b/engines/gob/metaengine.cpp
@@ -118,6 +118,7 @@ void GobEngine::initGame(const GOBGameDescription *gd) {
_features = gd->features;
_language = gd->desc.language;
_platform = gd->desc.platform;
+ _extra = gd->desc.extra;
_enableAdibou2FreeBananasWorkaround = gd->desc.flags & GF_ENABLE_ADIBOU2_FREE_BANANAS_WORKAROUND;
_enableAdibou2FlowersInfiniteLoopWorkaround = gd->desc.flags & GF_ENABLE_ADIBOU2_FLOWERS_INFINITE_LOOP_WORKAROUND;
More information about the Scummvm-git-logs
mailing list