-rw-r--r-- | noncore/games/sfcave/sfcave.h | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/noncore/games/sfcave/sfcave.h b/noncore/games/sfcave/sfcave.h index 18eeef9..b19d147 100644 --- a/noncore/games/sfcave/sfcave.h +++ b/noncore/games/sfcave/sfcave.h | |||
@@ -10,11 +10,6 @@ | |||
10 | #define MAPSIZE 52 | 10 | #define MAPSIZE 52 |
11 | #define BLOCKSIZE 5 | 11 | #define BLOCKSIZE 6 |
12 | #define TRAILSIZE 30 | 12 | #define TRAILSIZE 30 |
13 | 13 | ||
14 | #define STATE_BOSS 0 | 14 | class SFCave : public QMainWindow |
15 | #define STATE_RUNNING 1 | ||
16 | #define STATE_CRASHED 2 | ||
17 | #define STATE_NEWGAME 3 | ||
18 | |||
19 | class Main : public QMainWindow | ||
20 | { | 15 | { |
@@ -29,2 +24,3 @@ public: | |||
29 | int blockHeight; | 24 | int blockHeight; |
25 | int gapHeight; | ||
30 | int state; | 26 | int state; |
@@ -34,2 +30,16 @@ public: | |||
34 | 30 | ||
31 | int gateDistance; | ||
32 | int nextGate; | ||
33 | int lastGateBottomY; | ||
34 | |||
35 | static QString menuOptions[2][5]; | ||
36 | int currentMenuNr; | ||
37 | int nrMenuOptions[2]; | ||
38 | int currentMenuOption[2]; | ||
39 | |||
40 | static QString dificultyOption[3]; | ||
41 | static QString gameTypes[3]; | ||
42 | int currentGameType; | ||
43 | int currentGameDifficulty; | ||
44 | |||
35 | QPixmap *offscreen; | 45 | QPixmap *offscreen; |
@@ -38,9 +48,9 @@ public: | |||
38 | int score; | 48 | int score; |
39 | int highestScore; | 49 | int highestScore[3]; |
40 | 50 | ||
41 | int mapTop[52]; | 51 | int mapTop[MAPSIZE]; |
42 | int mapBottom[52]; | 52 | int mapBottom[MAPSIZE]; |
43 | QRect blocks[5]; | 53 | QRect blocks[BLOCKSIZE]; |
44 | QRect user; | 54 | QRect user; |
45 | QPoint trail[30]; | 55 | QPoint trail[TRAILSIZE]; |
46 | 56 | ||
@@ -57,4 +67,4 @@ public: | |||
57 | 67 | ||
58 | Main( int speed = 3, QWidget *p = 0, char *name = 0 ); | 68 | SFCave( int speed = 3, QWidget *p = 0, char *name = 0 ); |
59 | ~Main(); | 69 | ~SFCave(); |
60 | void start(); | 70 | void start(); |
@@ -65,2 +75,3 @@ public: | |||
65 | void addBlock(); | 75 | void addBlock(); |
76 | void addGate(); | ||
66 | void setPoint( int point ); | 77 | void setPoint( int point ); |
@@ -70,2 +81,5 @@ public: | |||
70 | 81 | ||
82 | void displayMenu(); | ||
83 | void dealWithMenuSelection(); | ||
84 | |||
71 | void keyPressEvent( QKeyEvent *e ); | 85 | void keyPressEvent( QKeyEvent *e ); |