Diffstat (limited to 'noncore/games/sfcave-sdl/sfcave_game.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/sfcave-sdl/sfcave_game.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/games/sfcave-sdl/sfcave_game.cpp b/noncore/games/sfcave-sdl/sfcave_game.cpp index 1b00e14..8fdbbe5 100644 --- a/noncore/games/sfcave-sdl/sfcave_game.cpp +++ b/noncore/games/sfcave-sdl/sfcave_game.cpp @@ -13,26 +13,24 @@ SFCaveGame :: SFCaveGame( SFCave *p, int w, int h, int diff ) terrain = new Terrain( w, h ); player = new Player( w, h ); highScore = 0; } SFCaveGame :: ~SFCaveGame() { } void SFCaveGame :: init() { - Game :: init(); - blockDistance = 50; blockHeight = 80; blockWidth = 20; switch( difficulty ) { case MENU_DIFFICULTY_EASY: blockDistance = 50; break; case MENU_DIFFICULTY_NORMAL: blockDistance = 40; break; @@ -47,24 +45,26 @@ void SFCaveGame :: init() double thrust = parent->loadDoubleSetting( "SFCave_custom_player_thrust", 0.4 ); double gravity = parent->loadDoubleSetting( "SFCave_custom_player_gravity", 0.6 ); double maxUp = parent->loadDoubleSetting( "SFCave_custom_player_maxupspeed", 4.0 ); double maxDown = parent->loadDoubleSetting( "SFCave_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 SFCaveGame :: update( int state ) { Game::update( state ); if ( state == STATE_PLAYING ) { if ( nrFrames % 3 == 0 ) score ++; if ( nrFrames % 200 == 0 ) |