diff options
| author | totycro <totycro@unknown-horizons.org> | 2011-04-06 15:07:01 +0200 |
|---|---|---|
| committer | totycro <totycro@unknown-horizons.org> | 2011-04-06 15:07:01 +0200 |
| commit | dce91729ff119ce6e00340f67297ca9e3e72110c (patch) | |
| tree | e0d2eb446bb7ba391319cbd02634bb635b08afcc /pacman-c++/actor.cpp | |
| parent | 6dc8b50817fe5da8550c245db755f7014402c62a (diff) | |
| download | foop-dce91729ff119ce6e00340f67297ca9e3e72110c.tar.gz foop-dce91729ff119ce6e00340f67297ca9e3e72110c.tar.bz2 foop-dce91729ff119ce6e00340f67297ca9e3e72110c.zip | |
Cleaned up constants
Diffstat (limited to 'pacman-c++/actor.cpp')
| -rw-r--r-- | pacman-c++/actor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pacman-c++/actor.cpp b/pacman-c++/actor.cpp index 3794b63..cfd832c 100644 --- a/pacman-c++/actor.cpp +++ b/pacman-c++/actor.cpp | |||
| @@ -22,7 +22,7 @@ Actor::Actor(Color::Color color, QGraphicsItem *parent) | |||
| 22 | 22 | ||
| 23 | /* setup icon for player */ | 23 | /* setup icon for player */ |
| 24 | m_icon.setPixmap(m_pix); | 24 | m_icon.setPixmap(m_pix); |
| 25 | m_icon.setSprite(SPRITE_MARGIN, SPRITE_MARGIN, SPRITE_WIDTH, SPRITE_HEIGHT); | 25 | m_icon.setSprite(Constants::sprite_margin, Constants::sprite_margin, Constants::field_size.width, Constants::field_size.height); |
| 26 | 26 | ||
| 27 | m_direction = Actor::Left; | 27 | m_direction = Actor::Left; |
| 28 | 28 | ||
| @@ -35,9 +35,9 @@ Actor::Actor(Color::Color color, QGraphicsItem *parent) | |||
| 35 | for (int i = 0; i < 4; i++) | 35 | for (int i = 0; i < 4; i++) |
| 36 | { | 36 | { |
| 37 | PixmapItem *img = new PixmapItem(m_pix, this); | 37 | PixmapItem *img = new PixmapItem(m_pix, this); |
| 38 | int x = i * 20 + SPRITE_MARGIN; | 38 | int x = i * 20 + Constants::sprite_margin; |
| 39 | int y = m_direction * 20 + SPRITE_MARGIN; | 39 | int y = m_direction * 20 + Constants::sprite_margin; |
| 40 | img->setSprite(x, y, SPRITE_WIDTH, SPRITE_HEIGHT); | 40 | img->setSprite(x, y, Constants::field_size.width, Constants::field_size.height); |
| 41 | img->setZValue(zValue()); | 41 | img->setZValue(zValue()); |
| 42 | img->setVisible(false); | 42 | img->setVisible(false); |
| 43 | img->setPos(QPointF(200, 0)); | 43 | img->setPos(QPointF(200, 0)); |
