[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6.cpp,1.20,1.21 script_v8.cpp,2.35,2.36
Max Horn
fingolfin at users.sourceforge.net
Wed Dec 25 07:05:02 CET 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv8553
Modified Files:
script_v6.cpp script_v8.cpp
Log Message:
use translateText for V8 print opcodes
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- script_v6.cpp 25 Dec 2002 14:46:39 -0000 1.20
+++ script_v6.cpp 25 Dec 2002 15:04:03 -0000 1.21
@@ -2949,8 +2949,8 @@
_scriptPointer += resStrLen((char*)_scriptPointer)+ 1;
translateText(_messagePtr, _transText);
for (i = 0, j = 0; (_messagePtr[i] != '/' || j == 0) && j < 19; i++) {
- if (_messagePtr[i] != '/')
- pointer[j++] = _messagePtr[i];
+ if (_messagePtr[i] != '/')
+ pointer[j++] = _messagePtr[i];
}
pointer[j] = 0;
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.35
retrieving revision 2.36
diff -u -d -r2.35 -r2.36
--- script_v8.cpp 25 Dec 2002 14:46:39 -0000 2.35
+++ script_v8.cpp 25 Dec 2002 15:04:04 -0000 2.36
@@ -526,20 +526,45 @@
error("decodeParseString: SO_PRINT_MUMBLE");
break;
case 0xD1: {
- _messagePtr = _scriptPointer;
byte buffer[1024];
- _msgPtrToAdd = buffer;
- _scriptPointer = _messagePtr = addMessageToStack(_messagePtr);
+ _messagePtr = _scriptPointer;
+
+ if (_messagePtr[0] == '/') {
+ char pointer[20];
+ int i, j;
+
+ // Skip over the string
+ _scriptPointer += resStrLen((char*)_scriptPointer) + 1;
+
+ translateText(_messagePtr, _transText);
+ for (i = 0, j = 0; (_messagePtr[i] != '/' || j == 0) && j < 19; i++) {
+ if (_messagePtr[i] != '/')
+ pointer[j++] = _messagePtr[i];
+ }
+ pointer[j] = 0;
+
+ // Stop any talking that's still going on
+ if (_sound->_talkChannel > -1)
+ _mixer->stop(_sound->_talkChannel);
+
+ // FIXME: no 'digvoice.bun' in COMI
+ // _sound->_talkChannel = _sound->playBundleSound(pointer);
+
+ _messagePtr = _transText;
+ _msgPtrToAdd = buffer;
+ _messagePtr = addMessageToStack(_messagePtr);
+ } else {
+ _msgPtrToAdd = buffer;
+ _scriptPointer = _messagePtr = addMessageToStack(_messagePtr);
+ }
if (_fr[_string[m].charset] == NULL) // FIXME: Put this elsewhere?
- loadCharset(_string[m].charset);
+ loadCharset(_string[m].charset);
if (_fr[_string[m].charset] != NULL) {
_fr[_string[m].charset]->drawString((char *)buffer, (int)_string[m].xpos, (int)_string[m].ypos, (unsigned char)_string[m].color, 0);
- //warning("Printing font loaded in slot %d: %s\n", _string[m].charset, buffer);
}
-
break;
}
case 0xD2: // SO_PRINT_WRAP Set print wordwrap
More information about the Scummvm-git-logs
mailing list