summaryrefslogtreecommitdiff
path: root/src/monster.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-18 14:47:14 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-18 14:47:14 +0000
commitab678324e3d73e2354cef331624ecef7cfc03203 (patch)
tree29394a5aca6e59f817f7cfa3b9281891a273d259 /src/monster.cpp
parent32badd4b6f843cb74fdc3238fe92119518c8c0ab (diff)
downloadmana-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.cpp12
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 {