author | andyq <andyq> | 2002-12-20 17:53:12 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-12-20 17:53:12 (UTC) |
commit | 3019cddcdb9aca09f463024ac67620c144dbf211 (patch) (unidiff) | |
tree | a4f41d9db95d254ea8e46a21742b0272c764b3be /noncore/games/sfcave/sfcave.cpp | |
parent | fdcb16419ebc646875a1c2cc4e9f623af502a31d (diff) | |
download | opie-3019cddcdb9aca09f463024ac67620c144dbf211.zip opie-3019cddcdb9aca09f463024ac67620c144dbf211.tar.gz opie-3019cddcdb9aca09f463024ac67620c144dbf211.tar.bz2 |
Added difficultie levels to SFCave game type
Diffstat (limited to 'noncore/games/sfcave/sfcave.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/sfcave/sfcave.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/noncore/games/sfcave/sfcave.cpp b/noncore/games/sfcave/sfcave.cpp index 929dc41..5633a8f 100644 --- a/noncore/games/sfcave/sfcave.cpp +++ b/noncore/games/sfcave/sfcave.cpp | |||
@@ -14,7 +14,7 @@ | |||
14 | #include "helpwindow.h" | 14 | #include "helpwindow.h" |
15 | #include "sfcave.h" | 15 | #include "sfcave.h" |
16 | 16 | ||
17 | #define CAPTION "SFCave 1.11 by AndyQ" | 17 | #define CAPTION "SFCave 1.12 by AndyQ" |
18 | 18 | ||
19 | #define UP_THRUST 0.6 | 19 | #define UP_THRUST 0.6 |
20 | #define NO_THRUST 0.8 | 20 | #define NO_THRUST 0.8 |
@@ -227,12 +227,22 @@ void SFCave :: setUp() | |||
227 | dir = 1; | 227 | dir = 1; |
228 | thrust = 0; | 228 | thrust = 0; |
229 | 229 | ||
230 | int dist[] = { 100, 60, 40 }; | ||
230 | if ( CURRENT_GAME_TYPE == SFCAVE_GAME ) | 231 | if ( CURRENT_GAME_TYPE == SFCAVE_GAME ) |
231 | { | 232 | { |
232 | thrustUp = UpThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];; | 233 | thrustUp = UpThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];; |
233 | noThrust = DownThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];; | 234 | noThrust = DownThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];; |
234 | maxUpThrust = MaxUpThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];; | 235 | maxUpThrust = MaxUpThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];; |
235 | maxDownThrust = MaxDownThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];; | 236 | maxDownThrust = MaxDownThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];; |
237 | |||
238 | if ( currentCameDifficulty == DIFICULTY_EASY ) | ||
239 | gateDistance = 100; | ||
240 | else if ( currentCameDifficulty == DIFICULTY_EASY ) | ||
241 | gateDistance = 60; | ||
242 | else | ||
243 | gateDistance = 40; | ||
244 | |||
245 | printf( "GD = %d\n", gateDistance ); | ||
236 | } | 246 | } |
237 | else if ( CURRENT_GAME_TYPE == GATES_GAME ) | 247 | else if ( CURRENT_GAME_TYPE == GATES_GAME ) |
238 | { | 248 | { |
@@ -240,6 +250,8 @@ void SFCave :: setUp() | |||
240 | noThrust = DownThrustVals[GATES_GAME_TYPE][currentGameDifficulty];; | 250 | noThrust = DownThrustVals[GATES_GAME_TYPE][currentGameDifficulty];; |
241 | maxUpThrust = MaxUpThrustVals[GATES_GAME_TYPE][currentGameDifficulty];; | 251 | maxUpThrust = MaxUpThrustVals[GATES_GAME_TYPE][currentGameDifficulty];; |
242 | maxDownThrust = MaxDownThrustVals[GATES_GAME_TYPE][currentGameDifficulty];; | 252 | maxDownThrust = MaxDownThrustVals[GATES_GAME_TYPE][currentGameDifficulty];; |
253 | gateDistance = 75; | ||
254 | nextGate = nextInt( 50 ) + gateDistance; | ||
243 | } | 255 | } |
244 | else | 256 | else |
245 | { | 257 | { |
@@ -257,8 +269,6 @@ void SFCave :: setUp() | |||
257 | blockWidth = 20; | 269 | blockWidth = 20; |
258 | blockHeight = 70; | 270 | blockHeight = 70; |
259 | gapHeight = initialGateGaps[currentGameDifficulty]; | 271 | gapHeight = initialGateGaps[currentGameDifficulty]; |
260 | gateDistance = 75; | ||
261 | nextGate = nextInt( 50 ) + gateDistance; | ||
262 | 272 | ||
263 | for ( int i = 0 ; i < TRAILSIZE ; ++i ) | 273 | for ( int i = 0 ; i < TRAILSIZE ; ++i ) |
264 | { | 274 | { |
@@ -368,7 +378,7 @@ void SFCave :: handleGameSFCave() | |||
368 | } | 378 | } |
369 | } | 379 | } |
370 | 380 | ||
371 | if ( nrFrames % 100 == 0 ) | 381 | if ( nrFrames % gateDistance == 0 ) |
372 | addBlock(); | 382 | addBlock(); |
373 | 383 | ||
374 | if ( checkCollision() ) | 384 | if ( checkCollision() ) |