aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
diff options
context:
space:
mode:
authorMax Horn2008-11-06 17:05:54 +0000
committerMax Horn2008-11-06 17:05:54 +0000
commit40136f25909bd8773cac0f08740a36037395e9a7 (patch)
treebf61db949f9942c10cad667042b1e2403a9b51cd /engines/lure
parent4c8f221fb8f5735932652c3279efd6f2e941d948 (diff)
downloadscummvm-rg350-40136f25909bd8773cac0f08740a36037395e9a7.tar.gz
scummvm-rg350-40136f25909bd8773cac0f08740a36037395e9a7.tar.bz2
scummvm-rg350-40136f25909bd8773cac0f08740a36037395e9a7.zip
Switched various Engine APIs to use Common::Error
svn-id: r34916
Diffstat (limited to 'engines/lure')
-rw-r--r--engines/lure/lure.cpp16
-rw-r--r--engines/lure/lure.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index 32eb0dbe21..282aa9801d 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -48,7 +48,7 @@ LureEngine::LureEngine(OSystem *system, const LureGameDescription *gameDesc): En
Common::addSpecialDebugLevel(kLureDebugStrings, "strings", "Strings debugging");
}
-int LureEngine::init() {
+Common::Error LureEngine::init() {
int_engine = this;
_initialised = false;
@@ -62,7 +62,7 @@ int LureEngine::init() {
VersionStructure version;
if (!f.open(SUPPORT_FILENAME)) {
GUIError("Could not locate Lure support file");
- return 1;
+ return Common::kUnknownError;
}
f.seek(0xbf * 8);
@@ -71,12 +71,12 @@ int LureEngine::init() {
if (READ_LE_UINT16(&version.id) != 0xffff) {
GUIError("Error validating %s - file is invalid or out of date", SUPPORT_FILENAME);
- return 1;
+ return Common::kUnknownError;
} else if ((version.vMajor != LURE_DAT_MAJOR) || (version.vMinor != LURE_DAT_MINOR)) {
GUIError("Incorrect version of %s file - expected %d.%d but got %d.%d",
SUPPORT_FILENAME, LURE_DAT_MAJOR, LURE_DAT_MINOR,
version.vMajor, version.vMinor);
- return 1;
+ return Common::kUnknownError;
}
_disk = new Disk();
@@ -92,7 +92,7 @@ int LureEngine::init() {
_gameToLoad = -1;
_initialised = true;
- return 0;
+ return Common::kNoError;
}
LureEngine::~LureEngine() {
@@ -119,7 +119,7 @@ LureEngine &LureEngine::getReference() {
return *int_engine;
}
-int LureEngine::go() {
+Common::Error LureEngine::go() {
Game *gameInstance = new Game();
// If requested, load a savegame instead of showing the intro
@@ -135,7 +135,7 @@ int LureEngine::go() {
bool result = dialog->show();
delete dialog;
if (shouldQuit())
- return 0;
+ return Common::kNoError;
if (!result)
error("Sorry - copy protection failed");
@@ -158,7 +158,7 @@ int LureEngine::go() {
}
delete gameInstance;
- return 0;
+ return Common::kNoError;
}
void LureEngine::pauseEngineIntern(bool pause) {
diff --git a/engines/lure/lure.h b/engines/lure/lure.h
index a1e1448e0f..38029a0601 100644
--- a/engines/lure/lure.h
+++ b/engines/lure/lure.h
@@ -70,8 +70,8 @@ public:
static LureEngine &getReference();
// Engine APIs
- virtual int init();
- virtual int go();
+ virtual Common::Error init();
+ virtual Common::Error go();
virtual bool hasFeature(EngineFeature f) const;
virtual void syncSoundSettings();
virtual void pauseEngineIntern(bool pause);