summaryrefslogtreecommitdiff
path: root/noncore
authorandyq <andyq>2003-01-21 21:09:36 (UTC)
committer andyq <andyq>2003-01-21 21:09:36 (UTC)
commit6b3b53262213e4e4f73ffab2266ea3b4a7813fe4 (patch) (unidiff)
tree896759614d5601570f259525c000a8be4db4d68d /noncore
parent0a6563fcc2f49857c581d9def24407a3a4ef526c (diff)
downloadopie-6b3b53262213e4e4f73ffab2266ea3b4a7813fe4.zip
opie-6b3b53262213e4e4f73ffab2266ea3b4a7813fe4.tar.gz
opie-6b3b53262213e4e4f73ffab2266ea3b4a7813fe4.tar.bz2
Small bug fix
Diffstat (limited to 'noncore') (more/less context) (show 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
@@ -19,14 +19,12 @@ FlyGame :: ~FlyGame()
19{ 19{
20 // terrain and player get deleted by parent class 20 // terrain and player get deleted by parent class
21} 21}
22 22
23void FlyGame :: init() 23void FlyGame :: init()
24{ 24{
25 Game :: init();
26
27 switch( difficulty ) 25 switch( difficulty )
28 { 26 {
29 case MENU_DIFFICULTY_EASY: 27 case MENU_DIFFICULTY_EASY:
30 player->setMovementInfo( 0.3, 0.2, 1.5, 1.5 ); 28 player->setMovementInfo( 0.3, 0.2, 1.5, 1.5 );
31 break; 29 break;
32 case MENU_DIFFICULTY_NORMAL: 30 case MENU_DIFFICULTY_NORMAL:
@@ -44,12 +42,13 @@ void FlyGame :: init()
44 player->setMovementInfo( thrust, gravity, maxUp, maxDown ); 42 player->setMovementInfo( thrust, gravity, maxUp, maxDown );
45 break; 43 break;
46 } 44 }
47 } 45 }
48 46
49 startScoring = false; 47 startScoring = false;
48 Game :: init();
50} 49}
51 50
52void FlyGame :: update( int state ) 51void FlyGame :: update( int state )
53{ 52{
54 Game::update( state ); 53 Game::update( state );
55 54
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
@@ -20,14 +20,12 @@ GatesGame :: ~GatesGame()
20{ 20{
21 // terrain and player get deleted by parent class 21 // terrain and player get deleted by parent class
22} 22}
23 23
24void GatesGame :: init() 24void GatesGame :: init()
25{ 25{
26 Game :: init();
27
28 blockHeight = 80; 26 blockHeight = 80;
29 blockWidth = 20; 27 blockWidth = 20;
30 lastGateBottomY = 0; 28 lastGateBottomY = 0;
31 29
32 gateDistance = 75; 30 gateDistance = 75;
33 nextGate = nextInt( 50 ) + gateDistance; 31 nextGate = nextInt( 50 ) + gateDistance;
@@ -61,12 +59,14 @@ void GatesGame :: init()
61 break; 59 break;
62 } 60 }
63 } 61 }
64 62
65 for ( int i = 0 ; i < BLOCKSIZE ; ++i ) 63 for ( int i = 0 ; i < BLOCKSIZE ; ++i )
66 blocks[i].y( -1 ); 64 blocks[i].y( -1 );
65
66 Game :: init();
67} 67}
68 68
69void GatesGame :: update( int state ) 69void GatesGame :: update( int state )
70{ 70{
71 Game::update( state ); 71 Game::update( state );
72 72
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
@@ -30,13 +30,13 @@ void Player :: init()
30{ 30{
31 // Set player position 31 // Set player position
32 pos.x( 50 ); 32 pos.x( 50 );
33 pos.y( sWidth/2 ); 33 pos.y( sWidth/2 );
34 pos.h( 2 ); 34 pos.h( 2 );
35 pos.w( 4 ); 35 pos.w( 4 );
36 thrust = 0; 36 currentThrust = 0;
37 crashing = false; 37 crashing = false;
38 crashLineLength = 0; 38 crashLineLength = 0;
39 crashed = false; 39 crashed = false;
40 explosion->reset(); 40 explosion->reset();
41 allFaded = false; 41 allFaded = false;
42 expNextFrame = false; 42 expNextFrame = false;
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
@@ -19,14 +19,12 @@ SFCaveGame :: SFCaveGame( SFCave *p, int w, int h, int diff )
19SFCaveGame :: ~SFCaveGame() 19SFCaveGame :: ~SFCaveGame()
20{ 20{
21} 21}
22 22
23void SFCaveGame :: init() 23void SFCaveGame :: init()
24{ 24{
25 Game :: init();
26
27 blockDistance = 50; 25 blockDistance = 50;
28 blockHeight = 80; 26 blockHeight = 80;
29 blockWidth = 20; 27 blockWidth = 20;
30 28
31 switch( difficulty ) 29 switch( difficulty )
32 { 30 {
@@ -53,12 +51,14 @@ void SFCaveGame :: init()
53 break; 51 break;
54 } 52 }
55 } 53 }
56 54
57 for ( int i = 0 ; i < BLOCKSIZE ; ++i ) 55 for ( int i = 0 ; i < BLOCKSIZE ; ++i )
58 blocks[i].y( -1 ); 56 blocks[i].y( -1 );
57
58 Game :: init();
59} 59}
60 60
61void SFCaveGame :: update( int state ) 61void SFCaveGame :: update( int state )
62{ 62{
63 Game::update( state ); 63 Game::update( state );
64 64