diff options
author | Max Horn | 2008-11-06 17:05:54 +0000 |
---|---|---|
committer | Max Horn | 2008-11-06 17:05:54 +0000 |
commit | 40136f25909bd8773cac0f08740a36037395e9a7 (patch) | |
tree | bf61db949f9942c10cad667042b1e2403a9b51cd /engines/m4 | |
parent | 4c8f221fb8f5735932652c3279efd6f2e941d948 (diff) | |
download | scummvm-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/m4')
-rw-r--r-- | engines/m4/m4.cpp | 16 | ||||
-rw-r--r-- | engines/m4/m4.h | 10 |
2 files changed, 14 insertions, 12 deletions
diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp index 67201c2aff..45185b3b86 100644 --- a/engines/m4/m4.cpp +++ b/engines/m4/m4.cpp @@ -141,7 +141,7 @@ M4Engine::~M4Engine() { delete _resourceManager; } -int M4Engine::init() { +Common::Error M4Engine::init() { // Initialize backend _system->beginGFXTransaction(); initCommonGFX(isM4()); @@ -197,7 +197,7 @@ int M4Engine::init() { _random = new Common::RandomSource(); g_system->getEventManager()->registerRandomSource(*_random, "m4"); - return 0; + return Common::kNoError; } void M4Engine::eventHandler() { @@ -272,14 +272,14 @@ void M4Engine::loadMenu(MenuType menuType, bool loadSaveFromHotkey, bool calledF _viewManager->moveToFront(view); } -int M4Engine::go() { +Common::Error M4Engine::go() { if (isM4()) return goM4(); else return goMADS(); } -int M4Engine::goMADS() { +Common::Error M4Engine::goMADS() { _palette->setMadsSystemPalette(); _mouse->init("cursor.ss", NULL); @@ -351,10 +351,10 @@ int M4Engine::goMADS() { g_system->delayMillis(10); } - return 0; + return Common::kNoError; } -int M4Engine::goM4() { +Common::Error M4Engine::goM4() { _script->open("m4.dat"); @@ -375,7 +375,7 @@ int M4Engine::goM4() { } #endif - return 0; + return Common::kNoError; #endif // Set up the inventory @@ -520,7 +520,7 @@ int M4Engine::goM4() { g_system->delayMillis(10); } - return 0; + return Common::kNoError; } void M4Engine::dumpFile(const char* filename, bool uncompress) { diff --git a/engines/m4/m4.h b/engines/m4/m4.h index e989bcc4e6..ac3262e7b8 100644 --- a/engines/m4/m4.h +++ b/engines/m4/m4.h @@ -107,12 +107,14 @@ FORCEINLINE long FixedDiv(long a, long b) { return (long)(((float)a / (float)b) class M4Engine : public Engine { private: - int goMADS(); - int goM4(); + Common::Error goMADS(); + Common::Error goM4(); protected: - int init(); - int go(); + // Engine APIs + virtual Common::Error init(); + virtual Common::Error go(); + void shutdown(); MidiPlayer *_midi; |