summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave/sfcave.h
authorandyq <andyq>2002-12-13 15:03:41 (UTC)
committer andyq <andyq>2002-12-13 15:03:41 (UTC)
commit28a78f938ae995fbc29f76afa84b1bee62178a79 (patch) (unidiff)
tree47fdf14787de5748acafb151a63222b726a42a20 /noncore/games/sfcave/sfcave.h
parent18c7cd23a85562cd23a4161e1006138e602a0be7 (diff)
downloadopie-28a78f938ae995fbc29f76afa84b1bee62178a79.zip
opie-28a78f938ae995fbc29f76afa84b1bee62178a79.tar.gz
opie-28a78f938ae995fbc29f76afa84b1bee62178a79.tar.bz2
Cleanup up some code, replays now know what game they were saved for, moved
the replay stuff into its own menu, and allowed the menus to have3 more items each.
Diffstat (limited to 'noncore/games/sfcave/sfcave.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/sfcave/sfcave.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/noncore/games/sfcave/sfcave.h b/noncore/games/sfcave/sfcave.h
index 238a615..65e5ae4 100644
--- a/noncore/games/sfcave/sfcave.h
+++ b/noncore/games/sfcave/sfcave.h
@@ -9,13 +9,14 @@
9#include "random.h" 9#include "random.h"
10 10
11#define MAPSIZE 52 11#define MAPSIZE 52
12#define BLOCKSIZE 6 12#define BLOCKSIZE 6
13#define TRAILSIZE 30 13#define TRAILSIZE 30
14 14
15 15#define NR_MENUS 3
16#define MAX_MENU_OPTIONS 8
16 17
17class SFCave : public QMainWindow 18class SFCave : public QMainWindow
18{ 19{
19Q_OBJECT 20Q_OBJECT
20 21
21public: 22public:
@@ -50,16 +51,16 @@ public:
50 double maxDownThrust; 51 double maxDownThrust;
51 52
52 int gateDistance; 53 int gateDistance;
53 int nextGate; 54 int nextGate;
54 int lastGateBottomY; 55 int lastGateBottomY;
55 56
56 static QString menuOptions[2][5]; 57 static QString menuOptions[NR_MENUS][MAX_MENU_OPTIONS];
57 int currentMenuNr; 58 int currentMenuNr;
58 static int nrMenuOptions[2]; 59 static int nrMenuOptions[NR_MENUS];
59 static int currentMenuOption[2]; 60 static int currentMenuOption[NR_MENUS];
60 61
61 static QString dificultyOption[3]; 62 static QString dificultyOption[3];
62 static QString gameTypes[3]; 63 static QString gameTypes[3];
63 int currentGameType; 64 int currentGameType;
64 int currentGameDifficulty; 65 int currentGameDifficulty;
65 66
@@ -104,12 +105,13 @@ public:
104 void addGate(); 105 void addGate();
105 void setPoint( int point ); 106 void setPoint( int point );
106 void drawBoss(); 107 void drawBoss();
107 void draw(); 108 void draw();
108 void handleKeys(); 109 void handleKeys();
109 110
111 void handleMenuKeys( QKeyEvent * e );
110 void displayMenu(); 112 void displayMenu();
111 void dealWithMenuSelection(); 113 void dealWithMenuSelection();
112 114
113 void keyPressEvent( QKeyEvent *e ); 115 void keyPressEvent( QKeyEvent *e );
114 void keyReleaseEvent( QKeyEvent *e ); 116 void keyReleaseEvent( QKeyEvent *e );
115 void saveScore(); 117 void saveScore();