[Scummvm-cvs-logs] CVS: scummvm/scumm nut_renderer.cpp,1.15,1.16 nut_renderer.h,1.4,1.5
Max Horn
fingolfin at users.sourceforge.net
Thu Jan 30 08:03:02 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv14006
Modified Files:
nut_renderer.cpp nut_renderer.h
Log Message:
fixed crash with non-ASCII chars
Index: nut_renderer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- nut_renderer.cpp 19 Jan 2003 11:00:14 -0000 1.15
+++ nut_renderer.cpp 30 Jan 2003 16:02:19 -0000 1.16
@@ -124,7 +124,7 @@
return true;
}
-int32 NutRenderer::getCharWidth(char c) {
+int32 NutRenderer::getCharWidth(byte c) {
debug(2, "NutRenderer::getCharWidth() called");
if (_loaded == false) {
debug(2, "NutRenderer::getCharWidth() Font is not loaded");
@@ -134,7 +134,7 @@
return READ_LE_UINT16(_dataSrc + _offsets[c] + 6);
}
-int32 NutRenderer::getCharHeight(char c) {
+int32 NutRenderer::getCharHeight(byte c) {
debug(2, "NutRenderer::getCharHeight() called");
if (_loaded == false) {
debug(2, "NutRenderer::getCharHeight() Font is not loaded");
@@ -144,7 +144,7 @@
return READ_LE_UINT16(_dataSrc + _offsets[c] + 8);
}
-int32 NutRenderer::getStringWidth(char *string) {
+int32 NutRenderer::getStringWidth(byte *string) {
debug(2, "NutRenderer::getStringWidth() called");
if (_loaded == false) {
debug(2, "NutRenderer::getStringWidth() Font is not loaded");
@@ -161,7 +161,7 @@
return length;
}
-void NutRenderer::drawChar(char c, int32 x, int32 y, byte color, bool useMask) {
+void NutRenderer::drawChar(byte c, int32 x, int32 y, byte color, bool useMask) {
debug(2, "NutRenderer::drawChar('%c', %d, %d, %d, %d) called", c, x, y, (int)color, useMask);
if (_loaded == false) {
debug(2, "NutRenderer::drawChar() Font is not loaded");
Index: nut_renderer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- nut_renderer.h 15 Jan 2003 03:10:28 -0000 1.4
+++ nut_renderer.h 30 Jan 2003 16:02:20 -0000 1.5
@@ -41,11 +41,11 @@
~NutRenderer();
bool loadFont(const char *filename, const char *dir);
- void drawChar(char c, int32 x, int32 y, byte color, bool useMask);
+ void drawChar(byte c, int32 x, int32 y, byte color, bool useMask);
// void drawString(const char *string, int32 x, int32 y, byte color, int32 mode);
- int32 getCharWidth(char c);
- int32 getCharHeight(char c);
- int32 getStringWidth(char *string);
+ int32 getCharWidth(byte c);
+ int32 getCharHeight(byte c);
+ int32 getStringWidth(byte *string);
};
More information about the Scummvm-git-logs
mailing list