summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave
Unidiff
Diffstat (limited to 'noncore/games/sfcave') (more/less context) (ignore 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 };
130 130
131#define FLYSCORES( x, y ) (*(flyScores + ((x)*3) + y))
131bool movel; 132bool movel;
@@ -284,7 +285,7 @@ void SFCave :: setUp()
284 if ( currentGameDifficulty == DIFICULTY_EASY ) 285 if ( currentGameDifficulty == DIFICULTY_EASY )
285 flyScores = flyEasyScores; 286 flyScores = (int*)flyEasyScores;
286 else if ( currentGameDifficulty == DIFICULTY_NORMAL ) 287 else if ( currentGameDifficulty == DIFICULTY_NORMAL )
287 flyScores = flyNormalScores; 288 flyScores = (int*)flyNormalScores;
288 else 289 else
289 flyScores = flyHardScores; 290 flyScores = (int*)flyHardScores;
290 } 291 }
@@ -483,7 +484,7 @@ void SFCave :: handleGameFly()
483 // the closer the difference is to 0 means more points 484 // the closer the difference is to 0 means more points
484 for ( int i = 0 ; i < 10 && flyScores[i][0] != -1 ; ++i ) 485 for ( int i = 0 ; i < 10 && FLYSCORES( i, 0 ) != -1 ; ++i )
485 { 486 {
486 if ( flyScores[i][0] <= diff && flyScores[i][1] > diff ) 487 if ( FLYSCORES( i, 0 ) <= diff && FLYSCORES(i, 1 ) > diff )
487 { 488 {
488 score += flyScores[i][2]; 489 score += FLYSCORES( i, 2 );
489 break; 490 break;
@@ -696,8 +697,8 @@ void SFCave :: draw()
696 p.setPen( Qt::blue ); 697 p.setPen( Qt::blue );
697 for ( int j = 1 ; j < 10 && flyScores[j][0] != -1 ; ++j ) 698 for ( int j = 1 ; j < 10 && FLYSCORES( j, 0 ) != -1 ; ++j )
698 { 699 {
699 if ( flyScores[j][2] < 0 ) 700 if ( FLYSCORES( j, 2 ) < 0 )
700 p.setPen( Qt::red ); 701 p.setPen( Qt::red );
701 702
702 p.drawLine( (i*segSize) - (offset*speed), mapBottom[i]-flyScores[j][0], ((i+1)*segSize)-(offset*speed), mapBottom[i+1]-flyScores[j][0] ); 703 p.drawLine( (i*segSize) - (offset*speed), mapBottom[i]-FLYSCORES( j, 0 ), ((i+1)*segSize)-(offset*speed), mapBottom[i+1]-FLYSCORES( j, 0 ) );
703 } 704 }
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:
52 static int flyHardScores[7][3]; 52 static int flyHardScores[7][3];
53 int flyScores[7][3]; 53 int *flyScores;
54 54