[Scummvm-git-logs] scummvm master -> e282eb5c9555454c24cb95ae9f757652a127acef
sev-
sev at scummvm.org
Wed Oct 21 20:59:16 UTC 2020
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b9d1c7d95c AGI: Autogenerate better target names
1c830bc068 AD: Restrict length of autogenerated targets
9be82ea2f4 AD: Better automatic generation of game targer
f3787aeb28 AGI: Added another fanmade game
e09c12bf71 AGI: Fix crashes in WagParser
e282eb5c95 AGI: Added several additional targets. Most are problematic
Commit: b9d1c7d95cc9e721bd8e42a5b096cd35cce5bb19
https://github.com/scummvm/scummvm/commit/b9d1c7d95cc9e721bd8e42a5b096cd35cce5bb19
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-10-21T19:06:19+02:00
Commit Message:
AGI: Autogenerate better target names
Changed paths:
engines/agi/detection_tables.h
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index c60088756b..ab465d735b 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -74,7 +74,7 @@ namespace Agi {
AD_ENTRY1s(fname,md5,size), \
lang, \
platform, \
- ADGF_USEEXTRAASTITLE, \
+ ADGF_USEEXTRAASTITLE | ADGF_AUTOGENTARGET, \
guioptions \
}, \
gid, \
@@ -914,7 +914,7 @@ static const AGIGameDescription gameDescriptions[] = {
AD_ENTRY1s("vdir", "c71f5c1e008d352ae9040b77fcf79327", 3080),
Common::EN_ANY,
Common::kPlatformDOS,
- ADGF_USEEXTRAASTITLE,
+ ADGF_USEEXTRAASTITLE | ADGF_AUTOGENTARGET,
GAMEOPTIONS_DEFAULT
},
GID_FANMADE,
Commit: 1c830bc068de9b4831e6b3420d990899c1691eb8
https://github.com/scummvm/scummvm/commit/1c830bc068de9b4831e6b3420d990899c1691eb8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-10-21T19:13:12+02:00
Commit Message:
AD: Restrict length of autogenerated targets
Changed paths:
engines/advancedDetector.cpp
engines/advancedDetector.h
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index f79a9e75ac..c1ad1442b4 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -74,12 +74,14 @@ private:
const AdvancedMetaEngineDetection::FileMap &_fileMap;
};
-static Common::String sanitizeName(const char *name) {
+static Common::String sanitizeName(const char *name, int maxLen) {
Common::String res;
- while (*name) {
- if (Common::isAlnum(*name))
+ while (*name && maxLen > 0) {
+ if (Common::isAlnum(*name)) {
res += tolower(*name);
+ maxLen--;
+ }
name++;
}
@@ -92,11 +94,11 @@ static Common::String sanitizeName(const char *name) {
* or (if ADGF_DEMO has been set)
* GAMEID-demo-PLAFORM-LANG
*/
-static Common::String generatePreferredTarget(const ADGameDescription *desc) {
+static Common::String generatePreferredTarget(const ADGameDescription *desc, int maxLen) {
Common::String res;
if (desc->flags & ADGF_AUTOGENTARGET && desc->extra && *desc->extra) {
- res = sanitizeName(desc->extra);
+ res = sanitizeName(desc->extra, maxLen);
} else {
res = desc->gameId;
}
@@ -145,7 +147,7 @@ DetectedGame AdvancedMetaEngineDetection::toDetectedGame(const ADDetectedGame &a
DetectedGame game(getEngineId(), desc->gameId, title, desc->language, desc->platform, extra);
game.hasUnknownFiles = adGame.hasUnknownFiles;
game.matchedFiles = adGame.matchedFiles;
- game.preferredTarget = generatePreferredTarget(desc);
+ game.preferredTarget = generatePreferredTarget(desc, _maxAutogenLength);
game.gameSupportLevel = kStableGame;
if (desc->flags & ADGF_UNSTABLE)
@@ -672,6 +674,7 @@ AdvancedMetaEngineDetection::AdvancedMetaEngineDetection(const void *descs, uint
_maxScanDepth = 1;
_directoryGlobs = NULL;
_matchFullPaths = false;
+ _maxAutogenLength = 15;
}
void AdvancedMetaEngineDetection::initSubSystems(const ADGameDescription *gameDesc) const {
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index b7e2396b0e..54ae73e3e4 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -246,6 +246,12 @@ protected:
*/
bool _matchFullPaths;
+ /**
+ * If we use ADGF_AUTOGENTARGET, then this specifies the max length
+ * of the autogenerated name. The default is 15
+ */
+ int _maxAutogenLength;
+
public:
AdvancedMetaEngineDetection(const void *descs, uint descItemSize, const PlainGameDescriptor *gameIds, const ADExtraGuiOptionsMap *extraGuiOptions = 0);
Commit: 9be82ea2f49da4adc65d50666f057452450c0d94
https://github.com/scummvm/scummvm/commit/9be82ea2f49da4adc65d50666f057452450c0d94
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-10-21T22:12:16+02:00
Commit Message:
AD: Better automatic generation of game targer
- Passing numbers
- Skipping short words
- Skipping articles
- Fitting whole words
Changed paths:
engines/advancedDetector.cpp
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index c1ad1442b4..adebdc008a 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -76,14 +76,25 @@ private:
static Common::String sanitizeName(const char *name, int maxLen) {
Common::String res;
+ Common::String word;
- while (*name && maxLen > 0) {
+ do {
if (Common::isAlnum(*name)) {
- res += tolower(*name);
- maxLen--;
+ word += tolower(*name);
+ } else {
+ // Skipping short words and "the"
+ if ((word.size() > 2 && !word.equals("the")) || (!word.empty() && Common::isDigit(word[0]))) {
+ // Adding first word, or when word fits
+ if (res.empty() || word.size() < maxLen)
+ res += word;
+
+ maxLen -= word.size();
+ }
+ word.clear();
}
- name++;
- }
+ if (*name)
+ name++;
+ } while (*name && maxLen > 0);
return res;
}
Commit: f3787aeb28f5e66136cce6f4568e1992ac571a7c
https://github.com/scummvm/scummvm/commit/f3787aeb28f5e66136cce6f4568e1992ac571a7c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-10-21T22:17:03+02:00
Commit Message:
AGI: Added another fanmade game
Changed paths:
engines/agi/detection_tables.h
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index ab465d735b..9faf40297e 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -680,6 +680,7 @@ static const AGIGameDescription gameDescriptions[] = {
GAME_PS("xmascard", "", "25ad35e9628fc77e5e0dd35852a272b6", 768, 0x2440, GID_XMASCARD, Common::kPlatformCoCo3),
FANMADE_FO("2 Player Demo", "4279f46b3cebd855132496476b1d2cca", GF_AGIMOUSE, GAMEOPTIONS_FANMADE_MOUSE),
+ FANMADE("Advanced Epic Fighting", "6454e8c82a7351c8eef5927ad306af4f"),
FANMADE("AGI Combat", "0be6a8a9e19203dcca0067d280798871"),
FANMADE("AGI Combat (Beta)", "341a47d07be8490a488d0c709578dd10"),
FANMADE("AGI Contest 1 Template", "d879aed25da6fc655564b29567358ae2"),
Commit: e09c12bf713d80d2028d8b67428745c0859d99ac
https://github.com/scummvm/scummvm/commit/e09c12bf713d80d2028d8b67428745c0859d99ac
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-10-21T22:37:58+02:00
Commit Message:
AGI: Fix crashes in WagParser
Changed paths:
engines/agi/wagparser.cpp
diff --git a/engines/agi/wagparser.cpp b/engines/agi/wagparser.cpp
index fa11654ad9..616808763d 100644
--- a/engines/agi/wagparser.cpp
+++ b/engines/agi/wagparser.cpp
@@ -54,7 +54,6 @@ void WagProperty::deepCopy(const WagProperty &other) {
_propNum = other._propNum;
_propSize = other._propSize;
- deleteData(); // Delete old data (If any) and set _propData to NULL
if (other._propData != NULL) {
_propData = new char[other._propSize + 1UL]; // Allocate space for property's data plus trailing zero
memcpy(_propData, other._propData, other._propSize + 1UL); // Copy the whole thing
@@ -63,8 +62,8 @@ void WagProperty::deepCopy(const WagProperty &other) {
bool WagProperty::read(Common::SeekableReadStream &stream) {
// First read the property's header
- _propCode = (enum WagPropertyCode) stream.readByte();
- _propType = (enum WagPropertyType) stream.readByte();
+ _propCode = (enum WagPropertyCode)stream.readByte();
+ _propType = (enum WagPropertyType)stream.readByte();
_propNum = stream.readByte();
_propSize = stream.readUint16LE();
@@ -74,7 +73,6 @@ bool WagProperty::read(Common::SeekableReadStream &stream) {
}
// Then read the property's data
- deleteData(); // Delete old data (If any)
_propData = new char[_propSize + 1UL]; // Allocate space for property's data plus trailing zero
uint32 readBytes = stream.read(_propData, _propSize); // Read the data in
_propData[_propSize] = 0; // Set the trailing zero for easy C-style string access
@@ -98,7 +96,8 @@ void WagProperty::setDefaults() {
}
void WagProperty::deleteData() {
- delete[] _propData;
+ if (_propData)
+ delete[] _propData;
_propData = NULL;
}
Commit: e282eb5c9555454c24cb95ae9f757652a127acef
https://github.com/scummvm/scummvm/commit/e282eb5c9555454c24cb95ae9f757652a127acef
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-10-21T22:58:45+02:00
Commit Message:
AGI: Added several additional targets. Most are problematic
Changed paths:
engines/agi/detection_tables.h
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index 9faf40297e..61581016e6 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -150,6 +150,9 @@ static const AGIGameDescription gameDescriptions[] = {
// AGI Demo 2 (PC 5.25") 01/88 [v2] [AGI 2.917]
GAME("agidemo", "Demo 2 1987-11-25 [version 2] 5.25\"", "1503f02086ea9f388e7e041c039eaa69", 0x2917, GID_AGIDEMO),
+ // AGI Demo 2 Tandy
+ GAME("agidemo", "Demo 2 Tandy", "94eca021fe7da8f8572c2edcc631bbc6", 0x2917, GID_AGIDEMO),
+
// AGI Demo 3 (PC) 09/88 [AGI 3.002.102]
GAME3("agidemo", "Demo 3 1988-09-13", "dmdir", "289c7a2c881f1d973661e961ced77d74", 0x3149, GID_AGIDEMO),
@@ -277,6 +280,7 @@ static const AGIGameDescription gameDescriptions[] = {
// Gold Rush! 2.01 12/22/88 - pirated copy, according to https://bugs.scummvm.org/ticket/3220
GAME3_PIRATED("goldrush", "2.01 1988-12-22", "grdir", "3ae052117feb483f01a9017025fbb366", 2399, GID_GOLDRUSH),
+ GAME3_PIRATED("goldrush", "2.01 1988-12-22", "grdir", "1ef85c37fcf7224f9731f20f169c8c53", 2399, GID_GOLDRUSH),
// Gold Rush! (PC 3.5", bought from The Software Farm) 3.0 1998-12-22 [AGI 3.002.149]
GAME3("goldrush", "3.0 1998-12-22 3.5\"", "grdir", "6882b6090473209da4cd78bb59f78dbe", 0x3149, GID_GOLDRUSH),
@@ -502,12 +506,10 @@ static const AGIGameDescription gameDescriptions[] = {
// Preagi game
GAMEpre_P("mickey", "", "1.pic", "b6ec04c91a05df374792872c4d4ce66d", 0x0000, GID_MICKEY, Common::kPlatformDOS),
-#if 0
// Mixed-Up Mother Goose (Amiga) 1.1
// Problematic: crashes
// Menus not tested
GAME3_PSO("mixedup", "1.1 1986-12-10", "dirs", "5c1295fe6daaf95831195ba12894dbd9", 2021, 0x3086, 0, GID_MIXEDUP, Common::kPlatformAmiga, GAMEOPTIONS_AMIGA),
-#endif
// Mixed Up Mother Goose (IIgs)
GAME_PO("mixedup", "1987", "3541954a7303467c6df87665312ffb6a", 0x2917, GID_MIXEDUP, Common::kPlatformApple2GS, GAMEOPTIONS_APPLE2GS),
@@ -708,6 +710,8 @@ static const AGIGameDescription gameDescriptions[] = {
FANMADE("Al Pond 1 - Al Lives Forever (v1.0)", "e8921c3043b749b056ff51f56d1b451b"),
FANMADE("Al Pond 1 - Al Lives Forever (v1.3)", "fb4699474054962e0dbfb4cf12ca52f6"),
FANMADE("Apocalyptic Quest (v0.03 Teaser)", "42ced528b67965d3bc3b52c635f94a57"),
+ FANMADE("Apocalyptic Quest Demo 2003-06-24", "c68c49a37eaac73e5aa80ce7f05bbd72"),
+ FANMADE("Apocalyptic Quest 4.00 Alpha 2", "30c74d194840abc3fb1341b567743ac3"),
FANMADE_FO("Apocalyptic Quest (v4.00 Alpha 1)", "e15581628d84949b8d352d224ec3184b", GF_AGIMOUSE, GAMEOPTIONS_FANMADE_MOUSE),
FANMADE_FO("Apocalyptic Quest (v4.00 Alpha 2)", "0eee850005860e46345b38fea093d194", GF_AGIMOUSE, GAMEOPTIONS_FANMADE_MOUSE),
FANMADE_FO("Band Quest (Demo)", "7326abefd793571cc17ed0db647bdf34", GF_AGIMOUSE, GAMEOPTIONS_FANMADE_MOUSE),
More information about the Scummvm-git-logs
mailing list