mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 07:53:36 +00:00
Sky shouldn't error() if no speech file exists for a sentence
svn-id: r8426
This commit is contained in:
parent
8f0bdc4657
commit
70fa08ab52
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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; };
|
||||
|
Loading…
x
Reference in New Issue
Block a user