aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-08-29 03:19:09 +0000
committerTravis Howell2004-08-29 03:19:09 +0000
commit8c8ed39b05ad3fb4d470c53cae5c05de38db16a8 (patch)
tree2fc2e02b451de9306dcf1c268c1298f27141193d
parent4d4dd4fe024d7ad9d6974e4438febf87ae32750a (diff)
downloadscummvm-rg350-8c8ed39b05ad3fb4d470c53cae5c05de38db16a8.tar.gz
scummvm-rg350-8c8ed39b05ad3fb4d470c53cae5c05de38db16a8.tar.bz2
scummvm-rg350-8c8ed39b05ad3fb4d470c53cae5c05de38db16a8.zip
Add HE 7.2 differences
svn-id: r14823
-rw-r--r--scumm/charset.cpp34
1 files changed, 31 insertions, 3 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index 6fb14c0f61..8fbdaa79bc 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -99,12 +99,24 @@ int CharsetRenderer::getStringWidth(int arg, const byte *text) {
int width = 1;
byte chr;
int oldID = getCurID();
+ int code = (_vm->_gameId == GID_PAJAMA) ? 127 : 64;
while ((chr = text[pos++]) != 0) {
+ if (_vm->_heversion >= 72 && chr == code) {
+ chr = text[pos++];
+ if (chr == 84) { // Strings of speech offset/size
+ while(chr != code)
+ chr = text[pos++];
+ continue;
+ }
+ if (chr == 119) // 'Wait'
+ break;
+ if (chr == 104|| chr == 110) // 'Newline'
+ break;
+ } else if (chr == '@')
+ continue;
if (chr == 0xD)
break;
- if (chr == '@')
- continue;
if (chr == 254 || chr == 255) {
chr = text[pos++];
if (chr == 3) // 'WAIT'
@@ -142,9 +154,25 @@ void CharsetRenderer::addLinebreaks(int a, byte *str, int pos, int maxwidth) {
int curw = 1;
byte chr;
int oldID = getCurID();
+ int code = (_vm->_gameId == GID_PAJAMA) ? 127 : 64;
while ((chr = str[pos++]) != 0) {
- if (chr == '@')
+ if (_vm->_heversion >= 72 && chr == code) {
+ chr = str[pos++];
+ if (chr == 84) { // Strings of speech offset/size
+ while(chr != code)
+ chr = str[pos++];
+ continue;
+ }
+ if (chr == 119) // 'Wait'
+ break;
+ if (chr == 110) { // 'Newline'
+ curw = 1;
+ continue;
+ }
+ if (chr == 104) // 'Don't terminate with \n'
+ break;
+ } else if (chr == '@')
continue;
if (chr == 254 || chr == 255) {
chr = str[pos++];