Diffstat (limited to 'noncore/games/sfcave-sdl/gates_game.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/sfcave-sdl/gates_game.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/games/sfcave-sdl/gates_game.cpp b/noncore/games/sfcave-sdl/gates_game.cpp index 762801d..700a6ec 100644 --- a/noncore/games/sfcave-sdl/gates_game.cpp +++ b/noncore/games/sfcave-sdl/gates_game.cpp @@ -14,26 +14,24 @@ GatesGame :: GatesGame( SFCave *p, int w, int h, int diff ) terrain = new Terrain( w, h ); player = new Player( w, h ); highScore = 0; } GatesGame :: ~GatesGame() { // terrain and player get deleted by parent class } void GatesGame :: init() { - Game :: init(); - blockHeight = 80; blockWidth = 20; lastGateBottomY = 0; gateDistance = 75; nextGate = nextInt( 50 ) + gateDistance; gapHeight = 75; switch( difficulty ) { case MENU_DIFFICULTY_EASY: gapHeight = 75; @@ -55,24 +53,26 @@ void GatesGame :: init() double thrust = parent->loadDoubleSetting( "Gates_custom_player_thrust", 0.4 ); double gravity = parent->loadDoubleSetting( "Gates_custom_player_gravity", 0.6 ); double maxUp = parent->loadDoubleSetting( "Gates_custom_player_maxupspeed", 4.0 ); double maxDown = parent->loadDoubleSetting( "Gates_custom_player_maxdownspeed", 5.0 ); player->setMovementInfo( thrust, gravity, maxUp, maxDown ); break; } } for ( int i = 0 ; i < BLOCKSIZE ; ++i ) blocks[i].y( -1 ); + + Game :: init(); } void GatesGame :: update( int state ) { Game::update( state ); // Game logic goes here if ( state == STATE_PLAYING ) { if ( nrFrames % 3 == 0 ) score ++; |