aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
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/saga
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/saga')
-rw-r--r--engines/saga/detection.cpp4
-rw-r--r--engines/saga/saga.cpp12
-rw-r--r--engines/saga/saga.h6
3 files changed, 11 insertions, 11 deletions
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp
index d5f3659dd4..c49661a052 100644
--- a/engines/saga/detection.cpp
+++ b/engines/saga/detection.cpp
@@ -245,7 +245,7 @@ int SagaEngine::getDisplayHeight() const {
return di.logicalHeight;
}
-int SagaEngine::loadGameState(int slot) {
+Common::Error SagaEngine::loadGameState(int slot) {
// Init the current chapter to 8 (character selection) for IHNM
if (getGameType() == GType_IHNM)
_scene->changeScene(-2, 0, kTransitionFade, 8);
@@ -262,7 +262,7 @@ int SagaEngine::loadGameState(int slot) {
load(calcSaveFileName((uint)slot));
syncSoundSettings();
- return 0; // TODO: return success/failure
+ return Common::kNoError; // TODO: return success/failure
}
} // End of namespace Saga
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index 4ee81269d2..ee471f9330 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -140,7 +140,7 @@ SagaEngine::~SagaEngine() {
delete _resource;
}
-int SagaEngine::init() {
+Common::Error SagaEngine::init() {
_musicVolume = ConfMan.getInt("music_volume");
_subtitlesEnabled = ConfMan.getBool("subtitles");
_readingSpeed = getTalkspeed();
@@ -156,7 +156,7 @@ int SagaEngine::init() {
// Detect game and open resource files
if (!initGame()) {
GUIErrorMessage("Error loading game resources.");
- return FAILURE;
+ return Common::kUnknownError;
}
// Initialize engine modules
@@ -197,7 +197,7 @@ int SagaEngine::init() {
_music->setAdlib(adlib);
_render = new Render(this, _system);
if (!_render->initialized()) {
- return FAILURE;
+ return Common::kUnknownError;
}
// Initialize system specific sound
@@ -232,10 +232,10 @@ int SagaEngine::init() {
if (getGameType() == GType_ITE)
_system->setFeatureState(OSystem::kFeatureAutoComputeDirtyRects, true);
- return SUCCESS;
+ return Common::kNoError;
}
-int SagaEngine::go() {
+Common::Error SagaEngine::go() {
int msec = 0;
_previousTicks = _system->getMillis();
@@ -310,7 +310,7 @@ int SagaEngine::go() {
_system->delayMillis(10);
}
- return 0;
+ return Common::kNoError;
}
void SagaEngine::loadStrings(StringsTable &stringsTable, const byte *stringsPointer, size_t stringsLength) {
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 86c91c2f3a..6563cd30d6 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -488,8 +488,8 @@ class SagaEngine : public Engine {
public:
// 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();
@@ -652,7 +652,7 @@ public:
const Common::Rect &getDisplayClip() const { return _displayClip;}
int getDisplayWidth() const;
int getDisplayHeight() const;
- int loadGameState(int slot);
+ Common::Error loadGameState(int slot);
bool canLoadGameStateCurrently();
bool canSaveGameStateCurrently();
const GameDisplayInfo &getDisplayInfo();