diff options
-rw-r--r-- | engines/made/detection.cpp | 11 | ||||
-rw-r--r-- | engines/made/made.cpp | 6 | ||||
-rw-r--r-- | engines/made/made.h | 5 | ||||
-rw-r--r-- | engines/made/pmvplayer.cpp | 6 | ||||
-rw-r--r-- | engines/made/script.cpp | 7 |
5 files changed, 18 insertions, 17 deletions
diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp index df9db57ecc..57597ced37 100644 --- a/engines/made/detection.cpp +++ b/engines/made/detection.cpp @@ -348,12 +348,23 @@ public: return "MADE Engine (C) Activision"; } + virtual bool hasFeature(MetaEngineFeature f) const; virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const; const Common::ADGameDescription *fallbackDetect(const Common::FSList &fslist) const; }; +bool MadeMetaEngine::hasFeature(MetaEngineFeature f) const { + return + false; +} + +bool Made::MadeEngine::hasFeature(EngineFeature f) const { + return + (f == kSupportsRTL); +} + bool MadeMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const { const Made::MadeGameDescription *gd = (const Made::MadeGameDescription *)desc; if (gd) { diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 2b7411fb3d..b907603c76 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -116,8 +116,6 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng debug(1, "Music disabled."); } - _quit = false; - // Set default sound frequency // Return to Zork sets it itself via a script funtion if (getGameID() == GID_MANHOLE || getGameID() == GID_RODNEY) { @@ -230,10 +228,6 @@ void MadeEngine::handleEvents() { _eventNum = 5; break; - case Common::EVENT_QUIT: - _quit = true; - break; - default: break; diff --git a/engines/made/made.h b/engines/made/made.h index e06d0fd0b1..e874193c3e 100644 --- a/engines/made/made.h +++ b/engines/made/made.h @@ -85,6 +85,9 @@ protected: public: MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc); virtual ~MadeEngine(); + + virtual bool hasFeature(EngineFeature f) const; + int getGameId() { return _gameId; } @@ -105,8 +108,6 @@ public: ScriptInterpreter *_script; MusicPlayer *_music; - bool _quit; - uint16 _eventNum; int _eventMouseX, _eventMouseY; uint16 _eventKey; diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index 6fe0f1c80d..92497b74de 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -95,7 +95,7 @@ void PmvPlayer::play(const char *filename) { // get it to work well? _audioStream = Audio::makeAppendableAudioStream(soundFreq, Audio::Mixer::FLAG_UNSIGNED); - while (!_abort && !_fd->eos()) { + while (!_vm->shouldQuit() && !_abort && !_fd->eos()) { int32 frameTime = _vm->_system->getMillis(); @@ -214,10 +214,6 @@ void PmvPlayer::handleEvents() { if (event.kbd.keycode == Common::KEYCODE_ESCAPE) _abort = true; break; - case Common::EVENT_QUIT: - _vm->_quit = true; - _abort = true; - break; default: break; } diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 62c0cf338b..bcaf28d45b 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -191,7 +191,6 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { uint32 opcodeSleepCounter = 0; - _vm->_quit = false; _runningScriptObjectIndex = scriptObjectIndex; _localStackPos = _stack.getStackPos(); @@ -199,7 +198,7 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { _codeBase = _vm->_dat->getObject(_runningScriptObjectIndex)->getData(); _codeIp = _codeBase; - while (!_vm->_quit) { + while (!_vm->shouldQuit()) { _vm->handleEvents(); @@ -427,14 +426,14 @@ void ScriptInterpreter::cmd_vsize() { } void ScriptInterpreter::cmd_exit() { - _vm->_quit = true; + _vm->quitGame(); } void ScriptInterpreter::cmd_return() { // Check if returning from main function if (_localStackPos == kScriptStackSize) { - _vm->_quit = true; + _vm->quitGame(); return; } |