summaryrefslogtreecommitdiff
path: root/src/gui/playerbox.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-16 14:29:42 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-16 14:29:42 +0000
commit51224bed60d5bed45b53e99b44bc1123a2a9cb68 (patch)
tree2acbf76139b6ef76d21aaf98ee09e326a59c4467 /src/gui/playerbox.cpp
parent96e61ed3ff7e41976ac8788363d6df8719037962 (diff)
downloadmana-51224bed60d5bed45b53e99b44bc1123a2a9cb68.tar.gz
mana-51224bed60d5bed45b53e99b44bc1123a2a9cb68.tar.bz2
mana-51224bed60d5bed45b53e99b44bc1123a2a9cb68.tar.xz
mana-51224bed60d5bed45b53e99b44bc1123a2a9cb68.zip
Made Image/SubImage being drawn by Graphics. Removed some redundant code.
Diffstat (limited to 'src/gui/playerbox.cpp')
-rw-r--r--src/gui/playerbox.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index c62596fc..a94e7c4b 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -81,7 +81,8 @@ void PlayerBox::draw(gcn::Graphics *graphics)
getAbsolutePosition(x, y);
// Draw character
- playerset->spriteset[0]->draw(screen, x + 23, y + 23);
+ dynamic_cast<Graphics*>(graphics)->drawImage(
+ playerset->spriteset[0], x + 23, y + 23);
// Draw his hair
if (hairColor >= 0 && hairStyle >= 0 &&
@@ -89,7 +90,8 @@ void PlayerBox::draw(gcn::Graphics *graphics)
{
int hf = hairColor + 40 * (hairStyle);
if (hf >= 0 && hf < (int)hairset->spriteset.size()) {
- hairset->spriteset[hf]->draw(screen, x + 37, y + 5);
+ dynamic_cast<Graphics*>(graphics)->drawImage(
+ hairset->spriteset[hf], x + 37, y + 5);
}
}
}