Diffstat (limited to 'noncore/games/sfcave/sfcave.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/sfcave/sfcave.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/noncore/games/sfcave/sfcave.cpp b/noncore/games/sfcave/sfcave.cpp index d5aa38a..a6c92a0 100644 --- a/noncore/games/sfcave/sfcave.cpp +++ b/noncore/games/sfcave/sfcave.cpp | |||
@@ -1,34 +1,34 @@ | |||
1 | #include <stdio.h> | 1 | #include <stdio.h> |
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | #include <math.h> | 3 | #include <math.h> |
4 | #include <time.h> | 4 | #include <time.h> |
5 | 5 | ||
6 | #include <opie2/oapplicationfactory.h> | 6 | #include <opie2/oapplicationfactory.h> |
7 | #include <qpe/qpeapplication.h> | ||
7 | #include <qpe/config.h> | 8 | #include <qpe/config.h> |
8 | #include <qpe/global.h> | 9 | #include <qpe/global.h> |
9 | 10 | ||
10 | #include <qapplication.h> | ||
11 | #include <qdir.h> | 11 | #include <qdir.h> |
12 | 12 | ||
13 | #include "helpwindow.h" | 13 | #include "helpwindow.h" |
14 | #include "sfcave.h" | 14 | #include "sfcave.h" |
15 | 15 | ||
16 | #define CAPTION "SFCave 1.13 by AndyQ" | 16 | #define CAPTION "SFCave 1.13 by AndyQ" |
17 | 17 | ||
18 | #define UP_THRUST 0.6 | 18 | #define UP_THRUST 0.6 |
19 | #define NO_THRUST 0.8 | 19 | #define NO_THRUST 0.8 |
20 | #define MAX_DOWN_THRUST 4.0 | 20 | #define MAX_DOWN_THRUST 4.0 |
21 | #define MAX_UP_THRUST -3.5 | 21 | #define MAX_UP_THRUST -3.5 |
22 | 22 | ||
23 | // States | 23 | // States |
24 | #define STATE_BOSS 0 | 24 | #define STATE_BOSS 0 |
25 | #define STATE_RUNNING 1 | 25 | #define STATE_RUNNING 1 |
26 | #define STATE_CRASHING 2 | 26 | #define STATE_CRASHING 2 |
27 | #define STATE_CRASHED 3 | 27 | #define STATE_CRASHED 3 |
28 | #define STATE_NEWGAME 4 | 28 | #define STATE_NEWGAME 4 |
29 | #define STATE_MENU 5 | 29 | #define STATE_MENU 5 |
30 | #define STATE_REPLAY 6 | 30 | #define STATE_REPLAY 6 |
31 | 31 | ||
32 | // Menus | 32 | // Menus |
33 | #define MENU_MAIN_MENU 0 | 33 | #define MENU_MAIN_MENU 0 |
34 | #define MENU_OPTIONS_MENU 1 | 34 | #define MENU_OPTIONS_MENU 1 |
@@ -1118,51 +1118,50 @@ void SFCave :: dealWithMenuSelection() | |||
1118 | { | 1118 | { |
1119 | switch( currentMenuNr ) | 1119 | switch( currentMenuNr ) |
1120 | { | 1120 | { |
1121 | case MENU_MAIN_MENU: | 1121 | case MENU_MAIN_MENU: |
1122 | { | 1122 | { |
1123 | switch( currentMenuOption[currentMenuNr] ) | 1123 | switch( currentMenuOption[currentMenuNr] ) |
1124 | { | 1124 | { |
1125 | case MENU_START_GAME: | 1125 | case MENU_START_GAME: |
1126 | state = STATE_NEWGAME; | 1126 | state = STATE_NEWGAME; |
1127 | break; | 1127 | break; |
1128 | 1128 | ||
1129 | case MENU_REPLAY: | 1129 | case MENU_REPLAY: |
1130 | currentMenuNr = MENU_REPLAY_MENU; | 1130 | currentMenuNr = MENU_REPLAY_MENU; |
1131 | currentMenuOption[currentMenuNr] = 0; | 1131 | currentMenuOption[currentMenuNr] = 0; |
1132 | break; | 1132 | break; |
1133 | 1133 | ||
1134 | case MENU_OPTIONS: | 1134 | case MENU_OPTIONS: |
1135 | currentMenuNr = MENU_OPTIONS_MENU; | 1135 | currentMenuNr = MENU_OPTIONS_MENU; |
1136 | currentMenuOption[currentMenuNr] = 0; | 1136 | currentMenuOption[currentMenuNr] = 0; |
1137 | break; | 1137 | break; |
1138 | 1138 | ||
1139 | case MENU_HELP: | 1139 | case MENU_HELP: |
1140 | { | 1140 | { |
1141 | // Display Help Menu | 1141 | // Display Help Menu |
1142 | HelpWindow *dlg = new HelpWindow( this ); | 1142 | HelpWindow *win = new HelpWindow( ); |
1143 | dlg->exec(); | 1143 | QPEApplication::showWidget( win ); |
1144 | delete dlg; | ||
1145 | break; | 1144 | break; |
1146 | } | 1145 | } |
1147 | 1146 | ||
1148 | case MENU_QUIT: | 1147 | case MENU_QUIT: |
1149 | QApplication::exit(); | 1148 | QApplication::exit(); |
1150 | break; | 1149 | break; |
1151 | } | 1150 | } |
1152 | 1151 | ||
1153 | break; | 1152 | break; |
1154 | } | 1153 | } |
1155 | 1154 | ||
1156 | case MENU_OPTIONS_MENU: | 1155 | case MENU_OPTIONS_MENU: |
1157 | { | 1156 | { |
1158 | switch( currentMenuOption[currentMenuNr] ) | 1157 | switch( currentMenuOption[currentMenuNr] ) |
1159 | { | 1158 | { |
1160 | case MENU_GAME_TYPE: | 1159 | case MENU_GAME_TYPE: |
1161 | break; | 1160 | break; |
1162 | 1161 | ||
1163 | case MENU_GAME_DIFFICULTY: | 1162 | case MENU_GAME_DIFFICULTY: |
1164 | break; | 1163 | break; |
1165 | 1164 | ||
1166 | case MENU_CLEAR_HIGHSCORES: | 1165 | case MENU_CLEAR_HIGHSCORES: |
1167 | for ( int i = 0 ; i < 3 ; ++i ) | 1166 | for ( int i = 0 ; i < 3 ; ++i ) |
1168 | highestScore[currentGameType][i] = 0; | 1167 | highestScore[currentGameType][i] = 0; |