summaryrefslogtreecommitdiff
authorandyq <andyq>2003-01-23 22:40:43 (UTC)
committer andyq <andyq>2003-01-23 22:40:43 (UTC)
commitd3b2ab85a765cd3c0b403f5b5ac2f9b92c22de38 (patch) (side-by-side diff)
treee348c9237b0f5c0cb62c2d5d9bdc9e1a4ba19263
parent0c31038ab4daf7d4ef5b58e8973fa9f4f91cb826 (diff)
downloadopie-d3b2ab85a765cd3c0b403f5b5ac2f9b92c22de38.zip
opie-d3b2ab85a765cd3c0b403f5b5ac2f9b92c22de38.tar.gz
opie-d3b2ab85a765cd3c0b403f5b5ac2f9b92c22de38.tar.bz2
Fixed gcc 3.2 compile issue (hopefully)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/sfcave/sfcave.cpp19
-rw-r--r--noncore/games/sfcave/sfcave.h2
2 files changed, 11 insertions, 10 deletions
diff --git a/noncore/games/sfcave/sfcave.cpp b/noncore/games/sfcave/sfcave.cpp
index d6d28b2..9b30fe6 100644
--- a/noncore/games/sfcave/sfcave.cpp
+++ b/noncore/games/sfcave/sfcave.cpp
@@ -130,2 +130,3 @@ int SFCave::initialGateGaps[] = { 75, 50, 25 };
+#define FLYSCORES( x, y ) (*(flyScores + ((x)*3) + y))
bool movel;
@@ -284,7 +285,7 @@ void SFCave :: setUp()
if ( currentGameDifficulty == DIFICULTY_EASY )
- flyScores = flyEasyScores;
+ flyScores = (int*)flyEasyScores;
else if ( currentGameDifficulty == DIFICULTY_NORMAL )
- flyScores = flyNormalScores;
+ flyScores = (int*)flyNormalScores;
else
- flyScores = flyHardScores;
+ flyScores = (int*)flyHardScores;
}
@@ -483,7 +484,7 @@ void SFCave :: handleGameFly()
// the closer the difference is to 0 means more points
- for ( int i = 0 ; i < 10 && flyScores[i][0] != -1 ; ++i )
+ for ( int i = 0 ; i < 10 && FLYSCORES( i, 0 ) != -1 ; ++i )
{
- if ( flyScores[i][0] <= diff && flyScores[i][1] > diff )
+ if ( FLYSCORES( i, 0 ) <= diff && FLYSCORES(i, 1 ) > diff )
{
- score += flyScores[i][2];
+ score += FLYSCORES( i, 2 );
break;
@@ -696,8 +697,8 @@ void SFCave :: draw()
p.setPen( Qt::blue );
- for ( int j = 1 ; j < 10 && flyScores[j][0] != -1 ; ++j )
+ for ( int j = 1 ; j < 10 && FLYSCORES( j, 0 ) != -1 ; ++j )
{
- if ( flyScores[j][2] < 0 )
+ if ( FLYSCORES( j, 2 ) < 0 )
p.setPen( Qt::red );
- p.drawLine( (i*segSize) - (offset*speed), mapBottom[i]-flyScores[j][0], ((i+1)*segSize)-(offset*speed), mapBottom[i+1]-flyScores[j][0] );
+ p.drawLine( (i*segSize) - (offset*speed), mapBottom[i]-FLYSCORES( j, 0 ), ((i+1)*segSize)-(offset*speed), mapBottom[i+1]-FLYSCORES( j, 0 ) );
}
diff --git a/noncore/games/sfcave/sfcave.h b/noncore/games/sfcave/sfcave.h
index f95558d..b1fe819 100644
--- a/noncore/games/sfcave/sfcave.h
+++ b/noncore/games/sfcave/sfcave.h
@@ -52,3 +52,3 @@ public:
static int flyHardScores[7][3];
- int flyScores[7][3];
+ int *flyScores;