diff options
Diffstat (limited to 'src/monster.cpp')
-rw-r--r-- | src/monster.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/monster.cpp b/src/monster.cpp index 6416c716..af84b25e 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,13 +39,9 @@ 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( - filename.str(), 60, 60); + "graphics/sprites/monster" + toString(job - 1002) + ".png", + 60, 60); if (!tmp) { logger->error("Unable to load monster spriteset!"); } else { |