aboutsummaryrefslogtreecommitdiff
path: root/engines/m4
diff options
context:
space:
mode:
Diffstat (limited to 'engines/m4')
-rw-r--r--engines/m4/m4.cpp16
-rw-r--r--engines/m4/m4.h10
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;