aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress/data
diff options
context:
space:
mode:
authorLittleboy2012-07-14 16:55:14 -0400
committerLittleboy2012-07-16 23:51:23 -0400
commit43d3b2f378220278f508bfcea89d1aea6decaf6e (patch)
tree9ceda99443a58ffb59c087cc925ed5eede762d70 /engines/lastexpress/data
parenteba2ed99f8b8bf0d3aaf6a314ffbd9e196da8c8c (diff)
downloadscummvm-rg350-43d3b2f378220278f508bfcea89d1aea6decaf6e.tar.gz
scummvm-rg350-43d3b2f378220278f508bfcea89d1aea6decaf6e.tar.bz2
scummvm-rg350-43d3b2f378220278f508bfcea89d1aea6decaf6e.zip
LASTEXPRESS: Remove strange casts
Diffstat (limited to 'engines/lastexpress/data')
-rw-r--r--engines/lastexpress/data/font.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/lastexpress/data/font.cpp b/engines/lastexpress/data/font.cpp
index 79cf64e617..8ac1afce9a 100644
--- a/engines/lastexpress/data/font.cpp
+++ b/engines/lastexpress/data/font.cpp
@@ -149,7 +149,7 @@ uint8 Font::getCharWidth(uint16 c) const{
uint16 Font::getStringWidth(Common::String str) const {
uint16 width = 0;
for (uint i = 0; i < str.size(); i++)
- width += getCharWidth((unsigned) (int)str[i]);
+ width += getCharWidth((unsigned char)str[i]);
return width;
}
@@ -185,8 +185,8 @@ void Font::drawChar(Graphics::Surface *surface, int16 x, int16 y, uint16 c) {
Common::Rect Font::drawString(Graphics::Surface *surface, int16 x, int16 y, Common::String str) {
int16 currentX = x;
for (uint i = 0; i < str.size(); i++) {
- drawChar(surface, currentX, y, (unsigned) (int)str[i]);
- currentX += getCharWidth((unsigned) (int)str[i]);
+ drawChar(surface, currentX, y, (unsigned char)str[i]);
+ currentX += getCharWidth((unsigned char)str[i]);
}
return Common::Rect(x, y, x + currentX, y + (int16)_charHeight);