aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-01-30 16:02:20 +0000
committerMax Horn2003-01-30 16:02:20 +0000
commit756c059a12b9a138d66c0fba8fc2dc9ee6724235 (patch)
tree50ed8f2eeca6195275b6bb583276a74967d8b252 /scumm
parent439046716b5dd941a24d5b82f8a143f5450886c6 (diff)
downloadscummvm-rg350-756c059a12b9a138d66c0fba8fc2dc9ee6724235.tar.gz
scummvm-rg350-756c059a12b9a138d66c0fba8fc2dc9ee6724235.tar.bz2
scummvm-rg350-756c059a12b9a138d66c0fba8fc2dc9ee6724235.zip
fixed crash with non-ASCII chars
svn-id: r6577
Diffstat (limited to 'scumm')
-rw-r--r--scumm/nut_renderer.cpp8
-rw-r--r--scumm/nut_renderer.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/scumm/nut_renderer.cpp b/scumm/nut_renderer.cpp
index 3d8fddc955..42d64e6572 100644
--- a/scumm/nut_renderer.cpp
+++ b/scumm/nut_renderer.cpp
@@ -124,7 +124,7 @@ bool NutRenderer::loadFont(const char *filename, const char *dir) {
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 @@ int32 NutRenderer::getCharWidth(char c) {
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 @@ int32 NutRenderer::getCharHeight(char c) {
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 @@ int32 NutRenderer::getStringWidth(char *string) {
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");
diff --git a/scumm/nut_renderer.h b/scumm/nut_renderer.h
index df0d484f23..34d7ea5a6e 100644
--- a/scumm/nut_renderer.h
+++ b/scumm/nut_renderer.h
@@ -41,11 +41,11 @@ public:
~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);
};