diff options
| author | totycro <totycro@unknown-horizons.org> | 2011-04-04 22:55:41 +0200 |
|---|---|---|
| committer | totycro <totycro@unknown-horizons.org> | 2011-04-04 22:55:41 +0200 |
| commit | b35be096423e89746d441cbf2333800f853c92fd (patch) | |
| tree | 436f9242353f6bc5d9419b92202561eb8c57fb38 /pacman-c++/mainwidget.h | |
| parent | eef1d8ea60e3797ba261ebfe61a7d1e165069ed4 (diff) | |
| download | foop-b35be096423e89746d441cbf2333800f853c92fd.tar.gz foop-b35be096423e89746d441cbf2333800f853c92fd.tar.bz2 foop-b35be096423e89746d441cbf2333800f853c92fd.zip | |
Support actor in map
Diffstat (limited to 'pacman-c++/mainwidget.h')
| -rw-r--r-- | pacman-c++/mainwidget.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pacman-c++/mainwidget.h b/pacman-c++/mainwidget.h index 4cdb3b8..93af229 100644 --- a/pacman-c++/mainwidget.h +++ b/pacman-c++/mainwidget.h | |||
| @@ -2,9 +2,12 @@ | |||
| 2 | #define MAINWIDGET_H | 2 | #define MAINWIDGET_H |
| 3 | 3 | ||
| 4 | #include <QtGui> | 4 | #include <QtGui> |
| 5 | #include <map> | ||
| 5 | 6 | ||
| 6 | #include "constants.h" | 7 | #include "constants.h" |
| 7 | 8 | ||
| 9 | class Actor; | ||
| 10 | |||
| 8 | class MainWidget | 11 | class MainWidget |
| 9 | : public QWidget | 12 | : public QWidget |
| 10 | { | 13 | { |
| @@ -19,7 +22,11 @@ private: | |||
| 19 | // data conversion | 22 | // data conversion |
| 20 | QPoint mapPositionToCoord(unsigned int x, unsigned int y); | 23 | QPoint mapPositionToCoord(unsigned int x, unsigned int y); |
| 21 | 24 | ||
| 22 | QGraphicsScene *scene; | 25 | QGraphicsScene *m_scene; |
| 26 | |||
| 27 | Actor *getActor(Color); | ||
| 28 | typedef std::map<Color, Actor*> ActorMap; | ||
| 29 | ActorMap m_actors; | ||
| 23 | }; | 30 | }; |
| 24 | 31 | ||
| 25 | #endif // MAINWIDGET_H \ No newline at end of file | 32 | #endif // MAINWIDGET_H \ No newline at end of file |
