diff options
| author | manuel <manuel@mausz.at> | 2011-04-05 12:26:04 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-05 12:26:04 +0200 |
| commit | bfaf2e63e64169abbb1a4c079a937091060574b7 (patch) | |
| tree | 4054c7cce1f9e8aaa467ef51e28c581c40986b93 /pacman-c++/actor.cpp | |
| parent | 897bc2bb42d79369d2f915d0da4e3b7f3b1a6fce (diff) | |
| download | foop-bfaf2e63e64169abbb1a4c079a937091060574b7.tar.gz foop-bfaf2e63e64169abbb1a4c079a937091060574b7.tar.bz2 foop-bfaf2e63e64169abbb1a4c079a937091060574b7.zip | |
forgot some commits..
replace std::map with QMap
Diffstat (limited to 'pacman-c++/actor.cpp')
| -rw-r--r-- | pacman-c++/actor.cpp | 6 |
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 | |||
| 13 | static QVariant myBooleanInterpolator(const bool &start, const bool &end, qreal progress) | 9 | static 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)); |
