[Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,2.67,2.68
Max Horn
fingolfin at users.sourceforge.net
Wed May 14 07:23:07 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv24974
Modified Files:
script_v2.cpp
Log Message:
fixed V2 decodeParseString
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.67
retrieving revision 2.68
diff -u -d -r2.67 -r2.68
--- script_v2.cpp 14 May 2003 14:00:29 -0000 2.67
+++ script_v2.cpp 14 May 2003 14:22:15 -0000 2.68
@@ -374,11 +374,14 @@
byte buffer[256]; // FIXME
byte *ptr = buffer;
byte c;
+ bool insertSpace = false;
+
while ((c = fetchScriptByte())) {
- if (c & 0x80) {
- *ptr++ = c & 0x7f;
- *ptr++ = ' ';
- } else if (c < 8) {
+
+ insertSpace = (c & 0x80) != 0;
+ c &= 0x7f;
+
+ if (c < 8) {
// Special codes as seen in CHARSET_1 etc. My guess is that they
// have a similar function as the corresponding embedded stuff in modern
// games. Hence for now we convert them to the modern format.
@@ -391,6 +394,10 @@
}
} else
*ptr++ = c;
+
+ if (insertSpace)
+ *ptr++ = ' ';
+
}
*ptr = 0;
More information about the Scummvm-git-logs
mailing list