summaryrefslogtreecommitdiffstats
path: root/pacman-c++/actor.h
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.h
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.h')
-rw-r--r--pacman-c++/actor.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/pacman-c++/actor.h b/pacman-c++/actor.h
index 507a8e2..0738593 100644
--- a/pacman-c++/actor.h
+++ b/pacman-c++/actor.h
@@ -14,7 +14,8 @@ class Actor
14Q_OBJECT 14Q_OBJECT
15 15
16public: 16public:
17 enum Movement { 17 enum Movement
18 {
18 None = 0, 19 None = 0,
19 Left, 20 Left,
20 Right, 21 Right,
@@ -22,6 +23,11 @@ public:
22 Down, 23 Down,
23 }; 24 };
24 25
26 enum
27 {
28 Type = UserType + Transmission::pacman
29 };
30
25 Actor(Color::Color color, bool local = false, QGraphicsItem *parent = 0); 31 Actor(Color::Color color, bool local = false, QGraphicsItem *parent = 0);
26 virtual ~Actor() 32 virtual ~Actor()
27 {}; 33 {};