diff options
author | Paweł Kołodziejski | 2004-01-15 07:02:29 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2004-01-15 07:02:29 +0000 |
commit | ea69029982551ebfdedb37e91ef57971ada88c01 (patch) | |
tree | cba125a20f70b8727376f1ddd9d7476c3ff0bddf /scumm/imuse_digi | |
parent | feb0b79e081f6ba13c31b256f54077925c7081f9 (diff) | |
download | scummvm-rg350-ea69029982551ebfdedb37e91ef57971ada88c01.tar.gz scummvm-rg350-ea69029982551ebfdedb37e91ef57971ada88c01.tar.bz2 scummvm-rg350-ea69029982551ebfdedb37e91ef57971ada88c01.zip |
song scene now works better
svn-id: r12405
Diffstat (limited to 'scumm/imuse_digi')
-rw-r--r-- | scumm/imuse_digi/dimuse.cpp | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/scumm/imuse_digi/dimuse.cpp b/scumm/imuse_digi/dimuse.cpp index dae8315d9f..beadd7608b 100644 --- a/scumm/imuse_digi/dimuse.cpp +++ b/scumm/imuse_digi/dimuse.cpp @@ -639,7 +639,7 @@ int32 IMuseDigital::getCurMusicPosInMs() { for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) { _track[l].locked = true; - if ((_track[l].used) && (_track[l].soundGroup == IMUSE_MUSIC)) { + if ((_track[l].used) && (_track[l].soundGroup == IMUSE_MUSIC) && (!_track[l].volFadeUsed)) { soundId = _track[l].soundId; } _track[l].locked = false; @@ -653,6 +653,7 @@ int32 IMuseDigital::getCurVoiceLipSyncWidth() { int32 msPos = getPosInMs(kTalkSoundID) + _vm->VAR(_vm->VAR_SYNC) + 50; int32 width = 0, height = 0; + debug(5, "IMuseDigital::getCurVoiceLipSyncWidth(%d)", kTalkSoundID); getLipSync(kTalkSoundID, 0, msPos, width, height); return width; } @@ -661,23 +662,46 @@ int32 IMuseDigital::getCurVoiceLipSyncHeight() { int32 msPos = getPosInMs(kTalkSoundID) + _vm->VAR(_vm->VAR_SYNC) + 50; int32 width = 0, height = 0; + debug(5, "IMuseDigital::getCurVoiceLipSyncHeight(%d)", kTalkSoundID); getLipSync(kTalkSoundID, 0, msPos, width, height); return height; } int32 IMuseDigital::getCurMusicLipSyncWidth(int syncId) { - int32 msPos = getPosInMs(_curMusicSoundId) + _vm->VAR(_vm->VAR_SYNC) + 50; + int soundId = -1; + + for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) { + _track[l].locked = true; + if ((_track[l].used) && (_track[l].soundGroup == IMUSE_MUSIC) && (!_track[l].volFadeUsed)) { + soundId = _track[l].soundId; + } + _track[l].locked = false; + } + + int32 msPos = getPosInMs(soundId) + _vm->VAR(_vm->VAR_SYNC) + 50; int32 width = 0, height = 0; - getLipSync(_curMusicSoundId, syncId, msPos, width, height); + debug(5, "IMuseDigital::getCurVoiceLipSyncWidth(%d)", soundId); + getLipSync(soundId, syncId, msPos, width, height); return width; } int32 IMuseDigital::getCurMusicLipSyncHeight(int syncId) { - int32 msPos = getPosInMs(_curMusicSoundId) + _vm->VAR(_vm->VAR_SYNC) + 50; + int soundId = -1; + + for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) { + _track[l].locked = true; + if ((_track[l].used) && (_track[l].soundGroup == IMUSE_MUSIC) && (!_track[l].volFadeUsed)) { + soundId = _track[l].soundId; + } + _track[l].locked = false; + } + + int32 msPos = getPosInMs(soundId) + _vm->VAR(_vm->VAR_SYNC) + 50; int32 width = 0, height = 0; - getLipSync(_curMusicSoundId, syncId, msPos, width, height); + debug(5, "IMuseDigital::getCurVoiceLipSyncHeight(%d)", soundId); + getLipSync(soundId, syncId, msPos, width, height); return height; } |