aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2007-08-13 09:02:11 +0000
committerEugene Sandulenko2007-08-13 09:02:11 +0000
commitdaf5c3055157375b3448e7512f37d0ed08b6273b (patch)
treef4812806805deacb5056a986c2852f1134ecc44e /engines
parentfb72a5539cadc732927862c4e4341d3c2718c2fe (diff)
downloadscummvm-rg350-daf5c3055157375b3448e7512f37d0ed08b6273b.tar.gz
scummvm-rg350-daf5c3055157375b3448e7512f37d0ed08b6273b.tar.bz2
scummvm-rg350-daf5c3055157375b3448e7512f37d0ed08b6273b.zip
Switch Parallaction back to single gameid (to be compatible with 0.10.x), and
made it use new AdvancedDetector features. svn-id: r28585
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/detection.cpp39
1 files changed, 17 insertions, 22 deletions
diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp
index 84c45584a4..ebfc37e795 100644
--- a/engines/parallaction/detection.cpp
+++ b/engines/parallaction/detection.cpp
@@ -48,6 +48,7 @@ Common::Platform Parallaction::getPlatform() const { return _gameDescription->de
}
static const PlainGameDescriptor parallactionGames[] = {
+ {"parallaction", "Parallaction engine game"},
{"nippon", "Nippon Safes Inc."},
{"bra", "The Big Red Adventure"},
{0, 0}
@@ -176,7 +177,7 @@ static const Common::ADParams detectionParams = {
// Structure for autoupgrading obsolete targets
0,
// Name of single gameid (optional)
- 0,
+ "parallaction",
// List of files for file-based fallback detection (optional)
0,
// Fallback callback
@@ -185,33 +186,27 @@ static const Common::ADParams detectionParams = {
Common::kADFlagAugmentPreferredTarget
};
-GameList Engine_PARALLACTION_gameIDList() {
- return GameList(parallactionGames);
-}
-
-GameDescriptor Engine_PARALLACTION_findGameID(const char *gameid) {
- return Common::AdvancedDetector::findGameID(gameid, parallactionGames);
-}
-
-GameList Engine_PARALLACTION_detectGames(const FSList &fslist) {
- return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
-PluginError Engine_PARALLACTION_create(OSystem *syst, Engine **engine) {
- assert(engine);
- const char *gameid = ConfMan.get("gameid").c_str();
+bool engineCreate(OSystem *syst, Engine **engine, Common::EncapsulatedADGameDesc encapsulatedDesc) {
+ const Parallaction::PARALLACTIONGameDescription *gd = (const Parallaction::PARALLACTIONGameDescription *)(encapsulatedDesc.realDesc);
+ bool res = true;
- if (!scumm_stricmp("nippon", gameid)) {
+ switch (gd->gameType) {
+ case Parallaction::GType_Nippon:
*engine = new Parallaction::Parallaction_ns(syst);
- } else
- if (!scumm_stricmp("bra", gameid)) {
+ break;
+ case Parallaction::GType_BRA:
*engine = new Parallaction::Parallaction_br(syst);
- } else
- error("Parallaction engine created with invalid gameid ('%s')", gameid);
+ break;
+ default:
+ res = false;
+ error("Parallaction engine: unknown gameType");
+ }
- return kNoError;
+ return res;
}
+ADVANCED_DETECTOR_DEFINE_PLUGIN_WITH_COMPLEX_CREATION(PARALLACTION, engineCreate, detectionParams);
+
REGISTER_PLUGIN(PARALLACTION, "Parallaction engine", "Nippon Safes Inc. (C) Dynabyte");