aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2008-11-05 17:24:56 +0000
committerMax Horn2008-11-05 17:24:56 +0000
commitf32be876337e3b280ee4ea257e9868a0d61e399d (patch)
tree999037656b6a01f8a0e379801f64c79d18a76dba /engines
parentfe2935ad4b550afa68977169140267ef2ef4a3da (diff)
downloadscummvm-rg350-f32be876337e3b280ee4ea257e9868a0d61e399d.tar.gz
scummvm-rg350-f32be876337e3b280ee4ea257e9868a0d61e399d.tar.bz2
scummvm-rg350-f32be876337e3b280ee4ea257e9868a0d61e399d.zip
Turned enum PluginError into Common::Error, which in the future is to be used in more places. Help with this is highly welcome
svn-id: r34906
Diffstat (limited to 'engines')
-rw-r--r--engines/metaengine.h4
-rw-r--r--engines/queen/queen.cpp6
-rw-r--r--engines/scumm/detection.cpp10
-rw-r--r--engines/sky/sky.cpp8
-rw-r--r--engines/sword1/sword1.cpp7
-rw-r--r--engines/sword2/sword2.cpp10
6 files changed, 21 insertions, 24 deletions
diff --git a/engines/metaengine.h b/engines/metaengine.h
index 24995cd41b..fb4c5c2938 100644
--- a/engines/metaengine.h
+++ b/engines/metaengine.h
@@ -75,9 +75,9 @@ public:
* @param syst Pointer to the global OSystem object
* @param engine Pointer to a pointer which the MetaEngine sets to
* the newly create Engine, or 0 in case of an error
- * @return a PluginError describing the error which occurred, or kNoError
+ * @return a Common::Error describing the error which occurred, or kNoError
*/
- virtual PluginError createInstance(OSystem *syst, Engine **engine) const = 0;
+ virtual Common::Error createInstance(OSystem *syst, Engine **engine) const = 0;
/**
* Return a list of all save states associated with the given target.
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index 8740497587..50936f8bb7 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -65,7 +65,7 @@ public:
virtual SaveStateList listSaves(const char *target) const;
virtual void removeSaveState(const char *target, int slot) const;
- virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
+ virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
};
const char *QueenMetaEngine::getName() const {
@@ -174,10 +174,10 @@ void QueenMetaEngine::removeSaveState(const char *target, int slot) const {
g_system->getSavefileManager()->removeSavefile(filename.c_str());
}
-PluginError QueenMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
+Common::Error QueenMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
assert(engine);
*engine = new Queen::QueenEngine(syst);
- return kNoError;
+ return Common::kNoError;
}
#if PLUGIN_ENABLED_DYNAMIC(QUEEN)
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 297e0b8efd..fc85e13250 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -682,7 +682,7 @@ public:
virtual GameDescriptor findGame(const char *gameid) const;
virtual GameList detectGames(const Common::FSList &fslist) const;
- virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
+ virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
virtual SaveStateList listSaves(const char *target) const;
virtual void removeSaveState(const char *target, int slot) const;
@@ -765,7 +765,7 @@ GameList ScummMetaEngine::detectGames(const Common::FSList &fslist) const {
*
* This is heavily based on our MD5 detection scheme.
*/
-PluginError ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
+Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
assert(syst);
assert(engine);
const char *gameid = ConfMan.get("gameid").c_str();
@@ -792,7 +792,7 @@ PluginError ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) cons
Common::FSList fslist;
Common::FSNode dir(ConfMan.get("path"));
if (!dir.getChildren(fslist, Common::FSNode::kListFilesOnly)) {
- return kInvalidPathError;
+ return Common::kInvalidPathError;
}
// Invoke the detector, but fixed to the specified gameid.
@@ -801,7 +801,7 @@ PluginError ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) cons
// Unable to locate game data
if (results.empty()) {
- return kNoGameDataFoundError;
+ return Common::kNoGameDataFoundError;
}
// No unique match found. If a platform override is present, try to
@@ -943,7 +943,7 @@ PluginError ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) cons
error("Engine_SCUMM_create(): Unknown version of game engine");
}
- return kNoError;
+ return Common::kNoError;
}
const char *ScummMetaEngine::getName() const {
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index 8250766f1a..1abb3d94f6 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -23,8 +23,6 @@
*
*/
-
-
#include "base/plugins.h"
#include "common/config-manager.h"
@@ -115,7 +113,7 @@ public:
virtual GameDescriptor findGame(const char *gameid) const;
virtual GameList detectGames(const Common::FSList &fslist) const;
- virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
+ virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
virtual SaveStateList listSaves(const char *target) const;
};
@@ -203,10 +201,10 @@ GameList SkyMetaEngine::detectGames(const Common::FSList &fslist) const {
return detectedGames;
}
-PluginError SkyMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
+Common::Error SkyMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
assert(engine);
*engine = new Sky::SkyEngine(syst);
- return kNoError;
+ return Common::kNoError;
}
SaveStateList SkyMetaEngine::listSaves(const char *target) const {
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 982b6cf6e4..9a6bfac030 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -23,7 +23,6 @@
*
*/
-
#include "sword1/sword1.h"
#include "base/plugins.h"
@@ -101,7 +100,7 @@ public:
virtual GameList detectGames(const Common::FSList &fslist) const;
virtual SaveStateList listSaves(const char *target) const;
- virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
+ virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
};
bool SwordMetaEngine::hasFeature(MetaEngineFeature f) const {
@@ -195,10 +194,10 @@ GameList SwordMetaEngine::detectGames(const Common::FSList &fslist) const {
return detectedGames;
}
-PluginError SwordMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
+Common::Error SwordMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
assert(engine);
*engine = new SwordEngine(syst);
- return kNoError;
+ return Common::kNoError;
}
SaveStateList SwordMetaEngine::listSaves(const char *target) const {
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 23751ea3ef..c596e2f8c0 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -87,7 +87,7 @@ public:
virtual SaveStateList listSaves(const char *target) const;
virtual void removeSaveState(const char *target, int slot) const;
- virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
+ virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
};
bool Sword2MetaEngine::hasFeature(MetaEngineFeature f) const {
@@ -211,14 +211,14 @@ void Sword2MetaEngine::removeSaveState(const char *target, int slot) const {
g_system->getSavefileManager()->removeSavefile(filename.c_str());
}
-PluginError Sword2MetaEngine::createInstance(OSystem *syst, Engine **engine) const {
+Common::Error Sword2MetaEngine::createInstance(OSystem *syst, Engine **engine) const {
assert(syst);
assert(engine);
Common::FSList fslist;
Common::FSNode dir(ConfMan.get("path"));
if (!dir.getChildren(fslist, Common::FSNode::kListAll)) {
- return kInvalidPathError;
+ return Common::kInvalidPathError;
}
// Invoke the detector
@@ -228,11 +228,11 @@ PluginError Sword2MetaEngine::createInstance(OSystem *syst, Engine **engine) con
for (uint i = 0; i < detectedGames.size(); i++) {
if (detectedGames[i].gameid() == gameid) {
*engine = new Sword2::Sword2Engine(syst);
- return kNoError;
+ return Common::kNoError;
}
}
- return kNoGameDataFoundError;
+ return Common::kNoGameDataFoundError;
}
#if PLUGIN_ENABLED_DYNAMIC(SWORD2)