[Scummvm-cvs-logs] SF.net SVN: scummvm: [28585] scummvm/trunk/engines/parallaction/detection. cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Mon Aug 13 11:02:11 CEST 2007
Revision: 28585
http://scummvm.svn.sourceforge.net/scummvm/?rev=28585&view=rev
Author: sev
Date: 2007-08-13 02:02:11 -0700 (Mon, 13 Aug 2007)
Log Message:
-----------
Switch Parallaction back to single gameid (to be compatible with 0.10.x), and
made it use new AdvancedDetector features.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/detection.cpp
Modified: scummvm/trunk/engines/parallaction/detection.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/detection.cpp 2007-08-13 09:00:52 UTC (rev 28584)
+++ scummvm/trunk/engines/parallaction/detection.cpp 2007-08-13 09:02:11 UTC (rev 28585)
@@ -48,6 +48,7 @@
}
static const PlainGameDescriptor parallactionGames[] = {
+ {"parallaction", "Parallaction engine game"},
{"nippon", "Nippon Safes Inc."},
{"bra", "The Big Red Adventure"},
{0, 0}
@@ -176,7 +177,7 @@
// 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 @@
Common::kADFlagAugmentPreferredTarget
};
-GameList Engine_PARALLACTION_gameIDList() {
- return GameList(parallactionGames);
-}
+bool engineCreate(OSystem *syst, Engine **engine, Common::EncapsulatedADGameDesc encapsulatedDesc) {
+ const Parallaction::PARALLACTIONGameDescription *gd = (const Parallaction::PARALLACTIONGameDescription *)(encapsulatedDesc.realDesc);
+ bool res = true;
-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();
-
- 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");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list