summaryrefslogtreecommitdiff
path: root/noncore/games/kpacman/pacman.h
authorleseb <leseb>2002-04-15 22:40:28 (UTC)
committer leseb <leseb>2002-04-15 22:40:28 (UTC)
commita91544d04ed391bbdc0c6f95ff8a80d35190788c (patch) (side-by-side diff)
tree85dea85fd8a1cdb6d2d18fef57753d0b5e4bd143 /noncore/games/kpacman/pacman.h
parent6396d8b9fca7f3f50010a13a26e4ee9569abefb3 (diff)
downloadopie-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.h47
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 @@
+#ifndef PACMAN_H
+#define PACMAN_H
+
+#include <stdlib.h>
+#include <qpixmap.h>
+#include <qwidget.h>
+
+#include "board.h"
+
+enum pacmanState { alive };
+
+class Pacman {
+public:
+ Pacman(Board *b);
+ void init(bool Demo = FALSE);
+ void setMaxPixmaps(int max);
+ void setAlive(int ticks);
+ void setPosition(int pos);
+ void setDirection(int dir, bool forced = FALSE);
+ void setDemo(bool yes);
+ pacmanState state();
+ int position();
+ int direction();
+ bool move();
+ int pix();
+
+private:
+ Board *board;
+
+ pacmanState actualState; // the state of pacman
+ bool demo; // real life or just demo
+
+ int pauseDuration; // number of ticks before next movement
+ int pause; // actual ticks before movement (0=move)
+
+ int actualDirection; // actual direction of pacman
+ int nextDirection; // where he wants to go
+ int lastPix; // last Pixmap-index before no movement
+ int maxPixmaps; // Number of Pixmaps (1..)
+ int actualPosition; // actual position on board
+ int lastPosition; // the last position of pacman
+ int mouthPosition; // eating
+
+};
+
+#endif // PACMAN_H
+