[Scummvm-cvs-logs] CVS: scummvm/queen display.cpp,1.4,1.5
Gregory Montoir
cyx at users.sourceforge.net
Fri Oct 17 01:47:01 CEST 2003
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv16382
Modified Files:
display.cpp
Log Message:
fix french characters display (and maybe german and italian too)
Index: display.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/display.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- display.cpp 16 Oct 2003 23:16:00 -0000 1.4
+++ display.cpp 17 Oct 2003 08:41:31 -0000 1.5
@@ -46,15 +46,16 @@
}
charWidth[i] += 2;
}
- charWidth[(int)' '] = 4;
- --charWidth[(int)'^'];
+ charWidth[(uint8)' '] = 4;
+ --charWidth[(uint8)'^'];
}
void TextRenderer::drawString(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint8 color, const char *text, bool outlined) {
- while (*text && x < dstPitch) {
- const uint8 *pchr = FONT + (*text) * 8;
+ const uint8 *str = (const uint8*)text;
+ while (*str && x < dstPitch) {
+ const uint8 *pchr = FONT + (*str) * 8;
// FIXME: handle 0x96 character in french version (replace with 0xFB)
@@ -70,8 +71,8 @@
}
drawChar(dstBuf, dstPitch, x, y, color, pchr);
- x += charWidth[ (int)*text ];
- ++text;
+ x += charWidth[ *str ];
+ ++str;
}
}
@@ -409,7 +410,7 @@
uint16 len = 0;
while (*text) {
- len += _textRenderer.charWidth[ (int)*text ];
+ len += _textRenderer.charWidth[ (uint8)*text ];
++text;
}
return len;
More information about the Scummvm-git-logs
mailing list