-rw-r--r-- | noncore/games/sfcave/sfcave.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/noncore/games/sfcave/sfcave.cpp b/noncore/games/sfcave/sfcave.cpp index 5633a8f..c1e4532 100644 --- a/noncore/games/sfcave/sfcave.cpp +++ b/noncore/games/sfcave/sfcave.cpp @@ -229,3 +229,2 @@ void SFCave :: setUp() - int dist[] = { 100, 60, 40 }; if ( CURRENT_GAME_TYPE == SFCAVE_GAME ) @@ -237,5 +236,5 @@ void SFCave :: setUp() - if ( currentCameDifficulty == DIFICULTY_EASY ) + if ( currentGameDifficulty == DIFICULTY_EASY ) gateDistance = 100; - else if ( currentCameDifficulty == DIFICULTY_EASY ) + else if ( currentGameDifficulty == DIFICULTY_EASY ) gateDistance = 60; @@ -243,4 +242,2 @@ void SFCave :: setUp() gateDistance = 40; - - printf( "GD = %d\n", gateDistance ); } @@ -793,3 +790,3 @@ void SFCave :: keyPressEvent( QKeyEvent *e ) case Qt::Key_Space: - if ( !replay && !press ) + if ( state == STATE_RUNNING && !replay && !press ) { @@ -798,2 +795,4 @@ void SFCave :: keyPressEvent( QKeyEvent *e ) } + else if ( state == STATE_CRASHED && e->key() == Key_Up ) + state = STATE_NEWGAME; break; @@ -833,8 +832,6 @@ void SFCave :: keyReleaseEvent( QKeyEvent *e ) case Qt::Key_Up: - if ( !replay && press ) - { - press = false; - + press = false; + if ( state == STATE_RUNNING && !replay && press ) replayList.append( new int( nrFrames ) ); - } + break; |