diff options
author | Robert Göffringmann | 2003-06-09 23:37:51 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-06-09 23:37:51 +0000 |
commit | 70fa08ab524c93c9217881bd05a3e2a62a2be2aa (patch) | |
tree | af416b8a3940e2ba72648e60f5c4dd6bd6be9512 /sky | |
parent | 8f0bdc4657fde52407b2d094c9a0222aa8a2f210 (diff) | |
download | scummvm-rg350-70fa08ab524c93c9217881bd05a3e2a62a2be2aa.tar.gz scummvm-rg350-70fa08ab524c93c9217881bd05a3e2a62a2be2aa.tar.bz2 scummvm-rg350-70fa08ab524c93c9217881bd05a3e2a62a2be2aa.zip |
Sky shouldn't error() if no speech file exists for a sentence
svn-id: r8426
Diffstat (limited to 'sky')
-rw-r--r-- | sky/logic.cpp | 2 | ||||
-rw-r--r-- | sky/sound.cpp | 6 | ||||
-rw-r--r-- | sky/sound.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sky/logic.cpp b/sky/logic.cpp index f83f12af20..4510c1aba0 100644 --- a/sky/logic.cpp +++ b/sky/logic.cpp @@ -2347,8 +2347,6 @@ void SkyLogic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 //create the x coordinate for the speech text //we need the talkers sprite information - - //_compact->screen = target->screen; textCompact->screen = target->screen; //put our screen in if (_scriptVariables[SCREEN] == target->screen) { // Only use coordinates if we are on the current screen diff --git a/sky/sound.cpp b/sky/sound.cpp index 297f2a88ab..ab7a866a63 100644 --- a/sky/sound.cpp +++ b/sky/sound.cpp @@ -1146,13 +1146,14 @@ bool SkySound::fnStartFx(uint32 sound) { return true; } -void SkySound::fnStartSpeech(uint16 textNum) { +bool SkySound::startSpeech(uint16 textNum) { uint16 speechFileNum = _speechConvertTable[textNum >> 12] + (textNum & 0xFFF); uint8 *speechData = _skyDisk->loadFile(speechFileNum + 50000, NULL); if (!speechData) { - error("File %d (speechFile %d from section %d) wasn't found!\n", speechFileNum + 50000, textNum & 0xFFF, textNum >> 12); + debug(9,"File %d (speechFile %d from section %d) wasn't found!\n", speechFileNum + 50000, textNum & 0xFFF, textNum >> 12); + return false; } uint32 speechSize = ((dataFileHeader*)speechData)->s_tot_size; @@ -1165,4 +1166,5 @@ void SkySound::fnStartSpeech(uint16 textNum) { // TODO: implement pre_after_table_area to find and prefetch file for next speech _mixer->playRaw(&_ingameSpeech, playBuffer, speechSize - 64, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE); + return true; } diff --git a/sky/sound.h b/sky/sound.h index c9127ad730..93e6cd9e26 100644 --- a/sky/sound.h +++ b/sky/sound.h @@ -50,7 +50,7 @@ public: void loadSection(uint8 pSection); void playSound(uint16 sound, uint16 volume); bool fnStartFx(uint32 sound); - void fnStartSpeech(uint16 textNum); + bool startSpeech(uint16 textNum); bool speechFinished(void) { return _ingameSpeech == 0; }; void fnPauseFx(void); void fnUnPauseFx(void) { _sfxPaused = false; }; |