diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-18 14:47:14 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-18 14:47:14 +0000 |
commit | ab678324e3d73e2354cef331624ecef7cfc03203 (patch) | |
tree | 29394a5aca6e59f817f7cfa3b9281891a273d259 /src/monster.cpp | |
parent | 32badd4b6f843cb74fdc3238fe92119518c8c0ab (diff) | |
download | mana-client-ab678324e3d73e2354cef331624ecef7cfc03203.tar.gz mana-client-ab678324e3d73e2354cef331624ecef7cfc03203.tar.bz2 mana-client-ab678324e3d73e2354cef331624ecef7cfc03203.tar.xz mana-client-ab678324e3d73e2354cef331624ecef7cfc03203.zip |
Added a toString conversion function.
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 { |