aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2005-03-09 13:41:33 +0000
committerTravis Howell2005-03-09 13:41:33 +0000
commitf5b493d7353ecc46b073de0dc822a4272d4e39e0 (patch)
tree2e2ca93b91ef6a9e96ef8abc2381a32d51810135 /scumm
parenteb1c999ad07e0e3b478aa40bbe7fc61b4c0e7a83 (diff)
downloadscummvm-rg350-f5b493d7353ecc46b073de0dc822a4272d4e39e0.tar.gz
scummvm-rg350-f5b493d7353ecc46b073de0dc822a4272d4e39e0.tar.bz2
scummvm-rg350-f5b493d7353ecc46b073de0dc822a4272d4e39e0.zip
Add HE sound todos
svn-id: r17050
Diffstat (limited to 'scumm')
-rw-r--r--scumm/sound.cpp28
1 files changed, 19 insertions, 9 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index c3d184701f..ec88299ef4 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -814,16 +814,22 @@ int Sound::isSoundRunning(int sound) const {
return pollCD();
if (_vm->_features & GF_HUMONGOUS) {
- if (sound == -2 || sound >= 10001) {
- // Maybe checks sound channel?
- return !isSfxFinished();
- } else if (sound == -1 || sound == 10000) {
+ if (sound == -2) {
+ return -1;
+ } else if (sound == -1) {
// getSoundStatus(), with a -1, will return the
// ID number of the first active music it finds.
- if (_vm->_heversion >= 70 || _currentMusic)
+ if (_currentMusic)
sound = _currentMusic;
else if (_vm->_imuse)
return (_vm->_imuse->getSoundStatus(sound));
+ } else if (sound >= 10000) {
+ // TODO report sound ID on channel
+ // channel = sound - 10000
+ if (sound == 10000)
+ return _currentMusic;
+ else
+ return 0;
}
}
@@ -899,14 +905,18 @@ void Sound::stopSound(int sound) {
int i;
if (_vm->_features & GF_HUMONGOUS) {
- if (sound == -2 || sound >= 10001) {
- // TODO: Stop sound channel (sound - 100000)
- } else if (sound == -1 || sound == 10000) {
+ if (sound == -2) {
+ } else if (sound == -1) {
// Stop current music
- if (_vm->_heversion >= 70 || _currentMusic)
+ if (_currentMusic)
_vm->_mixer->stopID(_currentMusic);
else if (_vm->_imuse)
_vm->_imuse->stopSound(_vm->_imuse->getSoundStatus(-1));
+ } else if ( sound >= 10000) {
+ // TODO: Stop sound channel
+ // channel = sound - 10000
+ if (sound == 10000)
+ _vm->_mixer->stopID(_currentMusic);
}
}