Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SFCave Class Reference

#include </home/clem/local/src/opie/noncore/games/sfcave/sfcave.h>

Collaboration diagram for SFCave:

Collaboration graph
[legend]
List of all members.

Public Slots

void start ()

Public Member Functions

 SFCave (QWidget *p=0, const char *name=0, WFlags fl=0)
 ~SFCave ()
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 handleMenuKeys (QKeyEvent *e)
void displayMenu ()
void dealWithMenuSelection ()
void keyPressEvent (QKeyEvent *e)
void keyReleaseEvent (QKeyEvent *e)
void saveScore ()
void saveReplay ()
void loadReplay ()
 SFCave (int argc, char *argv[])
 ~SFCave ()
void initSDL (int argc, char *argv[])
void mainEventLoop ()
void setCrashed (bool val)
void changeState (int s)
int getState ()
GamegetCurrentGame ()
int getFPS ()
bool showFPS ()
void setMenuStatusText (string statusText)
void saveSetting (string key, string val)
void saveSetting (string key, int val)
void saveSetting (string key, long val)
void saveSetting (string key, double val)
string loadSetting (string key, string defaultVal="")
bool loadBoolSetting (string key, bool defaultVal)
int loadIntSetting (string key, int defaultVal)
double loadDoubleSetting (string key, double defaultVal)

Static Public Member Functions

static QString appName ()

Public Attributes

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
bool startScoring
bool showEyeCandy
int * flyScores
double thrustUp
double noThrust
double maxUpThrust
double maxDownThrust
int gateDistance
int nextGate
int lastGateBottomY
int currentMenuNr
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

Static Public Attributes

static double UpThrustVals [3][3]
static double DownThrustVals [3][3]
static double MaxUpThrustVals [3][3]
static double MaxDownThrustVals [3][3]
static int initialGateGaps [] = { 75, 50, 25 }
static int flyEasyScores [7][3]
static int flyNormalScores [7][3]
static int flyHardScores [7][3]
static QString menuOptions [NR_MENUS][MAX_MENU_OPTIONS]
static int nrMenuOptions [NR_MENUS] = { 5, 4, 4 }
static int currentMenuOption [NR_MENUS] = { 0, 0, 0 }
static QString dificultyOption [3] = { EASY, NORMAL, HARD }
static QString gameTypes [3] = { SFCAVE_GAME, GATES_GAME, FLY_GAME }

Private Slots

void run ()

Private Member Functions

void handleMenuSelect (int menuId)
void handleGameState ()
void handleEvents ()
void calcFPS ()
void FPSDelay ()

Private Attributes

SDL_Surface * screen
bool setupOK
GamecurrentGame
Menumenu
Helphelp
bool showFps
string musicPath
string musicType
bool finish
bool limitFPS
int maxFPS
int actualFPS
int FPS
long time1
long start
long end
int customPlayerMenuVal
double origValue

Constructor & Destructor Documentation

SFCave::SFCave QWidget *  p = 0,
const char *  name = 0,
WFlags  fl = 0
 

Definition at line 136 of file sfcave.cpp.

References Global::applicationFileName(), Qt::black, CAPTION, height, i, MAPSIZE, movel, Config::readNumEntry(), Config::setGroup(), showMaximized, start, STATE_MENU, and width.

SFCave::~SFCave  ) 
 

Definition at line 193 of file sfcave.cpp.

SFCave::SFCave int  argc,
char *  argv[]
 

Definition at line 44 of file sfcave.cpp.

References Game::createGame(), currentGame, diff(), game, HEIGHT, help, FontHandler::init(), initSDL(), loadBoolSetting(), loadSetting(), maxFPS, musicPath, musicType, printf, SoundHandler::setMusicOn(), Game::setSeed(), SoundHandler::setSoundsOn(), setupOK, showFps, SOUND_PATH, Opie::Internal::string(), and WIDTH.

SFCave::~SFCave  ) 
 


Member Function Documentation

void SFCave::addBlock  ) 
 

Definition at line 577 of file sfcave.cpp.

References blockHeight, blocks, BLOCKSIZE, blockWidth, i, mapBottom, mapTop, nextInt(), sWidth, Opie::MM::x, and Opie::MM::y.

Referenced by handleGameSFCave().

void SFCave::addGate  ) 
 

Definition at line 594 of file sfcave.cpp.

References blocks, BLOCKSIZE, blockWidth, gapHeight, i, lastGateBottomY, mapBottom, mapTop, nextInt(), sWidth, and Opie::MM::y.

Referenced by handleGameGates().

static QString SFCave::appName  )  [inline, static]
 

Definition at line 101 of file sfcave.h.

References QString::fromLatin1().

void SFCave::calcFPS  )  [private]
 

Definition at line 601 of file sfcave.cpp.

References actualFPS, FPS, start(), and time1.

Referenced by mainEventLoop().

void SFCave::changeState int  s  ) 
 

Definition at line 331 of file sfcave.cpp.

References chooseRandomFile(), currentGame, help, INGAME_MUSIC, Help::init(), musicPath, musicType, SoundHandler::playMusic(), SoundHandler::setMusicVolume(), state, STATE_CRASHED, STATE_HELP, STATE_MENU, STATE_NEWGAME, STATE_REPLAY, Game::stateChanged(), SoundHandler::stopMusic(), and Opie::Internal::string().

Referenced by handleEvents(), handleGameState(), Help::handleKeys(), handleMenuSelect(), mainEventLoop(), SFCaveGame::update(), GatesGame::update(), FlyGame::update(), and Game::update().

bool SFCave::checkCollision  ) 
 

Definition at line 533 of file sfcave.cpp.

References blocks, BLOCKSIZE, i, mapBottom, mapTop, user, and Opie::MM::y.

Referenced by handleGameGates(), and handleGameSFCave().

bool SFCave::checkFlyGameCollision  ) 
 

Definition at line 486 of file sfcave.cpp.

References mapBottom, and user.

Referenced by handleGameFly().

void SFCave::dealWithMenuSelection  ) 
 

Definition at line 1117 of file sfcave.cpp.

References currentGameDifficulty, currentGameType, currentMenuNr, currentMenuOption, currentSeed, highestScore, i, loadReplay(), MENU_BACK, MENU_CLEAR_HIGHSCORES, MENU_GAME_DIFFICULTY, MENU_GAME_TYPE, MENU_HELP, MENU_MAIN_MENU, MENU_OPTIONS, MENU_OPTIONS_MENU, MENU_QUIT, MENU_REPLAY, MENU_REPLAY_BACK, MENU_REPLAY_LOAD, MENU_REPLAY_MENU, MENU_REPLAY_SAVE, MENU_REPLAY_START, MENU_START_GAME, saveReplay(), Config::setGroup(), QPEApplication::showWidget(), state, STATE_NEWGAME, STATE_REPLAY, and Config::writeEntry().

Referenced by handleMenuKeys().

void SFCave::displayMenu  ) 
 

Definition at line 1069 of file sfcave.cpp.

References bitBlt(), Qt::black, Qt::CopyROP, currentGameDifficulty, currentGameType, currentMenuNr, currentMenuOption, dificultyOption, f, gameTypes, i, MENU_GAME_TYPE, menuOptions, offscreen, p, pos, sHeight, QString::sprintf(), sWidth, text, val, Qt::white, and Qt::yellow.

Referenced by run().

void SFCave::draw  ) 
 

Definition at line 653 of file sfcave.cpp.

References bitBlt(), Qt::black, blocks, BLOCKSIZE, Qt::blue, Qt::CopyROP, crashLineLength, CURRENT_GAME_TYPE, currentGameDifficulty, currentGameType, FLY_GAME, FLYSCORES, highestScore, i, M_PI, mapBottom, MAPSIZE, mapTop, nextInt(), offscreen, offset, p, Qt::red, s, score, segSize, sHeight, showEyeCandy, showScoreZones, speed, QString::sprintf(), state, STATE_CRASHED, STATE_CRASHING, sWidth, text, trail, TRAILSIZE, user, Qt::white, Opie::MM::x, and Opie::MM::y.

Referenced by run().

void SFCave::drawBoss  ) 
 

Definition at line 646 of file sfcave.cpp.

References bitBlt(), Qt::black, Qt::CopyROP, offscreen, sHeight, and sWidth.

Referenced by run().

void SFCave::FPSDelay  )  [private]
 

Definition at line 616 of file sfcave.cpp.

References abs, end, maxFPS, printf, and start().

Referenced by mainEventLoop().

Game* SFCave::getCurrentGame  )  [inline]
 

Definition at line 24 of file sfcave.h.

References currentGame.

int SFCave::getFPS  )  [inline]
 

Definition at line 25 of file sfcave.h.

References actualFPS.

Referenced by Game::draw().

int SFCave::getState  )  [inline]
 

Definition at line 23 of file sfcave.h.

References state.

Referenced by SFCaveGame::draw(), GatesGame::draw(), and Game::draw().

void SFCave::handleEvents  )  [private]
 

Definition at line 248 of file sfcave.cpp.

References changeState(), currentGame, finish, Game::handleKeys(), Help::handleKeys(), handleMenuSelect(), help, limitFPS, SoundHandler::playSound(), rc, showFps, SND_EXPLOSION, state, STATE_CRASHED, STATE_HELP, STATE_MENU, STATE_NEWGAME, and STATE_REPLAY.

Referenced by mainEventLoop().

void SFCave::handleGameFly  ) 
 

Definition at line 442 of file sfcave.cpp.

References checkFlyGameCollision(), currentGameDifficulty, currentGameType, diff(), FLYSCORES, highestScore, i, mapBottom, moveFlyGameLandscape(), nrFrames, saveScore(), score, startScoring, state, STATE_CRASHING, and user.

Referenced by run().

void SFCave::handleGameGates  ) 
 

Definition at line 407 of file sfcave.cpp.

References addGate(), checkCollision(), currentGameDifficulty, currentGameType, gapHeight, gateDistance, highestScore, moveLandscape(), nextGate, nextInt(), nrFrames, saveScore(), score, state, and STATE_CRASHING.

Referenced by run().

void SFCave::handleGameSFCave  ) 
 

Definition at line 369 of file sfcave.cpp.

References addBlock(), blockHeight, checkCollision(), currentGameDifficulty, currentGameType, gateDistance, highestScore, maxHeight, moveLandscape(), nrFrames, saveScore(), score, sHeight, state, and STATE_CRASHING.

Referenced by run().

void SFCave::handleGameState  )  [private]
 

Definition at line 210 of file sfcave.cpp.

References changeState(), currentGame, Game::draw(), Help::draw(), finish, help, Game::init(), screen, Game::setReplay(), state, STATE_CRASHED, STATE_CRASHING, STATE_HELP, STATE_MENU, STATE_NEWGAME, STATE_PLAYING, STATE_QUIT, STATE_REPLAY, Game::update(), and Help::update().

Referenced by mainEventLoop().

void SFCave::handleKeys  ) 
 

Definition at line 760 of file sfcave.cpp.

References i, maxDownThrust, maxUpThrust, noThrust, press, speed, thrust, thrustUp, trail, TRAILSIZE, user, and Opie::MM::x.

Referenced by run().

void SFCave::handleMenuKeys QKeyEvent *  e  ) 
 

Definition at line 1010 of file sfcave.cpp.

References currentGameDifficulty, currentGameType, currentMenuNr, currentMenuOption, dealWithMenuSelection(), Qt::Key_Down, Qt::Key_Enter, Qt::Key_Left, Qt::Key_Return, Qt::Key_Right, Qt::Key_Space, Qt::Key_Up, MENU_GAME_DIFFICULTY, MENU_GAME_TYPE, MENU_OPTIONS_MENU, menuOptions, NR_GAME_DIFFICULTIES, NR_GAME_TYPES, and nrMenuOptions.

Referenced by keyPressEvent().

void SFCave::handleMenuSelect int  menuId  )  [private]
 

Definition at line 360 of file sfcave.cpp.

References changeState(), currentGame, customPlayerMenuVal, diff(), Game::getDifficulty(), Game::getGameName(), getHomeDir(), Game::getPlayer(), HEIGHT, Game::isReplayAvailable(), Game::loadReplay(), MENU_CLEAR_SCORES, MENU_CUSTOM_CANCEL, MENU_CUSTOM_DECREASE, MENU_CUSTOM_GRAVITY, MENU_CUSTOM_INCREASE, MENU_CUSTOM_MAXSPEEDDOWN, MENU_CUSTOM_MAXSPEEDUP, MENU_CUSTOM_SAVE, MENU_CUSTOM_THRUST, MENU_DIFFICULTY_CUSTOM, MENU_DIFFICULTY_EASY, MENU_DIFFICULTY_HARD, MENU_DIFFICULTY_NORMAL, MENU_GAME_FLY, MENU_GAME_GATES, MENU_GAME_SFCAVE, MENU_HELP, MENU_LOAD_REPLAY, MENU_MUSIC_OFF, MENU_MUSIC_ON, MENU_PLAY_REPLAY, MENU_QUIT, MENU_SAVE_REPLAY, MENU_SOUND_OFF, MENU_SOUND_ON, MENU_STARTGAME, origValue, PLAYER_GRAVITY, PLAYER_MAX_SPEED_DOWN, PLAYER_MAX_SPEED_UP, PLAYER_THRUST, replayFile, Game::saveReplay(), saveSetting(), Game::setDifficulty(), setMenuStatusText(), SoundHandler::setMusicOn(), SoundHandler::setSoundsOn(), STATE_HELP, STATE_NEWGAME, STATE_QUIT, STATE_REPLAY, Opie::Internal::string(), and WIDTH.

Referenced by handleEvents().

void SFCave::initSDL int  argc,
char *  argv[]
 

Definition at line 112 of file sfcave.cpp.

References HEIGHT, NULL, printf, screen, and WIDTH.

Referenced by SFCave().

void SFCave::keyPressEvent QKeyEvent *  e  ) 
 

Definition at line 808 of file sfcave.cpp.

References currentMenuNr, currentMenuOption, handleMenuKeys(), Qt::Key_Enter, Qt::Key_F9, Qt::Key_M, Qt::Key_Return, Qt::Key_Space, Qt::Key_Up, Qt::Key_Z, nrFrames, press, replay, replayList, showScoreZones, state, STATE_CRASHED, STATE_MENU, STATE_NEWGAME, and STATE_RUNNING.

void SFCave::keyReleaseEvent QKeyEvent *  e  ) 
 

Definition at line 856 of file sfcave.cpp.

References Qt::Key_Down, Qt::Key_E, Qt::Key_F9, Qt::Key_L, Qt::Key_R, Qt::Key_S, Qt::Key_Space, Qt::Key_Up, loadReplay(), nrFrames, press, replay, replayList, saveReplay(), showEyeCandy, state, STATE_CRASHED, STATE_MENU, STATE_NEWGAME, STATE_REPLAY, and STATE_RUNNING.

bool SFCave::loadBoolSetting string  key,
bool  defaultVal
 

Definition at line 573 of file sfcave.cpp.

References Settings::readSetting(), and val.

Referenced by SFCave().

double SFCave::loadDoubleSetting string  key,
double  defaultVal
 

Definition at line 591 of file sfcave.cpp.

References Settings::readSetting(), and val.

Referenced by SFCaveGame::init(), GatesGame::init(), and FlyGame::init().

int SFCave::loadIntSetting string  key,
int  defaultVal
 

Definition at line 582 of file sfcave.cpp.

References Settings::readSetting(), and val.

Referenced by SFCaveGame::init(), and GatesGame::init().

void SFCave::loadReplay  ) 
 

Definition at line 961 of file sfcave.cpp.

References QValueList< T >::begin(), currentGameDifficulty, currentGameType, currentSeed, data, QFile::encodeName(), QValueList< T >::end(), in, list, printf, replayFile, replayList, QStringList::split(), and v.

Referenced by dealWithMenuSelection(), and keyReleaseEvent().

string SFCave::loadSetting string  key,
string  defaultVal = ""
 

Definition at line 561 of file sfcave.cpp.

References Settings::readSetting(), Opie::Internal::string(), and val.

Referenced by Game::init(), and SFCave().

void SFCave::mainEventLoop  ) 
 

Definition at line 173 of file sfcave.cpp.

References actualFPS, calcFPS(), changeState(), finish, FPS, FPSDelay(), handleEvents(), handleGameState(), limitFPS, screen, setupOK, state, STATE_CRASHED, STATE_MENU, and time1.

Referenced by start().

void SFCave::moveFlyGameLandscape  ) 
 

Definition at line 494 of file sfcave.cpp.

References i, mapBottom, MAPSIZE, offset, segSize, setFlyPoint(), and speed.

Referenced by handleGameFly().

void SFCave::moveLandscape  ) 
 

Definition at line 549 of file sfcave.cpp.

References blocks, BLOCKSIZE, i, mapBottom, MAPSIZE, mapTop, offset, segSize, setPoint(), speed, width, Opie::MM::x, and Opie::MM::y.

Referenced by handleGameGates(), and handleGameSFCave().

int SFCave::nextInt int  range  ) 
 

Definition at line 212 of file sfcave.cpp.

References Random(), and val.

Referenced by addBlock(), addGate(), draw(), handleGameGates(), setFlyPoint(), setPoint(), and setUp().

void SFCave::run  )  [private, slot]
 

Definition at line 304 of file sfcave.cpp.

References CURRENT_GAME_TYPE, currentSeed, displayMenu(), draw(), drawBoss(), FLY_GAME, GATES_GAME, handleGameFly(), handleGameGates(), handleGameSFCave(), handleKeys(), nrFrames, press, replay, replayIt, replayList, setSeed(), setUp(), SFCAVE_GAME, state, STATE_BOSS, STATE_CRASHED, STATE_CRASHING, STATE_MENU, STATE_NEWGAME, STATE_REPLAY, and STATE_RUNNING.

void SFCave::saveReplay  ) 
 

Definition at line 923 of file sfcave.cpp.

References currentGameDifficulty, currentSeed, data, QFile::encodeName(), QString::length(), out, printf, replayFile, replayList, QString::sprintf(), and val.

Referenced by dealWithMenuSelection(), and keyReleaseEvent().

void SFCave::saveScore  ) 
 

Definition at line 910 of file sfcave.cpp.

References CURRENT_GAME_TYPE, currentGameDifficulty, currentGameType, dificultyOption, gameTypes, highestScore, Config::setGroup(), and Config::writeEntry().

Referenced by handleGameFly(), handleGameGates(), and handleGameSFCave().

void SFCave::saveSetting string  key,
double  val
 

Definition at line 555 of file sfcave.cpp.

References Settings::writeSetting().

void SFCave::saveSetting string  key,
long  val
 

Definition at line 549 of file sfcave.cpp.

References Settings::writeSetting().

void SFCave::saveSetting string  key,
int  val
 

Definition at line 543 of file sfcave.cpp.

References Settings::writeSetting().

void SFCave::saveSetting string  key,
string  val
 

Definition at line 537 of file sfcave.cpp.

References Settings::writeSetting().

Referenced by handleMenuSelect(), and Game::stateChanged().

void SFCave::setCrashed bool  val  ) 
 

void SFCave::setFlyPoint int  point  ) 
 

Definition at line 509 of file sfcave.cpp.

References currentGameDifficulty, dir, mapBottom, maxHeight, nextInt(), and sHeight.

Referenced by moveFlyGameLandscape().

void SFCave::setMenuStatusText string  statusText  ) 
 

Definition at line 531 of file sfcave.cpp.

Referenced by handleMenuSelect(), Game::loadReplay(), and Game::saveReplay().

void SFCave::setPoint int  point  ) 
 

Definition at line 625 of file sfcave.cpp.

References dir, mapBottom, mapTop, maxHeight, nextInt(), and sHeight.

Referenced by moveLandscape(), and setUp().

void SFCave::setSeed int  seed  ) 
 

Definition at line 203 of file sfcave.cpp.

References currentSeed, NULL, and PutSeed().

Referenced by run().

void SFCave::setUp  ) 
 

Definition at line 220 of file sfcave.cpp.

References blockHeight, blocks, BLOCKSIZE, blockWidth, crashLineLength, CURRENT_GAME_TYPE, currentGameDifficulty, DIFICULTY_EASY, DIFICULTY_NORMAL, dir, DownThrustVals, FLY_GAME, FLY_GAME_TYPE, flyEasyScores, flyHardScores, flyNormalScores, flyScores, gapHeight, gateDistance, GATES_GAME, GATES_GAME_TYPE, i, initialGateGaps, lastGateBottomY, mapBottom, MAPSIZE, mapTop, maxDownThrust, MaxDownThrustVals, maxHeight, maxUpThrust, MaxUpThrustVals, nextGate, nextInt(), noThrust, nrFrames, offset, press, score, setPoint(), SFCAVE_GAME, SFCAVE_GAME_TYPE, sHeight, startScoring, sWidth, thrust, thrustUp, trail, TRAILSIZE, UpThrustVals, and user.

Referenced by run().

bool SFCave::showFPS  )  [inline]
 

Definition at line 26 of file sfcave.h.

References showFps.

Referenced by Game::draw().

void SFCave::start  )  [slot]
 

Referenced by calcFPS(), and FPSDelay().


Member Data Documentation

int SFCave::actualFPS [private]
 

Definition at line 54 of file sfcave.h.

Referenced by calcFPS(), getFPS(), and mainEventLoop().

int SFCave::blockHeight
 

Definition at line 35 of file sfcave.h.

Referenced by addBlock(), handleGameSFCave(), and setUp().

QRect SFCave::blocks[BLOCKSIZE]
 

Definition at line 83 of file sfcave.h.

Referenced by addBlock(), addGate(), checkCollision(), draw(), moveLandscape(), and setUp().

int SFCave::blockWidth
 

Definition at line 34 of file sfcave.h.

Referenced by addBlock(), addGate(), and setUp().

int SFCave::crashLineLength
 

Definition at line 40 of file sfcave.h.

Referenced by draw(), and setUp().

Game* SFCave::currentGame [private]
 

Definition at line 43 of file sfcave.h.

Referenced by changeState(), getCurrentGame(), handleEvents(), handleGameState(), handleMenuSelect(), and SFCave().

int SFCave::currentGameDifficulty
 

Definition at line 73 of file sfcave.h.

Referenced by dealWithMenuSelection(), displayMenu(), draw(), handleGameFly(), handleGameGates(), handleGameSFCave(), handleMenuKeys(), loadReplay(), saveReplay(), saveScore(), setFlyPoint(), and setUp().

int SFCave::currentGameType
 

Definition at line 72 of file sfcave.h.

Referenced by dealWithMenuSelection(), displayMenu(), draw(), handleGameFly(), handleGameGates(), handleGameSFCave(), handleMenuKeys(), loadReplay(), and saveScore().

int SFCave::currentMenuNr
 

Definition at line 66 of file sfcave.h.

Referenced by dealWithMenuSelection(), displayMenu(), handleMenuKeys(), and keyPressEvent().

int SFCave::currentMenuOption = { 0, 0, 0 } [static]
 

Definition at line 84 of file sfcave.cpp.

Referenced by dealWithMenuSelection(), displayMenu(), handleMenuKeys(), and keyPressEvent().

int SFCave::currentSeed
 

Definition at line 27 of file sfcave.h.

Referenced by dealWithMenuSelection(), loadReplay(), run(), saveReplay(), and setSeed().

int SFCave::customPlayerMenuVal [private]
 

Definition at line 62 of file sfcave.h.

Referenced by handleMenuSelect().

QString SFCave::dificultyOption = { EASY, NORMAL, HARD } [static]
 

Definition at line 76 of file sfcave.cpp.

Referenced by displayMenu(), and saveScore().

int SFCave::dir
 

Definition at line 90 of file sfcave.h.

Referenced by setFlyPoint(), setPoint(), and setUp().

double SFCave::DownThrustVals [static]
 

Initial value:

 {{ 0.8,   0.8, 0.8 },     
                                                   { 0.8,   0.8, 1.0 },     
                                                   { 0.4,   0.7, 1.0 } }

Definition at line 94 of file sfcave.cpp.

Referenced by setUp().

long SFCave::end [private]
 

Definition at line 58 of file sfcave.h.

Referenced by FPSDelay().

bool SFCave::finish [private]
 

Definition at line 50 of file sfcave.h.

Referenced by handleEvents(), handleGameState(), and mainEventLoop().

int SFCave::flyEasyScores [static]
 

Initial value:

 { { 0, 10, 5 },
                                   { 10, 20, 3 },
                                   { 20, 30, 2 },
                                   { 30, 40, 1 },
                                   { 50, 70, -2 },
                                   { 70, 300, -5 },
                                   { -1, -1, -1 } }

Definition at line 106 of file sfcave.cpp.

Referenced by setUp().

int SFCave::flyHardScores [static]
 

Initial value:

 { { 0, 20, 5 },
                                   { 20, 40, 3 },
                                   { 40, 100, 1 },
                                   { 100, 150, -2 },
                                   { 150, 300, -5 },
                                   { -1, -1, -1 } }

Definition at line 120 of file sfcave.cpp.

Referenced by setUp().

int SFCave::flyNormalScores [static]
 

Initial value:

 { { 0, 10, 5 },
                                     { 10, 20, 3 },
                                     { 20, 30, 2 },
                                     { 30, 40, 1 },
                                     { 50, 70, -2 },
                                     { 70, 300, -5 },
                                     { -1, -1, -1 } }

Definition at line 113 of file sfcave.cpp.

Referenced by setUp().

int* SFCave::flyScores
 

Definition at line 53 of file sfcave.h.

Referenced by setUp().

int SFCave::FPS [private]
 

Definition at line 55 of file sfcave.h.

Referenced by calcFPS(), and mainEventLoop().

QTimer* SFCave::gameTimer
 

Definition at line 76 of file sfcave.h.

QString SFCave::gameTypes = { SFCAVE_GAME, GATES_GAME, FLY_GAME } [static]
 

Definition at line 77 of file sfcave.cpp.

Referenced by displayMenu(), and saveScore().

int SFCave::gapHeight
 

Definition at line 36 of file sfcave.h.

Referenced by addGate(), handleGameGates(), and setUp().

int SFCave::gateDistance
 

Definition at line 61 of file sfcave.h.

Referenced by handleGameGates(), handleGameSFCave(), and setUp().

Help* SFCave::help [private]
 

Definition at line 45 of file sfcave.h.

Referenced by changeState(), handleEvents(), handleGameState(), and SFCave().

int SFCave::highestScore[3][3]
 

Definition at line 79 of file sfcave.h.

Referenced by dealWithMenuSelection(), draw(), handleGameFly(), handleGameGates(), handleGameSFCave(), and saveScore().

int SFCave::initialGateGaps = { 75, 50, 25 } [static]
 

Definition at line 127 of file sfcave.cpp.

Referenced by setUp().

int SFCave::lastGateBottomY
 

Definition at line 63 of file sfcave.h.

Referenced by addGate(), and setUp().

bool SFCave::limitFPS [private]
 

Definition at line 52 of file sfcave.h.

Referenced by handleEvents(), and mainEventLoop().

int SFCave::mapBottom[MAPSIZE]
 

Definition at line 82 of file sfcave.h.

Referenced by addBlock(), addGate(), checkCollision(), checkFlyGameCollision(), draw(), handleGameFly(), moveFlyGameLandscape(), moveLandscape(), setFlyPoint(), setPoint(), and setUp().

int SFCave::mapTop[MAPSIZE]
 

Definition at line 81 of file sfcave.h.

Referenced by addBlock(), addGate(), checkCollision(), draw(), moveLandscape(), setPoint(), and setUp().

double SFCave::maxDownThrust
 

Definition at line 59 of file sfcave.h.

Referenced by handleKeys(), and setUp().

double SFCave::MaxDownThrustVals [static]
 

Initial value:

 {{ 4.0,   4.0, 4.0 },     
                                                   { 4.0,   5.0, 5.5 },     
                                                   { 3.5,   4.0, 5.0 } }

Definition at line 102 of file sfcave.cpp.

Referenced by setUp().

int SFCave::maxFPS [private]
 

Definition at line 53 of file sfcave.h.

Referenced by FPSDelay(), and SFCave().

int SFCave::maxHeight
 

Definition at line 88 of file sfcave.h.

Referenced by handleGameSFCave(), setFlyPoint(), setPoint(), and setUp().

double SFCave::maxUpThrust
 

Definition at line 58 of file sfcave.h.

Referenced by handleKeys(), and setUp().

double SFCave::MaxUpThrustVals [static]
 

Initial value:

 {{ -3.5, -3.5, -3.5 },    
                                                   { -3.5, -4.0, -5.0 },    
                                                   { -3.5, -4.0, -5.0 } }

Definition at line 98 of file sfcave.cpp.

Referenced by setUp().

Menu* SFCave::menu [private]
 

Definition at line 44 of file sfcave.h.

QString SFCave::menuOptions [static]
 

Initial value:

 { { "Start Game", "Replays", "Options", "Help", "Quit", "", "", "" },
                                    { "Game Type - %s", "Game Difficulty - %s", "Clear High Scores for this game", "Back", "", "", "", "" },
                                    { "Play Reply", "Load Replay", "Save Replay", "Back", "", "", "", "" } }

Definition at line 79 of file sfcave.cpp.

Referenced by displayMenu(), and handleMenuKeys().

string SFCave::musicPath [private]
 

Definition at line 48 of file sfcave.h.

Referenced by changeState(), and SFCave().

string SFCave::musicType [private]
 

Definition at line 49 of file sfcave.h.

Referenced by changeState(), and SFCave().

int SFCave::nextGate
 

Definition at line 62 of file sfcave.h.

Referenced by handleGameGates(), and setUp().

double SFCave::noThrust
 

Definition at line 57 of file sfcave.h.

Referenced by handleKeys(), and setUp().

int SFCave::nrFrames
 

Definition at line 89 of file sfcave.h.

Referenced by handleGameFly(), handleGameGates(), handleGameSFCave(), keyPressEvent(), keyReleaseEvent(), run(), and setUp().

int SFCave::nrMenuOptions = { 5, 4, 4 } [static]
 

Definition at line 83 of file sfcave.cpp.

Referenced by handleMenuKeys().

QPixmap* SFCave::offscreen
 

Definition at line 75 of file sfcave.h.

Referenced by displayMenu(), draw(), and drawBoss().

int SFCave::offset
 

Definition at line 87 of file sfcave.h.

Referenced by draw(), moveFlyGameLandscape(), moveLandscape(), and setUp().

double SFCave::origValue [private]
 

Definition at line 63 of file sfcave.h.

Referenced by handleMenuSelect().

bool SFCave::press
 

Definition at line 94 of file sfcave.h.

Referenced by handleKeys(), keyPressEvent(), keyReleaseEvent(), run(), and setUp().

int SFCave::prevState
 

Definition at line 38 of file sfcave.h.

bool SFCave::replay
 

Definition at line 31 of file sfcave.h.

Referenced by keyPressEvent(), keyReleaseEvent(), and run().

QString SFCave::replayFile
 

Definition at line 32 of file sfcave.h.

Referenced by handleMenuSelect(), loadReplay(), and saveReplay().

QListIterator<int>* SFCave::replayIt
 

Definition at line 30 of file sfcave.h.

Referenced by run().

QList<int> SFCave::replayList
 

Definition at line 29 of file sfcave.h.

Referenced by keyPressEvent(), keyReleaseEvent(), loadReplay(), run(), and saveReplay().

bool SFCave::running
 

Definition at line 96 of file sfcave.h.

int SFCave::score
 

Definition at line 78 of file sfcave.h.

Referenced by draw(), handleGameFly(), handleGameGates(), handleGameSFCave(), and setUp().

SDL_Surface* SFCave::screen [private]
 

Definition at line 40 of file sfcave.h.

Referenced by handleGameState(), initSDL(), and mainEventLoop().

int SFCave::segSize
 

Definition at line 25 of file sfcave.h.

Referenced by draw(), moveFlyGameLandscape(), and moveLandscape().

bool SFCave::setupOK [private]
 

Definition at line 41 of file sfcave.h.

Referenced by mainEventLoop(), and SFCave().

int SFCave::sHeight
 

Definition at line 24 of file sfcave.h.

Referenced by displayMenu(), draw(), drawBoss(), handleGameSFCave(), setFlyPoint(), setPoint(), and setUp().

bool SFCave::showEyeCandy
 

Definition at line 42 of file sfcave.h.

Referenced by draw(), and keyReleaseEvent().

bool SFCave::showFps [private]
 

Definition at line 47 of file sfcave.h.

Referenced by handleEvents(), SFCave(), and showFPS().

bool SFCave::showScoreZones
 

Definition at line 92 of file sfcave.h.

Referenced by draw(), and keyPressEvent().

int SFCave::speed
 

Definition at line 39 of file sfcave.h.

Referenced by draw(), handleKeys(), moveFlyGameLandscape(), and moveLandscape().

void SFCave::start [private]
 

Definition at line 197 of file sfcave.cpp.

bool SFCave::startScoring
 

Definition at line 41 of file sfcave.h.

Referenced by handleGameFly(), and setUp().

int SFCave::state
 

Definition at line 46 of file sfcave.h.

Referenced by changeState(), dealWithMenuSelection(), draw(), getState(), handleEvents(), handleGameFly(), handleGameGates(), handleGameSFCave(), handleGameState(), keyPressEvent(), keyReleaseEvent(), mainEventLoop(), and run().

int SFCave::sWidth
 

Definition at line 20 of file sfcave.h.

Referenced by addBlock(), addGate(), displayMenu(), draw(), drawBoss(), and setUp().

double SFCave::thrust
 

Definition at line 95 of file sfcave.h.

Referenced by handleKeys(), and setUp().

double SFCave::thrustUp
 

Definition at line 56 of file sfcave.h.

Referenced by handleKeys(), and setUp().

long SFCave::time1 [private]
 

Definition at line 56 of file sfcave.h.

Referenced by calcFPS(), and mainEventLoop().

QPoint SFCave::trail[TRAILSIZE]
 

Definition at line 85 of file sfcave.h.

Referenced by draw(), handleKeys(), and setUp().

double SFCave::UpThrustVals [static]
 

Initial value:

 {{ 0.6,   0.6, 0.6 },     
                                                   { 0.6,   0.6, 0.8 },     
                                                   { 0.4,   0.7, 1.0 } }

Definition at line 90 of file sfcave.cpp.

Referenced by setUp().

QRect SFCave::user
 

Definition at line 84 of file sfcave.h.

Referenced by checkCollision(), checkFlyGameCollision(), draw(), handleGameFly(), handleKeys(), and setUp().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:51:44 2005 for OPIE by  doxygen 1.4.2