aboutsummaryrefslogtreecommitdiff
path: root/engines/advancedDetector.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2017-12-03 12:19:08 +0100
committerBastien Bouclet2018-05-10 09:04:23 +0200
commit5aff87dc153f392cb14423efa78a96397789a6fd (patch)
tree66c2fd4a14f4f9a8668499b17e3630f49809f297 /engines/advancedDetector.cpp
parent643c24db75797728087999abd8acf1ecc83757fa (diff)
downloadscummvm-rg350-5aff87dc153f392cb14423efa78a96397789a6fd.tar.gz
scummvm-rg350-5aff87dc153f392cb14423efa78a96397789a6fd.tar.bz2
scummvm-rg350-5aff87dc153f392cb14423efa78a96397789a6fd.zip
ENGINES: Turn GameDescriptor into a simple struct
Diffstat (limited to 'engines/advancedDetector.cpp')
-rw-r--r--engines/advancedDetector.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 562ad5dfe2..ac606d3e4b 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -114,22 +114,22 @@ static Common::String sanitizeName(const char *name) {
void AdvancedMetaEngine::updateGameDescriptor(GameDescriptor &desc, const ADGameDescription *realDesc) const {
if (_singleId != NULL) {
- desc["preferredtarget"] = desc["gameid"];
- desc["gameid"] = _singleId;
+ desc.preferredTarget = desc.gameId;
+ desc.gameId = _singleId;
}
- if (!desc.contains("preferredtarget"))
- desc["preferredtarget"] = desc["gameid"];
+ if (desc.preferredTarget.empty())
+ desc.preferredTarget = desc.gameId;
if (realDesc->flags & ADGF_AUTOGENTARGET) {
if (*realDesc->extra)
- desc["preferredtarget"] = sanitizeName(realDesc->extra);
+ desc.preferredTarget = sanitizeName(realDesc->extra);
}
- desc["preferredtarget"] = generatePreferredTarget(desc["preferredtarget"], realDesc);
+ desc.preferredTarget = generatePreferredTarget(desc.preferredTarget, realDesc);
if (_flags & kADFlagUseExtraAsHint)
- desc["extra"] = realDesc->extra;
+ desc.extra = realDesc->extra;
desc.setGUIOptions(realDesc->guiOptions + _guiOptions);
desc.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(realDesc->language));
@@ -329,13 +329,13 @@ Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine)
showTestingWarning = true;
#endif
- if (((gameDescriptor.getSupportLevel() == kUnstableGame
- || (gameDescriptor.getSupportLevel() == kTestingGame
+ if (((gameDescriptor.gameSupportLevel == kUnstableGame
+ || (gameDescriptor.gameSupportLevel == kTestingGame
&& showTestingWarning)))
&& !Engine::warnUserAboutUnsupportedGame())
return Common::kUserCanceled;
- debug(2, "Running %s", gameDescriptor.description().c_str());
+ debug(2, "Running %s", gameDescriptor.description.c_str());
initSubSystems(agdDesc.desc);
if (!createInstance(syst, engine, agdDesc.desc))
return Common::kNoGameDataFoundError;