aboutsummaryrefslogtreecommitdiff
path: root/scumm/string.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-08-29 01:24:17 +0000
committerTravis Howell2004-08-29 01:24:17 +0000
commit4d4dd4fe024d7ad9d6974e4438febf87ae32750a (patch)
tree13a9298aa129ad320b607d8381433201f85f3470 /scumm/string.cpp
parentc7490614051aa85b079c8bbda77681e5d66a7f2e (diff)
downloadscummvm-rg350-4d4dd4fe024d7ad9d6974e4438febf87ae32750a.tar.gz
scummvm-rg350-4d4dd4fe024d7ad9d6974e4438febf87ae32750a.tar.bz2
scummvm-rg350-4d4dd4fe024d7ad9d6974e4438febf87ae32750a.zip
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) svn-id: r14822
Diffstat (limited to 'scumm/string.cpp')
-rw-r--r--scumm/string.cpp51
1 files changed, 45 insertions, 6 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp
index b561363460..96311238ad 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -82,6 +82,8 @@ void ScummEngine::CHARSET_1() {
int frme;
Actor *a;
byte *buffer;
+ int code = (_gameId == GID_PAJAMA) ? 127 : 64;
+ char value[32];
if (!_haveMsg)
return;
@@ -177,11 +179,6 @@ void ScummEngine::CHARSET_1() {
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 @@ void ScummEngine::CHARSET_1() {
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: