summaryrefslogtreecommitdiff
authorandyq <andyq>2002-12-20 17:53:12 (UTC)
committer andyq <andyq>2002-12-20 17:53:12 (UTC)
commit3019cddcdb9aca09f463024ac67620c144dbf211 (patch) (side-by-side diff)
treea4f41d9db95d254ea8e46a21742b0272c764b3be
parentfdcb16419ebc646875a1c2cc4e9f623af502a31d (diff)
downloadopie-3019cddcdb9aca09f463024ac67620c144dbf211.zip
opie-3019cddcdb9aca09f463024ac67620c144dbf211.tar.gz
opie-3019cddcdb9aca09f463024ac67620c144dbf211.tar.bz2
Added difficultie levels to SFCave game type
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/sfcave/sfcave.cpp18
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
@@ -15,5 +15,5 @@
#include "sfcave.h"
-#define CAPTION "SFCave 1.11 by AndyQ"
+#define CAPTION "SFCave 1.12 by AndyQ"
#define UP_THRUST 0.6
@@ -228,4 +228,5 @@ void SFCave :: setUp()
thrust = 0;
+ int dist[] = { 100, 60, 40 };
if ( CURRENT_GAME_TYPE == SFCAVE_GAME )
{
@@ -234,4 +235,13 @@ void SFCave :: setUp()
maxUpThrust = MaxUpThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];;
maxDownThrust = MaxDownThrustVals[SFCAVE_GAME_TYPE][currentGameDifficulty];;
+
+ if ( currentCameDifficulty == DIFICULTY_EASY )
+ gateDistance = 100;
+ else if ( currentCameDifficulty == DIFICULTY_EASY )
+ gateDistance = 60;
+ else
+ gateDistance = 40;
+
+ printf( "GD = %d\n", gateDistance );
}
else if ( CURRENT_GAME_TYPE == GATES_GAME )
@@ -241,4 +251,6 @@ void SFCave :: setUp()
maxUpThrust = MaxUpThrustVals[GATES_GAME_TYPE][currentGameDifficulty];;
maxDownThrust = MaxDownThrustVals[GATES_GAME_TYPE][currentGameDifficulty];;
+ gateDistance = 75;
+ nextGate = nextInt( 50 ) + gateDistance;
}
else
@@ -258,6 +270,4 @@ void SFCave :: setUp()
blockHeight = 70;
gapHeight = initialGateGaps[currentGameDifficulty];
- gateDistance = 75;
- nextGate = nextInt( 50 ) + gateDistance;
for ( int i = 0 ; i < TRAILSIZE ; ++i )
@@ -369,5 +379,5 @@ void SFCave :: handleGameSFCave()
}
- if ( nrFrames % 100 == 0 )
+ if ( nrFrames % gateDistance == 0 )
addBlock();