[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6.cpp,1.152,1.153 script_v8.cpp,2.177,2.178 scumm.h,1.237,1.238 string.cpp,1.129,1.130
Max Horn
fingolfin at users.sourceforge.net
Mon Jun 2 16:55:10 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv26039
Modified Files:
script_v6.cpp script_v8.cpp scumm.h string.cpp
Log Message:
use enqueueText for FT, too
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -d -r1.152 -r1.153
--- script_v6.cpp 2 Jun 2003 23:18:50 -0000 1.152
+++ script_v6.cpp 2 Jun 2003 23:54:51 -0000 1.153
@@ -2479,13 +2479,15 @@
break;
case 16:
case 17:{
- const byte *message = getStringAddressVar(VAR_STRING2DRAW);
+ const byte *message;
+ byte buf_input[300];
+ _messagePtr = getStringAddressVar(VAR_STRING2DRAW);
+ message = _msgPtrToAdd = buf_input;
+ addMessageToStack(_messagePtr);
if (_gameId == GID_DIG) {
- byte buf_input[300], buf_output[300], buf_trans[300], *ptr = buf_input;
+ byte buf_output[300], buf_trans[300], *ptr = buf_input;
char *t_ptr = (char *)ptr;
- _msgPtrToAdd = buf_input;
buf_output[0] = 0;
- addMessageToStack(message);
while (t_ptr != NULL) {
if (*t_ptr == '/') {
translateText((byte *)t_ptr, buf_trans);
@@ -2502,28 +2504,8 @@
t_ptr = strchr((char *)t_ptr + 1, '/');
}
message = buf_output;
-#if 0
- setStringVars(0);
- _string[0].charset = (byte)args[1];
- _string[0].color = (byte)args[2];
- _string[0].xpos = args[3];
- _string[0].ypos = args[4];
- drawDescString(message);
-#else
- enqueueText(message, args[3], args[4] + camera._cur.y - (_screenHeight / 2), args[2], args[1], true);
-#endif
- } else {
-#if 1
- setStringVars(0);
- _string[0].charset = (byte)args[1];
- _string[0].color = (byte)args[2];
- _string[0].xpos = args[3];
- _string[0].ypos = args[4];
- drawDescString(message);
-#else
- enqueueText(message + camera._cur.y - (_screenHeight / 2), args[3], args[4], args[2], args[1], true);
-#endif
}
+ enqueueText(message, args[3], args[4] + camera._cur.y - (_screenHeight / 2), args[2], args[1], true);
break;}
case 20:
// Occurs in The Dig, at the alien pyramid. See bug #742979.
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.177
retrieving revision 2.178
diff -u -d -r2.177 -r2.178
--- script_v8.cpp 2 Jun 2003 23:18:51 -0000 2.177
+++ script_v8.cpp 2 Jun 2003 23:54:51 -0000 2.178
@@ -539,7 +539,7 @@
case 5:{
byte buffer[256];
_msgPtrToAdd = buffer;
- _messagePtr = addMessageToStack(_messagePtr);
+ addMessageToStack(_messagePtr);
enqueueText(buffer, _string[m].xpos, _string[m].ypos, _string[m].color, _string[m].charset, _string[m].center);
}
break;
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -d -r1.237 -r1.238
--- scumm.h 2 Jun 2003 23:18:51 -0000 1.237
+++ scumm.h 2 Jun 2003 23:54:51 -0000 1.238
@@ -1038,7 +1038,6 @@
protected:
void CHARSET_1();
void drawString(int a);
- void drawDescString(const byte *msg);
const byte *addMessageToStack(const byte *msg);
void addIntToStack(int var);
void addVerbToStack(int var);
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- string.cpp 2 Jun 2003 23:18:52 -0000 1.129
+++ string.cpp 2 Jun 2003 23:54:52 -0000 1.130
@@ -336,57 +336,6 @@
gdi._mask.extend(_charset->_str);
}
-void Scumm::drawDescString(const byte *msg) {
- byte c, *buf, buffer[256];
-
- buf = _msgPtrToAdd = buffer;
- addMessageToStack(msg);
-
- _charsetBufPos = 0;
- _string[0].ypos += camera._cur.y - (_screenHeight / 2);
- _charset->_top = _string[0].ypos;
- _charset->_startLeft = _charset->_left = _string[0].xpos;
- _charset->_right = _screenWidth - 1;
- _charset->_center = _string[0].center;
- _charset->setColor(_string[0].color);
- _charset->_disableOffsX = _charset->_firstChar = true;
- _charset->setCurID(_string[0].charset);
- _charset->_nextLeft = _string[0].xpos;
- _charset->_nextTop = _string[0].ypos;
-
- // Center text
- _string[0].xpos -= _charset->getStringWidth(0, buffer) >> 1;
- if (_string[0].xpos < 0) {
- _string[0].xpos = 0;
- }
-
- _talkDelay = 1;
-
- if (_string[0].ypos + _charset->getFontHeight() > 0)
- restoreBG(ScummVM::Rect(0, _string[0].ypos, _screenWidth - 1, _string[0].ypos + _charset->getFontHeight()));
-
- _charset->_nextLeft = _string[0].xpos;
- _charset->_nextTop = _string[0].ypos;
-
- do {
- c = *buf++;
- if (c != 0 && c != 0xFF) {
- _charset->_left = _charset->_nextLeft;
- _charset->_top = _charset->_nextTop;
- _charset->printChar(c);
- _charset->_nextLeft = _charset->_left;
- _charset->_nextTop = _charset->_top;
- }
- } while (c);
- _haveMsg = 1;
-
- // hack: more 8 pixels at width and height while redraw
- // for proper description redraw while scrolling room
- ScummVM::Rect r(_charset->_str);
- r.grow(8);
- gdi._mask.extend(r);
-}
-
void Scumm::drawString(int a) {
byte buf[256];
byte *space;
More information about the Scummvm-git-logs
mailing list