#include </home/clem/local/src/opie/noncore/games/kbill/Game.h>
Inheritance diagram for Game:


Public Member Functions | |
| int | RAND (int lb, int ub) |
| int | MAX (int x, int y) |
| int | MIN (int x, int y) |
| int | INTERSECT (int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2) |
| void | setup_level (unsigned int lev) |
| void | start (unsigned int lev) |
| void | quit () |
| void | update_info () |
| void | update_score (int action) |
| void | warp_to_level (unsigned int lev) |
| void | button_press (int x, int y) |
| void | button_release (int x, int y) |
| void | update () |
| void | main (int argc, char **argv) |
| Game (SFCave *p, int w, int h, int diff) | |
| virtual | ~Game () |
| virtual void | init () |
| virtual void | update (int state) |
| virtual void | preDraw (SDL_Surface *) |
| virtual void | draw (SDL_Surface *) |
| virtual void | stateChanged (int from, int to) |
| void | setReplay (bool val) |
| void | handleKeys (SDL_KeyboardEvent &key) |
| string | getGameName () |
| int | getDifficulty () |
| string | getGameDifficultyText () |
| void | setDifficulty (int diff) |
| void | setDifficulty (string diff) |
| long | getScore () |
| long | getHighScore () |
| void | increaseScore (long val) |
| void | clearScore () |
| bool | gotHighScore () |
| bool | isReplayAvailable () |
| Terrain * | getTerrain () |
| Player * | getPlayer () |
| void | setSeed (int seed) |
| void | loadReplay (string file) |
| void | saveReplay (string file) |
Static Public Member Functions | |
| static Game * | createGame (SFCave *p, int w, int h, string game, string difficulty) |
Public Attributes | |
| unsigned | score |
| unsigned | level |
| unsigned | iteration |
| Picture | logo |
| int | grabbed |
Static Public Attributes | |
| static const unsigned short | scrwidth = 240 |
| static const unsigned short | scrheight = 290 |
| static const int | PLAYING = 1 |
| static const int | BETWEEN = 2 |
| static const int | END = 3 |
| static const int | WAITING = 4 |
| static const int | DEFAULTC = 0 |
| static const int | DOWNC = -1 |
| static const int | BUCKETC = -2 |
| static const int | ENDGAME = 200 |
| static const int | ENTERNAME = 201 |
| static const int | HIGHSCORE = 202 |
| static const int | SCORE = 203 |
| static const int | ENDLEVEL = -1 |
| static const int | BILLPOINTS = 5 |
| static const int | EMPTY = -2 |
| static const int | BUCKET = -1 |
Protected Attributes | |
| string | gameName |
| int | thrustChannel |
| int | difficulty |
| SFCave * | parent |
| Terrain * | terrain |
| Player * | player |
| int | nrFrames |
| bool | press |
| int | sHeight |
| int | sWidth |
| long | score |
| long | highScore |
| int | currentSeed |
| list< int > | replayList |
| list< int >::iterator | replayIt |
| bool | replay |
| string | replayFile |
Private Attributes | |
| int | state |
| int | efficiency |
|
||||||||||||||||||||
|
Definition at line 21 of file game.cpp. References difficulty, parent, player, replay, replayIt, sHeight, sWidth, terrain, and thrustChannel. |
|
|
Definition at line 34 of file game.cpp. References player, replayList, and terrain. |
|
||||||||||||
|
Definition at line 80 of file Game.cc. References Monster::AT, BUCKET, BUCKETC, Computer::busy, Monster::cargo, Monster::cels, Monster::clicked(), Bucket::clicked(), Monster::clickedstray(), Network::computers, Horde::dcels, DOWNC, Monster::DYING, grabbed, i, Monster::index, Horde::list, Horde::MAX_BILLS, Monster::OFF, PLAYING, UI::set_cursor(), Monster::state, state, Monster::STRAY, Monster::target_c, update_score(), Monster::x_offset, and Monster::y_offset. Referenced by Field::mousePressEvent(). |
|
||||||||||||
|
Definition at line 115 of file Game.cc. References Cable::active, Network::base, BUCKET, Network::cables, Monster::cargo, Computer::compatible(), Network::computers, DEFAULTC, Spark::delay(), Cable::delay, EMPTY, grabbed, i, level, Horde::list, Network::ncables, Monster::OFF, Network::off, Library::OFF, Computer::oncomputer(), Cable::onspark(), Computer::os, PLAYING, UI::set_cursor(), Monster::state, state, Network::units, Network::win, and Library::WINGDOWS. Referenced by Field::mouseReleaseEvent(). |
|
|
Definition at line 37 of file game.h. References score. |
|
||||||||||||||||||||||||
|
Definition at line 317 of file game.cpp. References g, and setDifficulty(). Referenced by SFCave::SFCave(). |
|
|
Reimplemented in FlyGame, GatesGame, and SFCaveGame. Definition at line 174 of file game.cpp. References FontHandler::draw(), FONT_WHITE_TEXT, FontHandler::FontHeight(), SFCave::getFPS(), SFCave::getState(), highScore, parent, score, SFCave::showFPS(), STATE_CRASHED, Opie::Internal::string(), FontHandler::TextWidth(), and Opie::MM::x. Referenced by SFCaveGame::draw(), GatesGame::draw(), FlyGame::draw(), and SFCave::handleGameState(). |
|
|
Definition at line 29 of file game.h. References difficulty. Referenced by SFCave::handleMenuSelect(). |
|
|
Definition at line 96 of file game.cpp. References difficulty, MENU_DIFFICULTY_CUSTOM, MENU_DIFFICULTY_EASY, MENU_DIFFICULTY_HARD, MENU_DIFFICULTY_NORMAL, and Opie::Internal::string(). Referenced by init(), and stateChanged(). |
|
|
Definition at line 28 of file game.h. References gameName. Referenced by SFCave::handleMenuSelect(), init(), and stateChanged(). |
|
|
Definition at line 35 of file game.h. References highScore. Referenced by stateChanged(). |
|
|
Definition at line 42 of file game.h. References player. Referenced by SFCave::handleMenuSelect(). |
|
|
Definition at line 34 of file game.h. References score. |
|
|
Definition at line 41 of file game.h. References terrain. |
|
|
Definition at line 38 of file game.h. References highScore, and score. Referenced by stateChanged(). |
|
|
Definition at line 70 of file game.cpp. References nrFrames, press, replay, and replayList. Referenced by SFCave::handleEvents(). |
|
|
Definition at line 36 of file game.h. References score. |
|
|
Reimplemented in FlyGame, GatesGame, and SFCaveGame. Definition at line 45 of file game.cpp. References currentSeed, getGameDifficultyText(), getGameName(), highScore, Terrain::initTerrain(), SFCave::loadSetting(), nrFrames, parent, press, replay, replayIt, replayList, score, setSeed(), Opie::Internal::string(), and terrain. Referenced by SFCave::handleGameState(), SFCaveGame::init(), GatesGame::init(), FlyGame::init(), and setDifficulty(). |
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 24 of file Game.cc. Referenced by Computer::find_stray(), Computer::setup(), and Monster::update_out(). |
|
|
Definition at line 39 of file game.h. References replayList. Referenced by SFCave::handleMenuSelect(). |
|
|
Definition at line 271 of file game.cpp. References currentSeed, data, difficulty, in, parent, printf, replayList, SFCave::setMenuStatusText(), Opie::Internal::string(), and v. Referenced by SFCave::handleMenuSelect(). |
|
||||||||||||
|
Definition at line 192 of file Game.cc. References UI::clear(), UI::draw_centered(), UI::graph_init(), UI::initialize(), level, Picture::load(), UI::load_cursors(), Spark::load_pix(), Bucket::load_pix(), Network::load_pix(), Library::load_pix(), Horde::load_pix(), logo, UI::MainLoop(), UI::make_mainwin(), UI::make_windows(), MAX(), NULL, UI::refresh(), UI::set_pausebutton(), start(), state, and WAITING. Referenced by main(). |
|
||||||||||||
|
Definition at line 16 of file Game.cc. Referenced by Horde::between(), Spark::delay(), main(), and Cable::update(). |
|
||||||||||||
|
Definition at line 20 of file Game.cc. Referenced by Horde::launch(), Horde::max_at_once(), Network::on(), Horde::on(), Network::setup(), and Monster::step_size(). |
|
|
Definition at line 170 of file game.cpp. Referenced by SFCaveGame::draw(), GatesGame::draw(), and FlyGame::draw(). |
|
|
|
|
||||||||||||
|
Definition at line 12 of file Game.cc. Referenced by Computer::determineOS(), Monster::enter(), Monster::get_border(), Horde::launch(), Computer::setup(), Cable::setup(), and Monster::update_in(). |
|
|
Definition at line 233 of file game.cpp. References currentSeed, difficulty, out, parent, printf, replayList, SFCave::setMenuStatusText(), Opie::Internal::string(), and val. Referenced by SFCave::handleMenuSelect(). |
|
|
Definition at line 112 of file game.cpp. References difficulty, init(), MENU_DIFFICULTY_CUSTOM, MENU_DIFFICULTY_EASY, MENU_DIFFICULTY_HARD, and MENU_DIFFICULTY_NORMAL. |
|
|
Definition at line 126 of file game.cpp. References difficulty, and init(). Referenced by createGame(), and SFCave::handleMenuSelect(). |
|
|
Definition at line 25 of file game.h. References replay. Referenced by SFCave::handleGameState(). |
|
|
Definition at line 224 of file game.cpp. References currentSeed, NULL, and PutSeed(). Referenced by init(), and SFCave::SFCave(). |
|
|
Definition at line 31 of file Game.cc. References DEFAULTC, efficiency, EMPTY, grabbed, iteration, level, UI::set_cursor(), Network::setup(), and Horde::setup(). Referenced by start(), update(), and warp_to_level(). |
|
|
Definition at line 40 of file Game.cc. References PLAYING, UI::restart_timer(), score, UI::set_pausebutton(), setup_level(), and state. Referenced by main(), KBill::NewGame(), and warp_to_level(). |
|
||||||||||||
|
Definition at line 205 of file game.cpp. References getGameDifficultyText(), getGameName(), getHighScore(), gotHighScore(), parent, SoundHandler::playSound(), printf, SFCave::saveSetting(), SND_EXPLOSION, STATE_CRASHING, SoundHandler::stopSound(), and Opie::Internal::string(). Referenced by SFCave::changeState(). |
|
|
Reimplemented in FlyGame, GatesGame, and SFCaveGame. Definition at line 132 of file game.cpp. References SFCave::changeState(), highScore, nrFrames, parent, player, SoundHandler::playSound(), press, replay, replayIt, replayList, score, SND_THRUST, STATE_CRASHED, STATE_CRASHING, STATE_PLAYING, SoundHandler::stopSound(), thrustChannel, and Player::updateCrashing(). |
|
|
Definition at line 150 of file Game.cc. References Network::base, BETWEEN, UI::clear(), Horde::draw(), Network::draw(), Bucket::draw(), UI::draw_centered(), END, ENDGAME, ENDLEVEL, HIGHSCORE, iteration, UI::kill_timer(), level, logo, Network::off, Horde::off_screen, Horde::on_screen, PLAYING, UI::popup_dialog(), UI::refresh(), SCORE, score, UI::set_pausebutton(), setup_level(), state, Network::toasters(), Horde::update(), Network::update(), update_info(), update_score(), UI::update_scorebox(), and WAITING. Referenced by SFCave::handleGameState(), Field::Timer(), SFCaveGame::update(), GatesGame::update(), and FlyGame::update(). |
|
|
Definition at line 53 of file Game.cc. References Network::base, UI::draw_str(), efficiency, level, Network::off, Horde::off_screen, Horde::on_screen, score, scrheight, str, Network::units, and Network::win. Referenced by update(). |
|
|
Definition at line 62 of file Game.cc. References BILLPOINTS, efficiency, ENDLEVEL, iteration, level, and score. Referenced by button_press(), and update(). |
|
|
Definition at line 69 of file Game.cc. References level, PLAYING, setup_level(), start(), and state. |
|
|
Definition at line 18 of file Game.h. Referenced by update(). |
|
|
Definition at line 32 of file Game.h. Referenced by update_score(). |
|
|
Definition at line 35 of file Game.h. Referenced by button_press(), button_release(), and Bucket::draw(). |
|
|
Definition at line 24 of file Game.h. Referenced by button_press(), and UI::set_cursor(). |
|
|
Definition at line 71 of file game.h. Referenced by init(), loadReplay(), saveReplay(), and setSeed(). |
|
|
Definition at line 22 of file Game.h. Referenced by button_release(), UI::set_cursor(), and setup_level(). |
|
|
Definition at line 55 of file game.h. Referenced by FlyGame::FlyGame(), Game(), GatesGame::GatesGame(), getDifficulty(), getGameDifficultyText(), SFCaveGame::init(), GatesGame::init(), FlyGame::init(), loadReplay(), saveReplay(), setDifficulty(), and SFCaveGame::SFCaveGame(). |
|
|
Definition at line 23 of file Game.h. Referenced by button_press(), and UI::set_cursor(). |
|
|
Definition at line 8 of file Game.h. Referenced by setup_level(), update_info(), and update_score(). |
|
|
Definition at line 34 of file Game.h. Referenced by button_release(), and setup_level(). |
|
|
Definition at line 19 of file Game.h. Referenced by update(). |
|
|
Definition at line 26 of file Game.h. Referenced by UI::popup_dialog(), and update(). |
|
|
Definition at line 31 of file Game.h. Referenced by update(), and update_score(). |
|
|
Definition at line 27 of file Game.h. Referenced by UI::popup_dialog(). |
|
|
Definition at line 51 of file game.h. Referenced by FlyGame::FlyGame(), GatesGame::GatesGame(), getGameName(), and SFCaveGame::SFCaveGame(). |
|
|
Definition at line 12 of file Game.h. Referenced by button_press(), button_release(), Bucket::draw(), Monster::draw_stray(), and setup_level(). |
|
|
Definition at line 68 of file game.h. Referenced by draw(), FlyGame::FlyGame(), GatesGame::GatesGame(), getHighScore(), gotHighScore(), init(), SFCaveGame::SFCaveGame(), and update(). |
|
|
Definition at line 28 of file Game.h. Referenced by UI::popup_dialog(), and update(). |
|
|
Definition at line 10 of file Game.h. Referenced by setup_level(), Horde::update(), update(), and update_score(). |
|
|
Definition at line 10 of file Game.h. Referenced by button_release(), main(), Monster::move(), Network::setup(), Horde::setup(), Cable::setup(), setup_level(), Horde::update(), update(), Cable::update(), update_info(), update_score(), and warp_to_level(). |
|
|
|
|
|
Definition at line 61 of file game.h. Referenced by handleKeys(), init(), SFCaveGame::update(), GatesGame::update(), FlyGame::update(), and update(). |
|
|
Definition at line 57 of file game.h. Referenced by SFCaveGame::draw(), GatesGame::draw(), draw(), Game(), SFCaveGame::init(), GatesGame::init(), FlyGame::init(), init(), loadReplay(), saveReplay(), stateChanged(), SFCaveGame::update(), GatesGame::update(), FlyGame::update(), and update(). |
|
|
|
Definition at line 17 of file Game.h. Referenced by button_press(), button_release(), start(), update(), and warp_to_level(). |
|
|
Definition at line 63 of file game.h. Referenced by handleKeys(), init(), SFCaveGame::update(), GatesGame::update(), FlyGame::update(), and update(). |
|
|
Definition at line 75 of file game.h. Referenced by Game(), handleKeys(), init(), setReplay(), and update(). |
|
|
|
|
|
|
|
|
Definition at line 73 of file game.h. Referenced by handleKeys(), init(), isReplayAvailable(), loadReplay(), saveReplay(), update(), and ~Game(). |
|
|
|
|
|
Definition at line 29 of file Game.h. Referenced by UI::popup_dialog(), and update(). |
|
|
Definition at line 10 of file Game.h. Referenced by clearScore(), draw(), getScore(), gotHighScore(), increaseScore(), init(), start(), SFCaveGame::update(), GatesGame::update(), FlyGame::update(), update(), update_info(), and update_score(). |
|
|
Definition at line 15 of file Game.h. Referenced by Field::Field(), Monster::get_border(), UI::graph_init(), Computer::setup(), update_info(), and Monster::update_out(). |
|
|
Definition at line 14 of file Game.h. Referenced by Field::Field(), Monster::get_border(), UI::graph_init(), Computer::setup(), and Monster::update_out(). |
|
|
Definition at line 65 of file game.h. Referenced by Game(), and SFCaveGame::update(). |
|
|
Definition at line 7 of file Game.h. Referenced by button_press(), button_release(), main(), start(), update(), and warp_to_level(). |
|
|
Definition at line 66 of file game.h. Referenced by SFCaveGame::addBlock(), GatesGame::addGate(), and Game(). |
|
|
|
|
|
|
|
1.4.2