diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-09 17:41:31 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-09 17:41:31 +0000 |
commit | 579969a548e37bb631d3f79a5d420e577e022630 (patch) | |
tree | 9935821baa2936aec4d0b8f7215f47bea937ea19 /src | |
parent | 57b38f5a1f7e9310da0d8df64b397c1e87dec215 (diff) | |
download | mana-579969a548e37bb631d3f79a5d420e577e022630.tar.gz mana-579969a548e37bb631d3f79a5d420e577e022630.tar.bz2 mana-579969a548e37bb631d3f79a5d420e577e022630.tar.xz mana-579969a548e37bb631d3f79a5d420e577e022630.zip |
Fixed the no hair problem.
Diffstat (limited to 'src')
-rw-r--r-- | src/graphic/graphic.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 99a7c319..65775c75 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -375,28 +375,29 @@ void Engine::draw() else if (being->job < 10) { // Draw a player being->text_x = sx * 32 + get_x_offset(being) - offset_x; being->text_y = sy * 32 + get_y_offset(being) - offset_y; - int hf = being->hair_color - 1 + 10 * (dir + 4 * - (being->hair_style - 1)); - - if (being->action == SIT || being->action == DEAD) being->frame = 0; - if (being->action == ATTACK) { - int pf = being->frame + being->action + 4 * being->weapon; - playerset->spriteset[4 * pf + dir]->draw(screen, - being->text_x - 64, being->text_y - 80); - hairset->spriteset[hf]->draw(screen, - being->text_x - 2 + 2 * hairtable[pf][dir][0], - being->text_y - 50 + 2 * hairtable[pf][dir][1]); + if (being->action == SIT || being->action == DEAD) { + being->frame = 0; } - else { - int pf = being->frame + being->action; - playerset->spriteset[4 * pf + dir]->draw(screen, - being->text_x - 64, being->text_y - 80); + int pf = being->frame + being->action; + + if (being->action == ATTACK) { + pf += 4 * being->weapon; + } + + playerset->spriteset[4 * pf + dir]->draw(screen, + being->text_x - 64, being->text_y - 80); + + if (being->hair_color <= 10) { + int hf = being->hair_color - 1 + 10 * (dir + 4 * + (being->hair_style - 1)); + hairset->spriteset[hf]->draw(screen, being->text_x - 2 + 2 * hairtable[pf][dir][0], being->text_y - 50 + 2 * hairtable[pf][dir][1]); } + if (being->emotion != 0) { emotionset->spriteset[being->emotion - 1]->draw(screen, sx * 32 - 5 + get_x_offset(being) - offset_x, |