summaryrefslogtreecommitdiff
authorandyq <andyq>2003-01-21 21:09:36 (UTC)
committer andyq <andyq>2003-01-21 21:09:36 (UTC)
commit6b3b53262213e4e4f73ffab2266ea3b4a7813fe4 (patch) (side-by-side diff)
tree896759614d5601570f259525c000a8be4db4d68d
parent0a6563fcc2f49857c581d9def24407a3a4ef526c (diff)
downloadopie-6b3b53262213e4e4f73ffab2266ea3b4a7813fe4.zip
opie-6b3b53262213e4e4f73ffab2266ea3b4a7813fe4.tar.gz
opie-6b3b53262213e4e4f73ffab2266ea3b4a7813fe4.tar.bz2
Small bug fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/sfcave-sdl/fly_game.cpp3
-rw-r--r--noncore/games/sfcave-sdl/gates_game.cpp4
-rw-r--r--noncore/games/sfcave-sdl/player.cpp2
-rw-r--r--noncore/games/sfcave-sdl/sfcave_game.cpp4
4 files changed, 6 insertions, 7 deletions
diff --git a/noncore/games/sfcave-sdl/fly_game.cpp b/noncore/games/sfcave-sdl/fly_game.cpp
index 7605c3f..8b05d8f 100644
--- a/noncore/games/sfcave-sdl/fly_game.cpp
+++ b/noncore/games/sfcave-sdl/fly_game.cpp
@@ -17,18 +17,16 @@ FlyGame :: FlyGame( SFCave *p, int w, int h, int diff )
FlyGame :: ~FlyGame()
{
// terrain and player get deleted by parent class
}
void FlyGame :: init()
{
- Game :: init();
-
switch( difficulty )
{
case MENU_DIFFICULTY_EASY:
player->setMovementInfo( 0.3, 0.2, 1.5, 1.5 );
break;
case MENU_DIFFICULTY_NORMAL:
player->setMovementInfo( 0.35, 0.4, 2.5, 3 );
break;
@@ -42,16 +40,17 @@ void FlyGame :: init()
double maxUp = parent->loadDoubleSetting( "Fly_custom_player_maxupspeed", 1.5 );
double maxDown = parent->loadDoubleSetting( "Fly_custom_player_maxdownspeed", 1.5 );
player->setMovementInfo( thrust, gravity, maxUp, maxDown );
break;
}
}
startScoring = false;
+ Game :: init();
}
void FlyGame :: update( int state )
{
Game::update( state );
if ( state == STATE_PLAYING )
{
diff --git a/noncore/games/sfcave-sdl/gates_game.cpp b/noncore/games/sfcave-sdl/gates_game.cpp
index 762801d..700a6ec 100644
--- a/noncore/games/sfcave-sdl/gates_game.cpp
+++ b/noncore/games/sfcave-sdl/gates_game.cpp
@@ -18,18 +18,16 @@ GatesGame :: GatesGame( SFCave *p, int w, int h, int diff )
GatesGame :: ~GatesGame()
{
// terrain and player get deleted by parent class
}
void GatesGame :: init()
{
- Game :: init();
-
blockHeight = 80;
blockWidth = 20;
lastGateBottomY = 0;
gateDistance = 75;
nextGate = nextInt( 50 ) + gateDistance;
gapHeight = 75;
@@ -59,16 +57,18 @@ void GatesGame :: init()
player->setMovementInfo( thrust, gravity, maxUp, maxDown );
break;
}
}
for ( int i = 0 ; i < BLOCKSIZE ; ++i )
blocks[i].y( -1 );
+
+ Game :: init();
}
void GatesGame :: update( int state )
{
Game::update( state );
// Game logic goes here
if ( state == STATE_PLAYING )
diff --git a/noncore/games/sfcave-sdl/player.cpp b/noncore/games/sfcave-sdl/player.cpp
index 2d52ae2..f024d6b 100644
--- a/noncore/games/sfcave-sdl/player.cpp
+++ b/noncore/games/sfcave-sdl/player.cpp
@@ -28,17 +28,17 @@ Player :: ~Player()
void Player :: init()
{
// Set player position
pos.x( 50 );
pos.y( sWidth/2 );
pos.h( 2 );
pos.w( 4 );
- thrust = 0;
+ currentThrust = 0;
crashing = false;
crashLineLength = 0;
crashed = false;
explosion->reset();
allFaded = false;
expNextFrame = false;
// Reset Trail
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
@@ -17,18 +17,16 @@ SFCaveGame :: SFCaveGame( SFCave *p, int w, int h, int diff )
}
SFCaveGame :: ~SFCaveGame()
{
}
void SFCaveGame :: init()
{
- Game :: init();
-
blockDistance = 50;
blockHeight = 80;
blockWidth = 20;
switch( difficulty )
{
case MENU_DIFFICULTY_EASY:
blockDistance = 50;
@@ -51,16 +49,18 @@ void SFCaveGame :: init()
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 )
{