[Scummvm-cvs-logs] CVS: scummvm/scumm scumm.h,1.157,1.158 string.cpp,1.88,1.89
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sat Mar 8 09:40:04 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv4079
Modified Files:
scumm.h string.cpp
Log Message:
fixed descriptions in the dig
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- scumm.h 7 Mar 2003 21:38:45 -0000 1.157
+++ scumm.h 8 Mar 2003 17:39:18 -0000 1.158
@@ -982,7 +982,6 @@
void restoreCharsetBg();
int hasCharsetMask(int x, int y, int x2, int y2);
void CHARSET_1();
- void description();
void drawDescString(byte *msg);
byte *addMessageToStack(byte *msg);
void addIntToStack(int var);
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- string.cpp 7 Mar 2003 23:55:28 -0000 1.88
+++ string.cpp 8 Mar 2003 17:39:18 -0000 1.89
@@ -340,50 +340,6 @@
gdi._mask_bottom = _charset->_strBottom;
}
-void Scumm::description() {
- int c;
- byte *buf;
-
- buf = _charsetBuffer;
- _string[0].ypos = camera._cur.y + 88;
- _string[0].xpos = (_realWidth / 2) - (_charset->getStringWidth(0, buf) >> 1);
- if (_string[0].xpos < 0)
- _string[0].xpos = 0;
-
- _charsetBufPos = 0;
- _charset->_top = _string[0].ypos;
- _charset->_startLeft = _charset->_left = _string[0].xpos;
- _charset->_right = _realWidth - 1;
- _charset->_center = false;
- _charset->_color = 15;
- _charset->_disableOffsX = _charset->_firstChar = true;
- _charset->setCurID(3);
- _charset->_nextLeft = _string[0].xpos;
- _charset->_nextTop = _string[0].ypos;
- // FIXME: _talkdelay = 1 - display description, not correct ego actor talking,
- // 0 - no display, correct ego actor talking
- _talkDelay = 0;
-
- restoreCharsetBg();
-
- 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;
-
- gdi._mask_left = _charset->_strLeft;
- gdi._mask_right = _charset->_strRight;
- gdi._mask_top = _charset->_strTop;
- gdi._mask_bottom = _charset->_strBottom;
-}
-
void Scumm::drawDescString(byte *msg) {
byte c, *buf, buffer[256];
@@ -886,7 +842,7 @@
}
void Scumm::translateText(byte *text, byte *trans_buff) {
- if ((_existLanguageFile == true) && (text[0] == '/') && (text[1] != ' ')) {
+ if ((_existLanguageFile == true) && (text[0] == '/')) {
char name[20], tmp[500], tmp2[20], num_s[20], number[4];
int32 num, l, j, k, r, pos;
char enc;
@@ -1016,8 +972,14 @@
if (text[0] == '/') {
byte *pointer = (byte *)strchr((char *)text + 1, '/');
- if (pointer != NULL)
- memcpy(trans_buff, pointer + 1, resStrLen(pointer + 1) + 1);
+ if (pointer != NULL) {
+ pointer++;
+ int l = 0;
+ while (*pointer != '/' && *pointer != 0xff && *pointer != 0) {
+ trans_buff[l++] = *pointer++;
+ }
+ trans_buff[l] = '\0';
+ }
else
trans_buff[0] = '\0';
return;
More information about the Scummvm-git-logs
mailing list