diff options
author | Littleboy | 2012-07-14 16:55:14 -0400 |
---|---|---|
committer | Littleboy | 2012-07-16 23:51:23 -0400 |
commit | 43d3b2f378220278f508bfcea89d1aea6decaf6e (patch) | |
tree | 9ceda99443a58ffb59c087cc925ed5eede762d70 | |
parent | eba2ed99f8b8bf0d3aaf6a314ffbd9e196da8c8c (diff) | |
download | scummvm-rg350-43d3b2f378220278f508bfcea89d1aea6decaf6e.tar.gz scummvm-rg350-43d3b2f378220278f508bfcea89d1aea6decaf6e.tar.bz2 scummvm-rg350-43d3b2f378220278f508bfcea89d1aea6decaf6e.zip |
LASTEXPRESS: Remove strange casts
-rw-r--r-- | engines/lastexpress/data/font.cpp | 6 | ||||
-rw-r--r-- | engines/lastexpress/game/inventory.cpp | 2 |
2 files changed, 4 insertions, 4 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); diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp index bb382ea38e..70536b7a6d 100644 --- a/engines/lastexpress/game/inventory.cpp +++ b/engines/lastexpress/game/inventory.cpp @@ -259,7 +259,7 @@ void Inventory::handleMouseEvent(const Common::Event &ev) { // Change item highlight on list if (getFlags()->mouseLeftPressed) { - uint32 index = (unsigned) (int) ev.mouse.y / 40; + uint32 index = (uint16)ev.mouse.y / 40; if (_highlightedItemIndex && _highlightedItemIndex != index) drawHighlight(_highlightedItemIndex, true); |