summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-06-17 16:46:06 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-06-17 16:46:06 +0200
commit914d3de7c324cb1ec456892702689718352a7842 (patch)
treeeb05c251adb6f012a40f3d7de4eb42ab854b7d94 /src/being.cpp
parentfaf0a45d6b8b85acd2836cf5e8e7f7c5b161931d (diff)
downloadmana-client-914d3de7c324cb1ec456892702689718352a7842.tar.gz
mana-client-914d3de7c324cb1ec456892702689718352a7842.tar.bz2
mana-client-914d3de7c324cb1ec456892702689718352a7842.tar.xz
mana-client-914d3de7c324cb1ec456892702689718352a7842.zip
First pass on removing tile hard coded values.
Every files has been checked against the hard coded 32 values except the map.cpp file. I also added convenience functions in the Game class, centralized the default item icon size, and removed two unused defines in being.cpp.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp
index d9180bc9..69c233f2 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -27,6 +27,7 @@
#include "configuration.h"
#include "effectmanager.h"
#include "event.h"
+#include "game.h"
#include "graphics.h"
#include "guild.h"
#include "localplayer.h"
@@ -67,8 +68,6 @@
#define HAIR_FILE "hair.xml"
-static const int DEFAULT_BEING_WIDTH = 32;
-static const int DEFAULT_BEING_HEIGHT = 32;
int Being::mNumberOfHairstyles = 1;
Being::Being(int id, Type type, int subtype, Map *map):
@@ -592,7 +591,8 @@ void Being::fireMissile(Being *victim, const std::string &particle)
if (missile)
{
Particle *target = particleEngine->createChild();
- target->moveBy(Vector(0.0f, 0.0f, 32.0f));
+ target->moveBy(Vector(0.0f, 0.0f,
+ Game::instance()->getCurrentTileWidth()));
target->setLifetime(1000);
victim->controlParticle(target);