diff options
Diffstat (limited to 'engines/made')
-rw-r--r-- | engines/made/made.cpp | 7 | ||||
-rw-r--r-- | engines/made/made.h | 1 | ||||
-rw-r--r-- | engines/made/scriptfuncs.cpp | 13 |
3 files changed, 9 insertions, 12 deletions
diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 51cdd83b2a..4b59723772 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -38,7 +38,6 @@ #include "base/plugins.h" #include "base/version.h" -#include "sound/audiocd.h" #include "sound/mixer.h" #include "made/made.h" @@ -81,7 +80,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng int cd_num = ConfMan.getInt("cdrom"); if (cd_num >= 0) - _system->openCD(cd_num); + _system->getAudioCDManager()->openCD(cd_num); _pmvPlayer = new PmvPlayer(this, _mixer); _res = new ResourceReader(); @@ -130,7 +129,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng } MadeEngine::~MadeEngine() { - AudioCD.stop(); + _system->getAudioCDManager()->stop(); delete _rnd; delete _pmvPlayer; @@ -242,7 +241,7 @@ void MadeEngine::handleEvents() { } } - AudioCD.updateCD(); + _system->getAudioCDManager()->updateCD(); } diff --git a/engines/made/made.h b/engines/made/made.h index 08f9add33d..553476540a 100644 --- a/engines/made/made.h +++ b/engines/made/made.h @@ -42,7 +42,6 @@ #include "sound/audiostream.h" #include "sound/mixer.h" #include "sound/decoders/voc.h" -#include "sound/audiocd.h" #include "engines/engine.h" diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index 8d01ec70f3..2f069e882e 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -27,7 +27,6 @@ #include "common/util.h" #include "common/events.h" #include "graphics/cursorman.h" -#include "sound/audiocd.h" #include "sound/softsynth/pcspk.h" #include "made/made.h" @@ -654,9 +653,9 @@ int16 ScriptFunctions::sfPlayVoice(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfPlayCd(int16 argc, int16 *argv) { - AudioCD.play(argv[0] - 1, 1, 0, 0); + g_system->getAudioCDManager()->play(argv[0] - 1, 1, 0, 0); _vm->_cdTimeStart = _vm->_system->getMillis(); - if (AudioCD.isPlaying()) { + if (g_system->getAudioCDManager()->isPlaying()) { return 1; } else { return 0; @@ -664,8 +663,8 @@ int16 ScriptFunctions::sfPlayCd(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfStopCd(int16 argc, int16 *argv) { - if (AudioCD.isPlaying()) { - AudioCD.stop(); + if (g_system->getAudioCDManager()->isPlaying()) { + g_system->getAudioCDManager()->stop(); return 1; } else { return 0; @@ -673,11 +672,11 @@ int16 ScriptFunctions::sfStopCd(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfGetCdStatus(int16 argc, int16 *argv) { - return AudioCD.isPlaying() ? 1 : 0; + return g_system->getAudioCDManager()->isPlaying() ? 1 : 0; } int16 ScriptFunctions::sfGetCdTime(int16 argc, int16 *argv) { - if (AudioCD.isPlaying()) { + if (g_system->getAudioCDManager()->isPlaying()) { uint32 deltaTime = _vm->_system->getMillis() - _vm->_cdTimeStart; // This basically converts the time from milliseconds to MSF format to MADE's format return (deltaTime / 1000 * 30) + (deltaTime % 1000 / 75 * 30 / 75); |