author | andyq <andyq> | 2002-12-20 22:57:16 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-12-20 22:57:16 (UTC) |
commit | 12a964a2f8837ee981284f3ee902baae0c7b1f77 (patch) (unidiff) | |
tree | c89f1e29e40f8aa1d0b1f2940b7227ce6c75bf01 | |
parent | 48efd0d81aad0c3d0a64baabbc46fde593eb086c (diff) | |
download | opie-12a964a2f8837ee981284f3ee902baae0c7b1f77.zip opie-12a964a2f8837ee981284f3ee902baae0c7b1f77.tar.gz opie-12a964a2f8837ee981284f3ee902baae0c7b1f77.tar.bz2 |
Fixed small bugette with cursor keys
-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 | |||
@@ -228,5 +228,4 @@ void SFCave :: setUp() | |||
228 | thrust = 0; | 228 | thrust = 0; |
229 | 229 | ||
230 | int dist[] = { 100, 60, 40 }; | ||
231 | if ( CURRENT_GAME_TYPE == SFCAVE_GAME ) | 230 | if ( CURRENT_GAME_TYPE == SFCAVE_GAME ) |
232 | { | 231 | { |
@@ -236,12 +235,10 @@ void SFCave :: setUp() | |||
236 | maxDownThrust = MaxDownThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];; | 235 | maxDownThrust = MaxDownThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];; |
237 | 236 | ||
238 | if ( currentCameDifficulty == DIFICULTY_EASY ) | 237 | if ( currentGameDifficulty == DIFICULTY_EASY ) |
239 | gateDistance = 100; | 238 | gateDistance = 100; |
240 | else if ( currentCameDifficulty == DIFICULTY_EASY ) | 239 | else if ( currentGameDifficulty == DIFICULTY_EASY ) |
241 | gateDistance = 60; | 240 | gateDistance = 60; |
242 | else | 241 | else |
243 | gateDistance = 40; | 242 | gateDistance = 40; |
244 | |||
245 | printf( "GD = %d\n", gateDistance ); | ||
246 | } | 243 | } |
247 | else if ( CURRENT_GAME_TYPE == GATES_GAME ) | 244 | else if ( CURRENT_GAME_TYPE == GATES_GAME ) |
@@ -792,9 +789,11 @@ void SFCave :: keyPressEvent( QKeyEvent *e ) | |||
792 | case Qt::Key_F9: | 789 | case Qt::Key_F9: |
793 | case Qt::Key_Space: | 790 | case Qt::Key_Space: |
794 | if ( !replay && !press ) | 791 | if ( state == STATE_RUNNING && !replay && !press ) |
795 | { | 792 | { |
796 | press = true; | 793 | press = true; |
797 | replayList.append( new int( nrFrames ) ); | 794 | replayList.append( new int( nrFrames ) ); |
798 | } | 795 | } |
796 | else if ( state == STATE_CRASHED && e->key() == Key_Up ) | ||
797 | state = STATE_NEWGAME; | ||
799 | break; | 798 | break; |
800 | case Qt::Key_M: | 799 | case Qt::Key_M: |
@@ -832,10 +831,8 @@ void SFCave :: keyReleaseEvent( QKeyEvent *e ) | |||
832 | case Qt::Key_Space: | 831 | case Qt::Key_Space: |
833 | case Qt::Key_Up: | 832 | case Qt::Key_Up: |
834 | if ( !replay && press ) | 833 | press = false; |
835 | { | 834 | if ( state == STATE_RUNNING && !replay && press ) |
836 | press = false; | ||
837 | |||
838 | replayList.append( new int( nrFrames ) ); | 835 | replayList.append( new int( nrFrames ) ); |
839 | } | 836 | |
840 | break; | 837 | break; |
841 | 838 | ||