author | andyq <andyq> | 2002-12-07 00:30:30 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-12-07 00:30:30 (UTC) |
commit | ad2a10877ae6e50b1a765a9b7cff14494c65e588 (patch) (side-by-side diff) | |
tree | 261d3461be9861235dff59e908dc650fe98cb346 /noncore/games/sfcave/sfcave.h | |
parent | 22b6762b871b64825e1f8e974636c2d27fef8486 (diff) | |
download | opie-ad2a10877ae6e50b1a765a9b7cff14494c65e588.zip opie-ad2a10877ae6e50b1a765a9b7cff14494c65e588.tar.gz opie-ad2a10877ae6e50b1a765a9b7cff14494c65e588.tar.bz2 |
Upgraded to v1.7 - new menu system, new game types (gates (implemented and working) and fly (not implemented yet)). Also, high scores are persistent and different across game types - not difficultiy yet. Game Difficulty levels added but not yet implemented
Diffstat (limited to 'noncore/games/sfcave/sfcave.h') (more/less context) (ignore whitespace changes)
-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 @@ -9,13 +9,8 @@ #define MAPSIZE 52 -#define BLOCKSIZE 5 +#define BLOCKSIZE 6 #define TRAILSIZE 30 -#define STATE_BOSS 0 -#define STATE_RUNNING 1 -#define STATE_CRASHED 2 -#define STATE_NEWGAME 3 - -class Main : public QMainWindow +class SFCave : public QMainWindow { Q_OBJECT @@ -28,4 +23,5 @@ public: int blockWidth; int blockHeight; + int gapHeight; int state; int prevState; @@ -33,15 +29,29 @@ public: int crashLineLength; + int gateDistance; + int nextGate; + int lastGateBottomY; + + static QString menuOptions[2][5]; + int currentMenuNr; + int nrMenuOptions[2]; + int currentMenuOption[2]; + + static QString dificultyOption[3]; + static QString gameTypes[3]; + int currentGameType; + int currentGameDifficulty; + QPixmap *offscreen; QTimer *gameTimer; int score; - int highestScore; + int highestScore[3]; - int mapTop[52]; - int mapBottom[52]; - QRect blocks[5]; + int mapTop[MAPSIZE]; + int mapBottom[MAPSIZE]; + QRect blocks[BLOCKSIZE]; QRect user; - QPoint trail[30]; + QPoint trail[TRAILSIZE]; int offset; @@ -56,6 +66,6 @@ public: bool running; - Main( int speed = 3, QWidget *p = 0, char *name = 0 ); - ~Main(); + SFCave( int speed = 3, QWidget *p = 0, char *name = 0 ); + ~SFCave(); void start(); int nextInt( int range ); @@ -64,4 +74,5 @@ public: void moveLandscape(); void addBlock(); + void addGate(); void setPoint( int point ); void drawBoss(); @@ -69,4 +80,7 @@ public: void handleKeys(); + void displayMenu(); + void dealWithMenuSelection(); + void keyPressEvent( QKeyEvent *e ); void keyReleaseEvent( QKeyEvent *e ); |