[Scummvm-cvs-logs] CVS: scummvm string.cpp,1.45,1.46 scummvm.cpp,1.161,1.162
Max Horn
fingolfin at users.sourceforge.net
Sun Jun 2 05:08:01 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv28332
Modified Files:
string.cpp scummvm.cpp
Log Message:
another attempt to fix #529538
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/string.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- string.cpp 1 Jun 2002 23:32:01 -0000 1.45
+++ string.cpp 2 Jun 2002 12:07:12 -0000 1.46
@@ -202,13 +202,13 @@
Actor *a;
byte *buffer;
+ if (!_haveMsg)
+ return;
+
if (!(_features & GF_AFTER_V7)) {
- if (!_haveMsg || (camera._dest.x >> 3) != (camera._cur.x >> 3) ||
+ if ((camera._dest.x >> 3) != (camera._cur.x >> 3) ||
camera._cur.x != camera._last.x)
return;
- } else {
- if (!_haveMsg)
- return;
}
a = NULL;
@@ -279,10 +279,10 @@
charset._strBottom = gdi._mask_bottom;
}
- if (!_haveMsg || _talkDelay)
+ if (_talkDelay)
return;
- if (_haveMsg != 0xFF) {
+ if (_haveMsg != 0xFF && _haveMsg != 0xFE) {
if (_sfxMode == 0)
stopTalk();
return;
@@ -331,6 +331,8 @@
do {
c = *buffer++;
if (c == 0) {
+ // End of text reached, set _haveMsg to 1 so that the text will be
+ // removed next time CHARSET_1 is called.
_haveMsg = 1;
_keepText = false;
break;
@@ -365,11 +367,11 @@
charset.printCharOld(c);
else if (!(_features & GF_AFTER_V6)) {
// if (!_vars[VAR_V5_CHARFLAG]) { /* FIXME */
- if (!(a && _noSubtitles))
+ if (!(_haveMsg == 0xFE && _noSubtitles))
charset.printChar(c);
// }
} else {
- if (!(a && _noSubtitles))
+ if (!(_haveMsg == 0xFE && _noSubtitles))
charset.printChar(c);
}
@@ -381,7 +383,8 @@
c = *buffer++;
if (c == 3) {
- _haveMsg = 0xFF;
+ if (_haveMsg != 0xFE)
+ _haveMsg = 0xFF;
_keepText = false;
break;
} else if (c == 1) {
@@ -405,6 +408,10 @@
24);
talkSound(tmpA, tmpB, 2);
buffer += 14;
+
+ // Set flag that speech variant exist of this msg
+ if (_haveMsg == 0xFF)
+ _haveMsg = 0xFE;
} else if (c == 14) {
int oldy = getResourceAddress(rtCharset, charset._curId)[30];
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -d -r1.161 -r1.162
--- scummvm.cpp 1 Jun 2002 21:39:57 -0000 1.161
+++ scummvm.cpp 2 Jun 2002 12:07:12 -0000 1.162
@@ -241,7 +241,7 @@
} else {
_vars[VAR_CAMERA_POS_X] = camera._cur.x;
}
- _vars[VAR_HAVE_MSG] = _haveMsg;
+ _vars[VAR_HAVE_MSG] = (_haveMsg == 0xFE) ? 0xFF : _haveMsg;
_vars[VAR_VIRT_MOUSE_X] = _virtual_mouse_x;
_vars[VAR_VIRT_MOUSE_Y] = _virtual_mouse_y;
_vars[VAR_MOUSE_X] = mouse.x;
More information about the Scummvm-git-logs
mailing list