summaryrefslogtreecommitdiff
path: root/src/monster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/monster.cpp')
-rw-r--r--src/monster.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/monster.cpp b/src/monster.cpp
index af84b25e..6416c716 100644
--- a/src/monster.cpp
+++ b/src/monster.cpp
@@ -23,13 +23,13 @@
#include "monster.h"
+#include <sstream>
+
#include "game.h"
#include "log.h"
#include "resources/resourcemanager.h"
-#include "utils/tostring.h"
-
class Spriteset;
extern std::map<int, Spriteset*> monsterset;
@@ -39,9 +39,13 @@ Monster::Monster(Uint32 id, Uint16 job, Map *map):
// Load monster spriteset, if necessary
if (monsterset.find(job - 1002) == monsterset.end())
{
+ std::stringstream filename;
+
+ filename << "graphics/sprites/monster" << (job - 1002) << ".png";
+ logger->log("%s",filename.str().c_str());
+
Spriteset *tmp = ResourceManager::getInstance()->createSpriteset(
- "graphics/sprites/monster" + toString(job - 1002) + ".png",
- 60, 60);
+ filename.str(), 60, 60);
if (!tmp) {
logger->error("Unable to load monster spriteset!");
} else {