summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp29
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)