diff options
author | Bertram <bertram@cegetel.net> | 2010-03-03 23:38:18 +0100 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2010-03-03 23:38:18 +0100 |
commit | 1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9 (patch) | |
tree | 596305e9bfd4ad8448efd477a43f86490b1974c5 /src/localplayer.cpp | |
parent | 8cc31b582f372238ce6bd2c86888d312cf1fe5b2 (diff) | |
parent | f5f7a7d5990d1133f714b6cd431aecf6a332fbd5 (diff) | |
download | mana-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.gz mana-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.bz2 mana-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.xz mana-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.zip |
Merge branch 'master' of gitorious.org:mana/mana
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 8ce03bba..8c918a97 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -43,6 +43,7 @@ #include "gui/ministatus.h" #include "gui/palette.h" #include "gui/skilldialog.h" +#include "gui/skin.h" #include "gui/statuswindow.h" #include "gui/storagewindow.h" @@ -102,11 +103,6 @@ LocalPlayer::LocalPlayer(int id, int job): mLocalWalkTime(-1), mMessageTime(0) { - // Variable to keep the local player from doing certain actions before a map - // is initialized. e.g. drawing a player's name using the TextManager, since - // it appears to be dependant upon map coordinates for updating drawing. - mMapInitialized = false; - mUpdateName = true; mTextColor = &guiPalette->getColor(Palette::PLAYER); @@ -1050,18 +1046,12 @@ void LocalPlayer::handleStatusEffect(StatusEffect *effect, int effectId) void LocalPlayer::initTargetCursor() { // Load target cursors - loadTargetCursor("graphics/gui/target-cursor-blue-s.png", 44, 35, - false, TC_SMALL); - loadTargetCursor("graphics/gui/target-cursor-red-s.png", 44, 35, - true, TC_SMALL); - loadTargetCursor("graphics/gui/target-cursor-blue-m.png", 62, 44, - false, TC_MEDIUM); - loadTargetCursor("graphics/gui/target-cursor-red-m.png", 62, 44, - true, TC_MEDIUM); - loadTargetCursor("graphics/gui/target-cursor-blue-l.png", 82, 60, - false, TC_LARGE); - loadTargetCursor("graphics/gui/target-cursor-red-l.png", 82, 60, - true, TC_LARGE); + loadTargetCursor("target-cursor-blue-s.png", 44, 35, false, TC_SMALL); + loadTargetCursor("target-cursor-red-s.png", 44, 35, true, TC_SMALL); + loadTargetCursor("target-cursor-blue-m.png", 62, 44, false, TC_MEDIUM); + loadTargetCursor("target-cursor-red-m.png", 62, 44, true, TC_MEDIUM); + loadTargetCursor("target-cursor-blue-l.png", 82, 60, false, TC_LARGE); + loadTargetCursor("target-cursor-red-l.png", 82, 60, true, TC_LARGE); } void LocalPlayer::loadTargetCursor(const std::string &filename, @@ -1071,9 +1061,8 @@ void LocalPlayer::loadTargetCursor(const std::string &filename, assert(size > -1); assert(size < 3); - ResourceManager *resman = ResourceManager::getInstance(); - - ImageSet *currentImageSet = resman->getImageSet(filename, width, height); + ImageSet *currentImageSet = SkinLoader::getImageSetFromTheme(filename, + width, height); Animation *anim = new Animation; for (unsigned int i = 0; i < currentImageSet->size(); ++i) |