[Scummvm-cvs-logs] CVS: scummvm/scumm string.cpp,1.246,1.247 sound.cpp,1.373,1.374
Travis Howell
kirben at users.sourceforge.net
Sat Aug 28 18:26:02 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18637/scumm
Modified Files:
string.cpp sound.cpp
Log Message:
Add some charset codes for HE 7.2 gasmes
Later HE 7.2 games use hard coded sound rate for speech (Rate never changes anyway)
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -d -r1.246 -r1.247
--- string.cpp 27 Aug 2004 13:10:22 -0000 1.246
+++ string.cpp 29 Aug 2004 01:24:16 -0000 1.247
@@ -82,6 +82,8 @@
int frme;
Actor *a;
byte *buffer;
+ int code = (_gameId == GID_PAJAMA) ? 127 : 64;
+ char value[32];
if (!_haveMsg)
return;
@@ -177,11 +179,6 @@
buffer = _charsetBuffer + _charsetBufPos;
- // TODO HE 7.2 games use difference charset codes
- // Skip the code for now
- if (_heversion >= 72)
- buffer += 15;
-
if (_version > 3)
_charset->addLinebreaks(0, buffer, 0, t);
@@ -224,7 +221,49 @@
continue;
}
- if (c == 0xFE || c == 0xFF) {
+ if (_heversion >= 72 && c == code) {
+ c = *buffer++;
+ switch(c) {
+ case 84:
+ i = 0;
+ memset(value, 0, 32);
+ c = *buffer++;
+ while(c != 44) {
+ value[i] = c;
+ c = *buffer++;
+ i++;
+ }
+ value[i] = 0;
+ talk_sound_a = atoi(value);
+
+ i = 0;
+ memset(value, 0, 32);
+ c = *buffer++;
+ while(c != code) {
+ value[i] = c;
+ c = *buffer++;
+ i++;
+ }
+ value[i] = 0;
+ talk_sound_b = atoi(value);
+
+ _sound->talkSound(talk_sound_a, talk_sound_b, 2);
+ break;
+ case 110:
+ goto newLine;
+ case 104:
+ _haveMsg = 0;
+ _keepText = true;
+ break;
+ case 119:
+ if (_haveMsg != 0xFE)
+ _haveMsg = 0xFF;
+ _keepText = false;
+ break;
+ default:
+ warning("CHARSET_1: invalid code %d", c);
+ }
+ } else if (c == 0xFE || c == 0xFF) {
c = *buffer++;
switch(c) {
case 1:
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.373
retrieving revision 1.374
diff -u -d -r1.373 -r1.374
--- sound.cpp 28 Aug 2004 09:19:53 -0000 1.373
+++ sound.cpp 29 Aug 2004 01:24:17 -0000 1.374
@@ -651,16 +651,13 @@
if (_vm->_features & GF_HUMONGOUS) {
_sfxMode |= mode;
- // SKIP TALK (8) HSHD (14)
- _sfxFile->seek(offset + 22, SEEK_SET);
- int rate = _sfxFile->readUint16LE();
- // SKIP HSHD (8) and SDAT (8)
- _sfxFile->seek(+16, SEEK_CUR);
+ // SKIP TALK (8) HSHD (22) and SDAT (8)
+ _sfxFile->seek(offset + 40, SEEK_SET);
size = b - 40;
sound = (byte *)malloc(size);
_sfxFile->read(sound, size);
- _vm->_mixer->playRaw(handle, sound, size, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
+ _vm->_mixer->playRaw(handle, sound, size, 11000, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
return;
}
More information about the Scummvm-git-logs
mailing list