summaryrefslogtreecommitdiffstats
path: root/pacman-c++/actor.cpp
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2011-04-17 19:54:02 +0200
committermanuel <manuel@mausz.at>2011-04-17 19:54:02 +0200
commit19c9c38d28cdaafcc1b496027f53dcd1914037cf (patch)
tree416d1efa5ed1dd9fdcea55cb5794fdb25d3bbb87 /pacman-c++/actor.cpp
parent65195fdab6262d31056c74f922376de3b009943c (diff)
downloadfoop-19c9c38d28cdaafcc1b496027f53dcd1914037cf.tar.gz
foop-19c9c38d28cdaafcc1b496027f53dcd1914037cf.tar.bz2
foop-19c9c38d28cdaafcc1b496027f53dcd1914037cf.zip
get rid of two dynamic_casts and use qgraphicitem_cast which is A LOT faster (it makes use of static casts)
Diffstat (limited to 'pacman-c++/actor.cpp')
-rw-r--r--pacman-c++/actor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/pacman-c++/actor.cpp b/pacman-c++/actor.cpp
index e8f5496..fb4b38a 100644
--- a/pacman-c++/actor.cpp
+++ b/pacman-c++/actor.cpp
@@ -13,6 +13,8 @@ Actor::Actor(Color::Color color, bool local, QGraphicsItem *parent)
13 : GameEntity(color, parent),m_direction(Actor::None), m_local(local), 13 : GameEntity(color, parent),m_direction(Actor::None), m_local(local),
14 m_wakaPlayer(NULL), m_roundPoints(0), m_gamePoints(0) 14 m_wakaPlayer(NULL), m_roundPoints(0), m_gamePoints(0)
15{ 15{
16 m_type = Type;
17
16 /* DON'T set any pixmap here. we've a pixmap in the animation 18 /* DON'T set any pixmap here. we've a pixmap in the animation
17 * but we need a sprite for the collision detection 19 * but we need a sprite for the collision detection
18 */ 20 */