summaryrefslogtreecommitdiff
authorandyq <andyq>2002-12-11 17:48:40 (UTC)
committer andyq <andyq>2002-12-11 17:48:40 (UTC)
commit483e550c75f935706fde4e0ca29c4486aeca09a0 (patch) (side-by-side diff)
tree6312a2b87905296622cd7464bd0e286924eefaf9
parentd3d49c3022d763157a3c8309ddc5b9ce4ecde61a (diff)
downloadopie-483e550c75f935706fde4e0ca29c4486aeca09a0.zip
opie-483e550c75f935706fde4e0ca29c4486aeca09a0.tar.gz
opie-483e550c75f935706fde4e0ca29c4486aeca09a0.tar.bz2
Added new methods and members for replay loading and saving
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/sfcave/sfcave.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/games/sfcave/sfcave.h b/noncore/games/sfcave/sfcave.h
index 0d9a626..238a615 100644
--- a/noncore/games/sfcave/sfcave.h
+++ b/noncore/games/sfcave/sfcave.h
@@ -1,118 +1,121 @@
#include <qmainwindow.h>
#include <qpainter.h>
#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
class SFCave : public QMainWindow
{
Q_OBJECT
public:
int sWidth;
int sHeight;
int segSize;
int currentSeed;
QList<int> replayList;
QListIterator<int> *replayIt;
bool replay;
+ QString replayFile;
int blockWidth;
int blockHeight;
int gapHeight;
int state;
int prevState;
int speed;
int crashLineLength;
static double UpThrustVals[3][3];
static double DownThrustVals[3][3];
static double MaxUpThrustVals[3][3];
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];
int currentMenuNr;
static int nrMenuOptions[2];
static int currentMenuOption[2];
static QString dificultyOption[3];
static QString gameTypes[3];
int currentGameType;
int currentGameDifficulty;
QPixmap *offscreen;
QTimer *gameTimer;
int score;
int highestScore[3][3];
int mapTop[MAPSIZE];
int mapBottom[MAPSIZE];
QRect blocks[BLOCKSIZE];
QRect user;
QPoint trail[TRAILSIZE];
int offset;
int maxHeight;
int nrFrames;
int dir;
bool showScoreZones;
bool press;
double thrust;
bool running;
SFCave( int speed = 3, QWidget *p = 0, char *name = 0 );
~SFCave();
void start();
void setSeed( int seed );
int nextInt( int range );
void setUp();
void handleGameSFCave();
void handleGameGates();
void handleGameFly();
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 displayMenu();
void dealWithMenuSelection();
void keyPressEvent( QKeyEvent *e );
void keyReleaseEvent( QKeyEvent *e );
void saveScore();
+ void saveReplay();
+ void loadReplay();
private slots:
void run();
};