author | leseb <leseb> | 2002-04-15 22:40:28 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-04-15 22:40:28 (UTC) |
commit | a91544d04ed391bbdc0c6f95ff8a80d35190788c (patch) (unidiff) | |
tree | 85dea85fd8a1cdb6d2d18fef57753d0b5e4bd143 /noncore/games/kpacman/pacman.h | |
parent | 6396d8b9fca7f3f50010a13a26e4ee9569abefb3 (diff) | |
download | opie-a91544d04ed391bbdc0c6f95ff8a80d35190788c.zip opie-a91544d04ed391bbdc0c6f95ff8a80d35190788c.tar.gz opie-a91544d04ed391bbdc0c6f95ff8a80d35190788c.tar.bz2 |
New directory structure
Diffstat (limited to 'noncore/games/kpacman/pacman.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/kpacman/pacman.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/noncore/games/kpacman/pacman.h b/noncore/games/kpacman/pacman.h new file mode 100644 index 0000000..e81fdd2 --- a/dev/null +++ b/noncore/games/kpacman/pacman.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #ifndef PACMAN_H | ||
2 | #define PACMAN_H | ||
3 | |||
4 | #include <stdlib.h> | ||
5 | #include <qpixmap.h> | ||
6 | #include <qwidget.h> | ||
7 | |||
8 | #include "board.h" | ||
9 | |||
10 | enum pacmanState { alive }; | ||
11 | |||
12 | class Pacman { | ||
13 | public: | ||
14 | Pacman(Board *b); | ||
15 | void init(bool Demo = FALSE); | ||
16 | void setMaxPixmaps(int max); | ||
17 | void setAlive(int ticks); | ||
18 | void setPosition(int pos); | ||
19 | void setDirection(int dir, bool forced = FALSE); | ||
20 | void setDemo(bool yes); | ||
21 | pacmanState state(); | ||
22 | int position(); | ||
23 | int direction(); | ||
24 | bool move(); | ||
25 | int pix(); | ||
26 | |||
27 | private: | ||
28 | Board *board; | ||
29 | |||
30 | pacmanState actualState; // the state of pacman | ||
31 | bool demo; // real life or just demo | ||
32 | |||
33 | int pauseDuration; // number of ticks before next movement | ||
34 | int pause; // actual ticks before movement (0=move) | ||
35 | |||
36 | int actualDirection; // actual direction of pacman | ||
37 | int nextDirection; // where he wants to go | ||
38 | int lastPix; // last Pixmap-index before no movement | ||
39 | int maxPixmaps; // Number of Pixmaps (1..) | ||
40 | int actualPosition; // actual position on board | ||
41 | int lastPosition; // the last position of pacman | ||
42 | int mouthPosition; // eating | ||
43 | |||
44 | }; | ||
45 | |||
46 | #endif // PACMAN_H | ||
47 | |||