summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-16 08:36:33 -0700
committerIra Rice <irarice@gmail.com>2009-01-16 08:36:33 -0700
commit50335c6b1470c45753d720cebdf4af830ba7a46c (patch)
treeb18dd0bbc7f11e70860a617e9db597fd243b3283 /src/gui
parent29a65dd896255e6e173201dcc0d50bfc273afb61 (diff)
downloadmana-50335c6b1470c45753d720cebdf4af830ba7a46c.tar.gz
mana-50335c6b1470c45753d720cebdf4af830ba7a46c.tar.bz2
mana-50335c6b1470c45753d720cebdf4af830ba7a46c.tar.xz
mana-50335c6b1470c45753d720cebdf4af830ba7a46c.zip
Made emotes load in only one location, as well as fixing the code on the
being so that the last emote draws (which got broken). Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/emotecontainer.cpp10
-rw-r--r--src/gui/emoteshortcutcontainer.cpp9
2 files changed, 3 insertions, 16 deletions
diff --git a/src/gui/emotecontainer.cpp b/src/gui/emotecontainer.cpp
index 691211ca..cba744dd 100644
--- a/src/gui/emotecontainer.cpp
+++ b/src/gui/emotecontainer.cpp
@@ -28,6 +28,7 @@
#include "../animatedsprite.h"
#include "../configuration.h"
#include "../graphics.h"
+#include "../localplayer.h"
#include "../log.h"
#include "../resources/emotedb.h"
@@ -52,14 +53,7 @@ EmoteContainer::EmoteContainer():
// Setup emote sprites
for (int i = 0; i <= EmoteDB::getLast(); i++)
{
- EmoteInfo info = EmoteDB::get(i);
-
- if (info.sprites != EmoteDB::getUnknown().sprites)
- {
- std::string file = "graphics/sprites/" + info.sprites.front()->sprite;
- int variant = info.sprites.front()->variant;
- mEmoteImg.push_back(AnimatedSprite::load(file, variant));
- }
+ mEmoteImg.push_back(player_node->getEmote(i));
}
mSelImg = resman->getImage("graphics/gui/selection.png");
diff --git a/src/gui/emoteshortcutcontainer.cpp b/src/gui/emoteshortcutcontainer.cpp
index edaa8602..a7347bb0 100644
--- a/src/gui/emoteshortcutcontainer.cpp
+++ b/src/gui/emoteshortcutcontainer.cpp
@@ -57,14 +57,7 @@ EmoteShortcutContainer::EmoteShortcutContainer():
// Setup emote sprites
for (int i = 0; i <= EmoteDB::getLast(); i++)
{
- EmoteInfo info = EmoteDB::get(i);
-
- if (info.sprites != EmoteDB::getUnknown().sprites)
- {
- std::string file = "graphics/sprites/" + info.sprites.front()->sprite;
- int variant = info.sprites.front()->variant;
- mEmoteImg.push_back(AnimatedSprite::load(file, variant));
- }
+ mEmoteImg.push_back(player_node->getEmote(i));
}
mMaxItems = MAX_ITEMS;