summaryrefslogtreecommitdiffstats
path: root/pacman-c++/actor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pacman-c++/actor.cpp')
-rw-r--r--pacman-c++/actor.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/pacman-c++/actor.cpp b/pacman-c++/actor.cpp
index 2df238b..d900e57 100644
--- a/pacman-c++/actor.cpp
+++ b/pacman-c++/actor.cpp
@@ -6,10 +6,6 @@
6#include <QtCore/QVariantAnimation> 6#include <QtCore/QVariantAnimation>
7#include <QDebug> 7#include <QDebug>
8 8
9#define SPRITE_MARGIN 2
10#define SPRITE_PLAYER_WIDTH 16
11#define SPRITE_PLAYER_HEIGHT 16
12
13static QVariant myBooleanInterpolator(const bool &start, const bool &end, qreal progress) 9static QVariant myBooleanInterpolator(const bool &start, const bool &end, qreal progress)
14{ 10{
15 return (progress == 1.0) ? end : start; 11 return (progress == 1.0) ? end : start;
@@ -37,7 +33,7 @@ Actor::Actor(Color color, QGraphicsItem *parent)
37 PixmapItem *img = new PixmapItem(m_pix, this); 33 PixmapItem *img = new PixmapItem(m_pix, this);
38 int x = i * 20 + SPRITE_MARGIN; 34 int x = i * 20 + SPRITE_MARGIN;
39 int y = m_direction * 20 + SPRITE_MARGIN; 35 int y = m_direction * 20 + SPRITE_MARGIN;
40 img->setSprite(x, y, SPRITE_PLAYER_WIDTH, SPRITE_PLAYER_HEIGHT); 36 img->setSprite(x, y, SPRITE_WIDTH, SPRITE_HEIGHT);
41 img->setZValue(zValue()); 37 img->setZValue(zValue());
42 img->setVisible(false); 38 img->setVisible(false);
43 img->setPos(QPointF(200, 0)); 39 img->setPos(QPointF(200, 0));