mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 08:53:51 +00:00
Implemented fadeout waiting in KyraEngine_v2::enterNewScene for AdLib.
svn-id: r31424
This commit is contained in:
parent
21a66f12ba
commit
a2e355d671
@ -115,7 +115,7 @@ void KyraEngine_v2::enterNewScene(uint16 newScene, int facing, int unk1, int unk
|
||||
|
||||
if (newSoundFile) {
|
||||
if (_sound->getMusicType() == Sound::kAdlib) {
|
||||
while (0/*snd_isPlaying()*/)
|
||||
while (((SoundAdlibPC*)_sound)->isPlaying())
|
||||
_system->delayMillis(10);
|
||||
} else {
|
||||
while (waitTime > _system->getMillis())
|
||||
|
@ -240,6 +240,7 @@ public:
|
||||
|
||||
void playTrack(uint8 track);
|
||||
void haltTrack();
|
||||
bool isPlaying();
|
||||
|
||||
void playSoundEffect(uint8 track);
|
||||
|
||||
|
@ -112,7 +112,7 @@ private:
|
||||
int snd_setSoundData(va_list &list);
|
||||
int snd_unkOpcode1(va_list &list);
|
||||
int snd_startSong(va_list &list);
|
||||
int snd_unkOpcode2(va_list &list);
|
||||
int snd_isChannelPlaying(va_list &list);
|
||||
int snd_unkOpcode3(va_list &list);
|
||||
int snd_readByte(va_list &list);
|
||||
int snd_writeByte(va_list &list);
|
||||
@ -543,8 +543,10 @@ int AdlibDriver::snd_startSong(va_list &list) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int AdlibDriver::snd_unkOpcode2(va_list &list) {
|
||||
warning("unimplemented snd_unkOpcode2");
|
||||
int AdlibDriver::snd_isChannelPlaying(va_list &list) {
|
||||
int channel = va_arg(list, int);
|
||||
if (_channels[channel].dataptr)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1888,7 +1890,7 @@ void AdlibDriver::setupOpcodeList() {
|
||||
COMMAND(snd_setSoundData),
|
||||
COMMAND(snd_unkOpcode1),
|
||||
COMMAND(snd_startSong),
|
||||
COMMAND(snd_unkOpcode2),
|
||||
COMMAND(snd_isChannelPlaying),
|
||||
COMMAND(snd_unkOpcode3),
|
||||
COMMAND(snd_readByte),
|
||||
COMMAND(snd_writeByte),
|
||||
@ -2274,6 +2276,10 @@ void SoundAdlibPC::haltTrack() {
|
||||
//_vm->_system->delayMillis(3 * 60);
|
||||
}
|
||||
|
||||
bool SoundAdlibPC::isPlaying() {
|
||||
return _driver->callback(7, int(0));
|
||||
}
|
||||
|
||||
void SoundAdlibPC::playSoundEffect(uint8 track) {
|
||||
if (_sfxEnabled)
|
||||
play(track);
|
||||
|
Loading…
x
Reference in New Issue
Block a user