[Scummvm-cvs-logs] CVS: scummvm/sky logic.cpp,1.99,1.100 sound.cpp,1.14,1.15 sound.h,1.8,1.9
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Mon Jun 9 16:38:16 CEST 2003
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv13570/sky
Modified Files:
logic.cpp sound.cpp sound.h
Log Message:
Sky shouldn't error() if no speech file exists for a sentence
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.cpp,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- logic.cpp 9 Jun 2003 23:27:31 -0000 1.99
+++ logic.cpp 9 Jun 2003 23:37:47 -0000 1.100
@@ -2347,8 +2347,6 @@
//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
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- sound.cpp 9 Jun 2003 02:33:27 -0000 1.14
+++ sound.cpp 9 Jun 2003 23:37:50 -0000 1.15
@@ -1146,13 +1146,14 @@
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 @@
// 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;
}
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- sound.h 9 Jun 2003 02:33:27 -0000 1.8
+++ sound.h 9 Jun 2003 23:37:51 -0000 1.9
@@ -50,7 +50,7 @@
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; };
More information about the Scummvm-git-logs
mailing list