mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-17 23:44:22 +00:00
Cleanup.
svn-id: r40850
This commit is contained in:
parent
70f8f1fbf3
commit
c0302661ed
@ -1486,7 +1486,7 @@ void KyraEngine_HoF::snd_playVoiceFile(int id) {
|
||||
if (_sound->voiceFileIsPresent(vocFile)) {
|
||||
snd_stopVoice();
|
||||
|
||||
while (!_sound->voicePlay(vocFile, 255, false, &_speechHandle)) {
|
||||
while (!_sound->voicePlay(vocFile, &_speechHandle)) {
|
||||
updateWithText();
|
||||
_system->delayMillis(10);
|
||||
}
|
||||
@ -1524,7 +1524,7 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
|
||||
|
||||
int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]);
|
||||
if (vocIndex != -1) {
|
||||
_sound->voicePlay(_ingameSoundList[vocIndex], 255, true);
|
||||
_sound->voicePlay(_ingameSoundList[vocIndex], 0, 255, true);
|
||||
} else if (_flags.platform == Common::kPlatformPC) {
|
||||
if (_sound->getSfxType() == Sound::kMidiMT32)
|
||||
track = track < _mt32SfxMapSize ? _mt32SfxMap[track] - 1 : -1;
|
||||
|
@ -667,7 +667,7 @@ int TIMInterpreter::cmd_playVocFile(const uint16 *param) {
|
||||
const int volume = (param[1] * 255) / 100;
|
||||
|
||||
if (index < ARRAYSIZE(_vocFiles) && !_vocFiles[index].empty())
|
||||
vm()->sound()->voicePlay(_vocFiles[index].c_str(), volume, true);
|
||||
vm()->sound()->voicePlay(_vocFiles[index].c_str(), 0, volume, true);
|
||||
else if (index == 7 && !_vm->gameFlags().isTalkie)
|
||||
vm()->sound()->playTrack(index);
|
||||
else
|
||||
|
@ -2149,7 +2149,7 @@ void KyraEngine_HoF::seq_playTalkText(uint8 chatNum) {
|
||||
if (chatNum < 12 && !_flags.isDemo && textEnabled())
|
||||
seq_setTextEntry(chatNum, 160, 168, _sequenceStringsDuration[chatNum], 160);
|
||||
|
||||
_sound->voicePlay(_sequenceSoundList[chatNum], 255, false, &_speechHandle);
|
||||
_sound->voicePlay(_sequenceSoundList[chatNum], &_speechHandle);
|
||||
}
|
||||
|
||||
void KyraEngine_HoF::seq_waitForTextsTimeout() {
|
||||
|
@ -367,7 +367,7 @@ void LoLEngine::kingSelectionIntro() {
|
||||
_screen->fprintStringIntro(_tim->getCTableEntry(60), 8, y + 30, 0x32, 0x00, 0x9C, 0x20);
|
||||
_screen->fprintStringIntro(_tim->getCTableEntry(61), 8, y + 40, 0x32, 0x00, 0x9C, 0x20);
|
||||
|
||||
_sound->voicePlay("KING01", 255, false, &_speechHandle);
|
||||
_sound->voicePlay("KING01", &_speechHandle);
|
||||
|
||||
int index = 4;
|
||||
while ((!_speechFlag || (_speechFlag && _sound->voiceIsPlaying(&_speechHandle))) && _charSelection == -1 && !shouldQuit() && !skipFlag()) {
|
||||
@ -406,7 +406,7 @@ void LoLEngine::kingSelectionReminder() {
|
||||
_screen->fprintStringIntro(_tim->getCTableEntry(62), 8, y, 0x32, 0x00, 0x9C, 0x20);
|
||||
_screen->fprintStringIntro(_tim->getCTableEntry(63), 8, y + 10, 0x32, 0x00, 0x9C, 0x20);
|
||||
|
||||
_sound->voicePlay("KING02", 255, false, &_speechHandle);
|
||||
_sound->voicePlay("KING02", &_speechHandle);
|
||||
|
||||
int index = 0;
|
||||
while ((!_speechFlag || (_speechFlag && _sound->voiceIsPlaying(&_speechHandle))) && _charSelection == -1 && !shouldQuit() && index < 15) {
|
||||
@ -433,7 +433,7 @@ void LoLEngine::kingSelectionReminder() {
|
||||
}
|
||||
|
||||
void LoLEngine::kingSelectionOutro() {
|
||||
_sound->voicePlay("KING03", 255, false, &_speechHandle);
|
||||
_sound->voicePlay("KING03", &_speechHandle);
|
||||
|
||||
int index = 0;
|
||||
while ((!_speechFlag || (_speechFlag && _sound->voiceIsPlaying(&_speechHandle))) && !shouldQuit() && !skipFlag()) {
|
||||
@ -582,7 +582,7 @@ void LoLEngine::selectionCharInfoIntro(char *file) {
|
||||
file[4] = '0';
|
||||
|
||||
while (_charSelectionInfoResult == -1 && !shouldQuit()) {
|
||||
if (!_sound->voicePlay(file, 255, false, &_speechHandle))
|
||||
if (!_sound->voicePlay(file, &_speechHandle))
|
||||
break;
|
||||
|
||||
int i = 0;
|
||||
@ -664,7 +664,7 @@ void LoLEngine::showStarcraftLogo() {
|
||||
}
|
||||
|
||||
if (!(shouldQuit() || inputFlag)) {
|
||||
_sound->voicePlay("star2", 255, false, &_speechHandle);
|
||||
_sound->voicePlay("star2", &_speechHandle);
|
||||
while(_sound->voiceIsPlaying(&_speechHandle) && !(shouldQuit() || inputFlag)) {
|
||||
inputFlag = checkInput(0) & 0xff;
|
||||
delay(_tickLength);
|
||||
|
@ -59,7 +59,7 @@ bool Sound::voiceFileIsPresent(const char *file) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int32 Sound::voicePlay(const char *file, uint8 volume, bool isSfx, Audio::SoundHandle *handle) {
|
||||
int32 Sound::voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx) {
|
||||
Audio::AudioStream *audioStream = getVoiceStream(file);
|
||||
|
||||
if (!audioStream) {
|
||||
|
@ -193,7 +193,7 @@ public:
|
||||
* @param handle store a copy of the sound handle
|
||||
* @return playtime of the voice file (-1 marks unknown playtime)
|
||||
*/
|
||||
virtual int32 voicePlay(const char *file, uint8 volume = 255, bool isSfx = false, Audio::SoundHandle *handle = 0);
|
||||
virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle = 0, uint8 volume = 255, bool isSfx = false);
|
||||
|
||||
Audio::AudioStream *getVoiceStream(const char *file);
|
||||
|
||||
@ -457,7 +457,7 @@ public:
|
||||
void haltTrack();
|
||||
void beginFadeOut();
|
||||
|
||||
int32 voicePlay(const char *file, uint8 volume = 255, bool isSfx = false, Audio::SoundHandle *handle = 0) { return -1; }
|
||||
int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx) { return -1; }
|
||||
void playSoundEffect(uint8);
|
||||
|
||||
protected:
|
||||
@ -484,7 +484,7 @@ public:
|
||||
void haltTrack();
|
||||
void beginFadeOut();
|
||||
|
||||
int32 voicePlay(const char *file, uint8 volume = 255, bool isSfx = false, Audio::SoundHandle *handle = 0);
|
||||
int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx);
|
||||
void playSoundEffect(uint8 track);
|
||||
|
||||
protected:
|
||||
|
@ -72,7 +72,7 @@ void KyraEngine_LoK::snd_playWanderScoreViaMap(int command, int restart) {
|
||||
void KyraEngine_LoK::snd_playVoiceFile(int id) {
|
||||
char vocFile[9];
|
||||
snprintf(vocFile, sizeof(vocFile), "%03d", id);
|
||||
_speechPlayTime = _sound->voicePlay(vocFile, 255, false, &_speechHandle);
|
||||
_speechPlayTime = _sound->voicePlay(vocFile, &_speechHandle);
|
||||
}
|
||||
|
||||
void KyraEngine_LoK::snd_voiceWaitForFinish(bool ingame) {
|
||||
|
@ -178,7 +178,7 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) {
|
||||
}
|
||||
|
||||
if (hasVocFile) {
|
||||
_sound->voicePlay(_ingameSoundList[vocIndex], volume & 0xff, true);
|
||||
_sound->voicePlay(_ingameSoundList[vocIndex], 0, volume & 0xff, true);
|
||||
} else if (_flags.platform == Common::kPlatformPC) {
|
||||
if (_sound->getSfxType() == Sound::kMidiMT32)
|
||||
track = track < _ingameMT32SoundIndexSize ? _ingameMT32SoundIndex[track] - 1 : -1;
|
||||
|
@ -4231,7 +4231,7 @@ void SoundTownsPC98_v2::beginFadeOut() {
|
||||
haltTrack();
|
||||
}
|
||||
|
||||
int32 SoundTownsPC98_v2::voicePlay(const char *file, uint8, bool, Audio::SoundHandle *handle) {
|
||||
int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle, uint8, bool) {
|
||||
static const uint16 rates[] = { 0x10E1, 0x0CA9, 0x0870, 0x0654, 0x0438, 0x032A, 0x021C, 0x0194 };
|
||||
static const char patternHOF[] = "%s.PCM";
|
||||
static const char patternLOL[] = "%s.VOC";
|
||||
|
Loading…
x
Reference in New Issue
Block a user