Actually check if a sound is active, if the sound is outside music engine.
Add some more HE differences svn-id: r15188
This commit is contained in:
parent
989de0d5dc
commit
e22230e223
5 changed files with 28 additions and 2 deletions
|
@ -1159,7 +1159,7 @@ void ScummEngine::launch() {
|
|||
else if (_gameId == GID_MANIAC)
|
||||
_numActors = 25;
|
||||
else if (_heversion >= 80)
|
||||
_numActors = 62;
|
||||
_numActors = 63;
|
||||
else
|
||||
_numActors = 13;
|
||||
|
||||
|
|
|
@ -779,6 +779,9 @@ int Sound::isSoundRunning(int sound) const {
|
|||
if (!_vm->isResourceLoaded(rtSound, sound))
|
||||
return 0;
|
||||
|
||||
if (_vm->_mixer->isSoundIDActive(sound))
|
||||
return 1;
|
||||
|
||||
if (_vm->_musicEngine)
|
||||
return _vm->_musicEngine->getSoundStatus(sound);
|
||||
|
||||
|
|
|
@ -386,6 +386,7 @@ void ScummEngine::drawString(int a, const byte *msg) {
|
|||
int i, c;
|
||||
byte fontHeight = 0;
|
||||
uint color;
|
||||
int code = (_heversion >= 80) ? 127 : 64;
|
||||
|
||||
addMessageToStack(msg, buf, sizeof(buf));
|
||||
|
||||
|
@ -433,7 +434,19 @@ void ScummEngine::drawString(int a, const byte *msg) {
|
|||
}
|
||||
|
||||
for (i = 0; (c = buf[i++]) != 0;) {
|
||||
if (c == 0xFE || c == 0xFF) {
|
||||
if (c == code) {
|
||||
c = buf[i++];
|
||||
switch (c) {
|
||||
case 110:
|
||||
if (_charset->_center) {
|
||||
_charset->_left = _charset->_startLeft - _charset->getStringWidth(a, buf + i);
|
||||
} else {
|
||||
_charset->_left = _charset->_startLeft;
|
||||
}
|
||||
_charset->_top += fontHeight;
|
||||
break;
|
||||
}
|
||||
} else if (c == 0xFE || c == 0xFF) {
|
||||
c = buf[i++];
|
||||
switch (c) {
|
||||
case 9:
|
||||
|
|
|
@ -463,6 +463,13 @@ void SoundMixer::pauseHandle(PlayingSoundHandle handle, bool paused) {
|
|||
_channels[index]->pause(paused);
|
||||
}
|
||||
|
||||
bool SoundMixer::isSoundIDActive(int id) {
|
||||
for (int i = 0; i != NUM_CHANNELS; i++)
|
||||
if (_channels[i] && _channels[i]->getId() == id)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SoundMixer::hasActiveSFXChannel() {
|
||||
// FIXME/TODO: We need to distinguish between SFX and music channels
|
||||
Common::StackLock lock(_mutex);
|
||||
|
|
|
@ -145,6 +145,9 @@ public:
|
|||
/** pause/unpause all channels */
|
||||
void pauseAll(bool paused);
|
||||
|
||||
/** check if sound ID is active */
|
||||
bool isSoundIDActive(int id);
|
||||
|
||||
/** check if mixer is paused */
|
||||
bool isPaused();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue