Renamed getAudioCD to getAudioCDManager.

svn-id: r49678
This commit is contained in:
Alejandro Marzini 2010-06-15 04:13:12 +00:00
parent 6a52a168ee
commit e1ef3cd9fc
24 changed files with 74 additions and 74 deletions

View file

@ -594,9 +594,9 @@ int16 ScriptFunctions::sfPlayVoice(int16 argc, int16 *argv) {
}
int16 ScriptFunctions::sfPlayCd(int16 argc, int16 *argv) {
g_system->getAudioCD()->play(argv[0] - 1, 1, 0, 0);
g_system->getAudioCDManager()->play(argv[0] - 1, 1, 0, 0);
_vm->_cdTimeStart = _vm->_system->getMillis();
if (g_system->getAudioCD()->isPlaying()) {
if (g_system->getAudioCDManager()->isPlaying()) {
return 1;
} else {
return 0;
@ -604,8 +604,8 @@ int16 ScriptFunctions::sfPlayCd(int16 argc, int16 *argv) {
}
int16 ScriptFunctions::sfStopCd(int16 argc, int16 *argv) {
if (g_system->getAudioCD()->isPlaying()) {
g_system->getAudioCD()->stop();
if (g_system->getAudioCDManager()->isPlaying()) {
g_system->getAudioCDManager()->stop();
return 1;
} else {
return 0;
@ -613,11 +613,11 @@ int16 ScriptFunctions::sfStopCd(int16 argc, int16 *argv) {
}
int16 ScriptFunctions::sfGetCdStatus(int16 argc, int16 *argv) {
return g_system->getAudioCD()->isPlaying() ? 1 : 0;
return g_system->getAudioCDManager()->isPlaying() ? 1 : 0;
}
int16 ScriptFunctions::sfGetCdTime(int16 argc, int16 *argv) {
if (g_system->getAudioCD()->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);