summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave/sfcave.h
Side-by-side diff
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
@@ -3,25 +3,26 @@
#include <qpixmap.h>
#include <qpoint.h>
#include <qrect.h>
#include <qtimer.h>
#include <qlist.h>
#include "random.h"
#define MAPSIZE 52
#define BLOCKSIZE 6
#define TRAILSIZE 30
-
+#define NR_MENUS 3
+#define MAX_MENU_OPTIONS 8
class SFCave : public QMainWindow
{
Q_OBJECT
public:
int sWidth;
int sHeight;
int segSize;
int currentSeed;
@@ -44,28 +45,28 @@ public:
static double MaxDownThrustVals[3][3];
static int initialGateGaps[];
double thrustUp;
double noThrust;
double maxUpThrust;
double maxDownThrust;
int gateDistance;
int nextGate;
int lastGateBottomY;
- static QString menuOptions[2][5];
+ static QString menuOptions[NR_MENUS][MAX_MENU_OPTIONS];
int currentMenuNr;
- static int nrMenuOptions[2];
- static int currentMenuOption[2];
+ static int nrMenuOptions[NR_MENUS];
+ static int currentMenuOption[NR_MENUS];
static QString dificultyOption[3];
static QString gameTypes[3];
int currentGameType;
int currentGameDifficulty;
QPixmap *offscreen;
QTimer *gameTimer;
int score;
int highestScore[3][3];
@@ -98,24 +99,25 @@ public:
bool checkFlyGameCollision();
void moveFlyGameLandscape();
void setFlyPoint( int point );
bool checkCollision();
void moveLandscape();
void addBlock();
void addGate();
void setPoint( int point );
void drawBoss();
void draw();
void handleKeys();
+ void handleMenuKeys( QKeyEvent * e );
void displayMenu();
void dealWithMenuSelection();
void keyPressEvent( QKeyEvent *e );
void keyReleaseEvent( QKeyEvent *e );
void saveScore();
void saveReplay();
void loadReplay();
private slots:
void run();
};