diff options
author | Alejandro Marzini | 2010-06-09 20:09:57 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-06-09 20:09:57 +0000 |
commit | e991cd8c53ad21af037df1e0a16816aeea2d0fe2 (patch) | |
tree | f647f636fc3898c150db61de50c3522056a65d17 /engines/made/scriptfuncs.cpp | |
parent | 4177a1e16df7712c081e41a8eabf0b7d4694230b (diff) | |
download | scummvm-rg350-e991cd8c53ad21af037df1e0a16816aeea2d0fe2.tar.gz scummvm-rg350-e991cd8c53ad21af037df1e0a16816aeea2d0fe2.tar.bz2 scummvm-rg350-e991cd8c53ad21af037df1e0a16816aeea2d0fe2.zip |
- Revised abstract AudioCDManager.
- Removed AudioCDManager Singleton, and changed code for using AudioCDManager in OSystem.
- Added initialization code for new AudioCDManager in BaseBackend and OSystem_SDL.
svn-id: r49548
Diffstat (limited to 'engines/made/scriptfuncs.cpp')
-rw-r--r-- | engines/made/scriptfuncs.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index cd4081ea52..8714c45173 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 "made/made.h" #include "made/resource.h" @@ -595,9 +594,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->getAudioCD()->play(argv[0] - 1, 1, 0, 0); _vm->_cdTimeStart = _vm->_system->getMillis(); - if (AudioCD.isPlaying()) { + if (g_system->getAudioCD()->isPlaying()) { return 1; } else { return 0; @@ -605,8 +604,8 @@ int16 ScriptFunctions::sfPlayCd(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfStopCd(int16 argc, int16 *argv) { - if (AudioCD.isPlaying()) { - AudioCD.stop(); + if (g_system->getAudioCD()->isPlaying()) { + g_system->getAudioCD()->stop(); return 1; } else { return 0; @@ -614,11 +613,11 @@ int16 ScriptFunctions::sfStopCd(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfGetCdStatus(int16 argc, int16 *argv) { - return AudioCD.isPlaying() ? 1 : 0; + return g_system->getAudioCD()->isPlaying() ? 1 : 0; } int16 ScriptFunctions::sfGetCdTime(int16 argc, int16 *argv) { - if (AudioCD.isPlaying()) { + if (g_system->getAudioCD()->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); |