[Scummvm-cvs-logs] SF.net SVN: scummvm: [28247] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sat Jul 28 01:41:44 CEST 2007
Revision: 28247
http://scummvm.svn.sourceforge.net/scummvm/?rev=28247&view=rev
Author: peres001
Date: 2007-07-27 16:41:43 -0700 (Fri, 27 Jul 2007)
Log Message:
-----------
Added detection target for Big Red Adventure, and derived new engine classes for supported games.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/detection.cpp
scummvm/trunk/engines/parallaction/parallaction.h
Modified: scummvm/trunk/engines/parallaction/detection.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/detection.cpp 2007-07-27 19:02:19 UTC (rev 28246)
+++ scummvm/trunk/engines/parallaction/detection.cpp 2007-07-27 23:41:43 UTC (rev 28247)
@@ -27,6 +27,7 @@
#include "base/plugins.h"
+#include "common/config-manager.h"
#include "common/advancedDetector.h"
#include "parallaction/parallaction.h"
@@ -47,7 +48,6 @@
}
static const PlainGameDescriptor parallactionGames[] = {
- {"parallaction", "Parallaction engine game"},
{"nippon", "Nippon Safes Inc."},
{"bra", "The Big Red Adventure"},
{0, 0}
@@ -176,7 +176,7 @@
// Structure for autoupgrading obsolete targets
0,
// Name of single gameid (optional)
- "parallaction",
+ 0,
// List of files for file-based fallback detection (optional)
0,
// Fallback callback
@@ -185,8 +185,33 @@
Common::kADFlagAugmentPreferredTarget
};
-ADVANCED_DETECTOR_DEFINE_PLUGIN(PARALLACTION, Parallaction::Parallaction, detectionParams);
+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();
+
+ if (!scumm_stricmp("nippon", gameid)) {
+ *engine = new Parallaction::Parallaction_ns(syst);
+ } else
+ if (!scumm_stricmp("bra", gameid)) {
+ *engine = new Parallaction::Parallaction_br(syst);
+ } else
+ error("Parallaction engine created with invalid gameid ('%s')", gameid);
+
+ return kNoError;
+}
+
REGISTER_PLUGIN(PARALLACTION, "Parallaction engine", "Nippon Safes Inc. (C) Dynabyte");
Modified: scummvm/trunk/engines/parallaction/parallaction.h
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.h 2007-07-27 19:02:19 UTC (rev 28246)
+++ scummvm/trunk/engines/parallaction/parallaction.h 2007-07-27 23:41:43 UTC (rev 28247)
@@ -480,6 +480,22 @@
int16 getHoverInventoryItem(int16 x, int16 y);
};
+class Parallaction_ns : public Parallaction {
+
+public:
+ Parallaction_ns(OSystem* syst) : Parallaction(syst) { }
+ ~Parallaction_ns() { }
+
+};
+
+class Parallaction_br : public Parallaction {
+
+public:
+ Parallaction_br(OSystem* syst) : Parallaction(syst) { }
+ ~Parallaction_br() { }
+
+};
+
// FIXME: remove global
extern Parallaction *_vm;
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