From 37b812f2892a9b11a88abcbcde0b47aca76f4a71 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 12 Mar 2009 06:44:16 -0600 Subject: Move emote sprite loading into EmoteDB --- src/gui/emotecontainer.cpp | 2 +- src/gui/emotecontainer.h | 2 +- src/gui/emoteshortcutcontainer.cpp | 4 ++-- src/gui/emoteshortcutcontainer.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui') diff --git a/src/gui/emotecontainer.cpp b/src/gui/emotecontainer.cpp index 9764ab9c..22b4cf50 100644 --- a/src/gui/emotecontainer.cpp +++ b/src/gui/emotecontainer.cpp @@ -54,7 +54,7 @@ EmoteContainer::EmoteContainer(): // Setup emote sprites for (int i = 0; i <= EmoteDB::getLast(); i++) { - mEmoteImg.push_back(player_node->getEmote(i)); + mEmoteImg.push_back(EmoteDB::getAnimation(i)); } mSelImg = resman->getImage("graphics/gui/selection.png"); diff --git a/src/gui/emotecontainer.h b/src/gui/emotecontainer.h index 260f1754..7e88cb71 100644 --- a/src/gui/emotecontainer.h +++ b/src/gui/emotecontainer.h @@ -122,7 +122,7 @@ class EmoteContainer : public gcn::Widget, */ void distributeValueChangedEvent(void); - std::vector mEmoteImg; + std::vector mEmoteImg; Image *mSelImg; int mSelectedEmoteIndex; diff --git a/src/gui/emoteshortcutcontainer.cpp b/src/gui/emoteshortcutcontainer.cpp index f4cef106..8c9df14e 100644 --- a/src/gui/emoteshortcutcontainer.cpp +++ b/src/gui/emoteshortcutcontainer.cpp @@ -60,7 +60,7 @@ EmoteShortcutContainer::EmoteShortcutContainer(): // Setup emote sprites for (int i = 0; i <= EmoteDB::getLast(); i++) { - mEmoteImg.push_back(player_node->getEmote(i)); + mEmoteImg.push_back(EmoteDB::getAnimation(i)); } mMaxItems = EmoteDB::getLast() < MAX_ITEMS ? EmoteDB::getLast() : MAX_ITEMS; @@ -113,7 +113,7 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics) if (mEmoteMoved) { // Draw the emote image being dragged by the cursor. - AnimatedSprite* sprite = mEmoteImg[mEmoteMoved - 1]; + const AnimatedSprite* sprite = mEmoteImg[mEmoteMoved - 1]; if (sprite) { const int tPosX = mCursorPosX - (sprite->getWidth() / 2); diff --git a/src/gui/emoteshortcutcontainer.h b/src/gui/emoteshortcutcontainer.h index 4c4b3614..ff9f929c 100644 --- a/src/gui/emoteshortcutcontainer.h +++ b/src/gui/emoteshortcutcontainer.h @@ -69,7 +69,7 @@ class EmoteShortcutContainer : public ShortcutContainer void mouseReleased(gcn::MouseEvent &event); private: - std::vector mEmoteImg; + std::vector mEmoteImg; bool mEmoteClicked; int mEmoteMoved; -- cgit v1.2.3-70-g09d2