diff options
Diffstat (limited to 'Classes/GameModeSelectionLayer.m')
-rw-r--r-- | Classes/GameModeSelectionLayer.m | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/Classes/GameModeSelectionLayer.m b/Classes/GameModeSelectionLayer.m index 4c4845d..db08146 100644 --- a/Classes/GameModeSelectionLayer.m +++ b/Classes/GameModeSelectionLayer.m | |||
@@ -49,19 +49,7 @@ | |||
49 | 49 | ||
50 | if ([defaults boolForKey:@"hasDoneTutorial"]) | 50 | if ([defaults boolForKey:@"hasDoneTutorial"]) |
51 | { | 51 | { |
52 | const char* sqlQuery = "SELECT * FROM highscores ORDER BY score DESC LIMIT 1"; | 52 | collectSelection = [GameModeSelection selectionWithName:@"Collect" location:@"Paris" filename:@"paris" unlocked:YES]; |
53 | sqlite3_stmt* compiled_statement; | ||
54 | int score = 0; | ||
55 | |||
56 | if (sqlite3_prepare_v2([Cart_CollectAppDelegate database], sqlQuery, -1, &compiled_statement, NULL) == SQLITE_OK) | ||
57 | { | ||
58 | if (sqlite3_step(compiled_statement) == SQLITE_ROW) | ||
59 | { | ||
60 | score = sqlite3_column_int(compiled_statement, 2); | ||
61 | } | ||
62 | } | ||
63 | |||
64 | collectSelection = [GameModeSelection selectionWithName:@"Collect" location:@"Paris" filename:@"paris" highscore:score]; | ||
65 | } else { | 53 | } else { |
66 | collectSelection = [GameModeSelection selectionWithName:@"Collect" location:@"Paris" filename:@"paris" unlockCondition:@"Beat the tutorial!"]; | 54 | collectSelection = [GameModeSelection selectionWithName:@"Collect" location:@"Paris" filename:@"paris" unlockCondition:@"Beat the tutorial!"]; |
67 | } | 55 | } |