diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-04-30 19:11:19 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-04-30 19:11:19 +0000 |
commit | a1fa39b43639137e141febf67224f698ec17aec9 (patch) | |
tree | 894f5ed89b852470ddbf6b7c71786cd45f1a5a0f /src/engine.cpp | |
parent | ad3623ced5020c9c886cb85100ae05efa460f84a (diff) | |
download | mana-a1fa39b43639137e141febf67224f698ec17aec9.tar.gz mana-a1fa39b43639137e141febf67224f698ec17aec9.tar.bz2 mana-a1fa39b43639137e141febf67224f698ec17aec9.tar.xz mana-a1fa39b43639137e141febf67224f698ec17aec9.zip |
Emoticons framerate independent and NPCs image smaller to work in OpenGL
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index e013041f..11a0cd81 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -288,6 +288,13 @@ void Engine::logic() default: break; } + + if (being->emotion != 0) { + being->emotion_time--; + if (being->emotion_time == 0) { + being->emotion = 0; + } + } } if (get_elapsed_time(being->speech_time) > 5000) @@ -367,8 +374,8 @@ void Engine::draw() guiGraphics->drawRectangle(gcn::Rectangle(sx * 32, sy * 32, 32, 32)); #endif - if ((being->job >= 100) && (being->job <= 110)) { // Draw a NPC - npcset->spriteset[4 * (being->job - 100) + dir]->draw(screen, + if ((being->job >= 100) && (being->job < 110)) { // Draw a NPC + npcset->spriteset[being->job - 100]->draw(screen, sx * 32 - 8 - offset_x, sy * 32 - 52 - offset_y); } @@ -407,10 +414,6 @@ void Engine::draw() emotionset->spriteset[being->emotion - 1]->draw(screen, sx * 32 + 5 + get_x_offset(being) - offset_x, sy * 32 - 65 + get_y_offset(being) - offset_y); - being->emotion_time--; - if (being->emotion_time == 0) { - being->emotion = 0; - } } graphics->drawText(being->name, |