diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-09 03:21:39 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-09 03:21:39 +0000 |
commit | 7593d6c71e2331c3e43c732db60ad03ee4d5385d (patch) | |
tree | 3ad242a957b6a500319d7bdae15149c553521ee4 /src/player.cpp | |
parent | 81cf85e9ec1d37dc6e8dd9883f42bb50dace9135 (diff) | |
download | mana-client-7593d6c71e2331c3e43c732db60ad03ee4d5385d.tar.gz mana-client-7593d6c71e2331c3e43c732db60ad03ee4d5385d.tar.bz2 mana-client-7593d6c71e2331c3e43c732db60ad03ee4d5385d.tar.xz mana-client-7593d6c71e2331c3e43c732db60ad03ee4d5385d.zip |
Added Spriteset::get() and Spriteset::size() to hide the member vector and remove the weird mySpriteset->spriteset stuff.
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/player.cpp b/src/player.cpp index 8afd92a8..67110bd8 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -126,7 +126,7 @@ void Player::draw(Graphics *graphics, int offsetX, int offsetY) unsigned char dir = 0; while (!(direction & (1 << dir))) dir++; - graphics->drawImage(playerset->spriteset[frame + 18 * dir], + graphics->drawImage(playerset->get(frame + 18 * dir), px - 16, py - 32); if (getWeapon() != 0 && action == ATTACK) @@ -136,8 +136,7 @@ void Player::draw(Graphics *graphics, int offsetX, int offsetY) { frames = 5; } - Image *image = weaponset[getWeapon() - 1]->spriteset[ - mFrame + frames * dir]; + Image *image = weaponset[getWeapon() - 1]->get(mFrame + frames * dir); graphics->drawImage(image, px - 16, py - 32); } @@ -145,7 +144,7 @@ void Player::draw(Graphics *graphics, int offsetX, int offsetY) { int hf = 9 * (getHairColor() - 1) + hairframe[dir][frame]; - graphics->drawImage(hairset[getHairStyle() - 1]->spriteset[hf], + graphics->drawImage(hairset[getHairStyle() - 1]->get(hf), px + 1 + hairtable[frame][dir][0], py - 33 + hairtable[frame][dir][1]); } |