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 | |
parent | ad3623ced5020c9c886cb85100ae05efa460f84a (diff) | |
download | mana-client-a1fa39b43639137e141febf67224f698ec17aec9.tar.gz mana-client-a1fa39b43639137e141febf67224f698ec17aec9.tar.bz2 mana-client-a1fa39b43639137e141febf67224f698ec17aec9.tar.xz mana-client-a1fa39b43639137e141febf67224f698ec17aec9.zip |
Emoticons framerate independent and NPCs image smaller to work in OpenGL
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/engine.cpp | 15 | ||||
-rw-r--r-- | src/game.cpp | 1 | ||||
-rw-r--r-- | src/game.h | 1 |
4 files changed, 12 insertions, 9 deletions
@@ -17,8 +17,8 @@ - Fixed NPC lists not to show garbage - Fixed attack animation to be synced with attack speed - Fixed speech and emoticons position -- Fixed speech and damage display to be framerate independent -- Fixed rendering of some monsters and items in OpenGL mode +- Fixed speech, damage and emoticon display to be framerate independent +- Fixed rendering of certain monsters, items and NPCs in OpenGL mode - Fixed skipping with mouse walk and made interruptable with keyboard - Fixed mouse walk when dead or talking with NPC 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, diff --git a/src/game.cpp b/src/game.cpp index b079135c..8e0168b2 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -55,6 +55,7 @@ int gameTime = 0; OkDialog *deathNotice = NULL; +#define EMOTION_TIME 150 #define MAX_TIME 10000 class DeatchNoticeListener : public gcn::ActionListener { @@ -30,7 +30,6 @@ #include <stdio.h> #define SPEECH_TIME 80 -#define EMOTION_TIME 40 #define SPEECH_MAX_TIME 100 // Action defines |