diff options
author | Torbjörn Andersson | 2008-06-09 17:50:52 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2008-06-09 17:50:52 +0000 |
commit | 339874f6c0934e16ac78c9b79a94b765668409af (patch) | |
tree | 55728234745851b1733ecc02d75f5bcd67008b70 /engines/cine | |
parent | 50c62c7eac52dbb8beb6e3381a1312be45c43835 (diff) | |
download | scummvm-rg350-339874f6c0934e16ac78c9b79a94b765668409af.tar.gz scummvm-rg350-339874f6c0934e16ac78c9b79a94b765668409af.tar.bz2 scummvm-rg350-339874f6c0934e16ac78c9b79a94b765668409af.zip |
Fixed warnings. (Mainly, GCC 4.3 doesn't want you to use "char" as an array
index. Probably because it's undefined whether or not it's signed.)
svn-id: r32637
Diffstat (limited to 'engines/cine')
-rw-r--r-- | engines/cine/gfx.cpp | 8 | ||||
-rw-r--r-- | engines/cine/texte.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index aa457fe4f9..47446f2410 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -335,8 +335,8 @@ int FWRenderer::drawChar(char character, int x, int y) { if (character == ' ') { x += 5; - } else if ((width = fontParamTable[character].characterWidth)) { - idx = fontParamTable[character].characterIdx; + } else if ((width = fontParamTable[(unsigned char)character].characterWidth)) { + idx = fontParamTable[(unsigned char)character].characterIdx; drawSpriteRaw(textTable[idx][0], textTable[idx][1], 16, 8, _backBuffer, x, y); x += width + 1; } @@ -936,8 +936,8 @@ int OSRenderer::drawChar(char character, int x, int y) { if (character == ' ') { x += 5; - } else if ((width = fontParamTable[character].characterWidth)) { - idx = fontParamTable[character].characterIdx; + } else if ((width = fontParamTable[(unsigned char)character].characterWidth)) { + idx = fontParamTable[(unsigned char)character].characterIdx; drawSpriteRaw2(textTable[idx][0], 0, 16, 8, _backBuffer, x, y); x += width + 1; } diff --git a/engines/cine/texte.cpp b/engines/cine/texte.cpp index 91a209074d..9b4b83f420 100644 --- a/engines/cine/texte.cpp +++ b/engines/cine/texte.cpp @@ -635,7 +635,7 @@ int fitLine(const char *str, int maxWidth, int &words, int &width) { bkpWidth = width; bkpLen = i + 1; } else { - charWidth = fontParamTable[str[i]].characterWidth + 1; + charWidth = fontParamTable[(unsigned char)str[i]].characterWidth + 1; width += charWidth; } |