From d8f00310e486aed1ab289a0f816acec571193c32 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Wed, 24 Aug 2011 11:53:40 -0400 Subject: Added support for multiple local highscore lists This revision increments the database version to 2. Also fixed a small problem with GameModeSelection that aligned the highscore text incorrectly. --- Classes/GameModeSelectionLayer.m | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'Classes/GameModeSelectionLayer.m') 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 @@ if ([defaults boolForKey:@"hasDoneTutorial"]) { - const char* sqlQuery = "SELECT * FROM highscores ORDER BY score DESC LIMIT 1"; - sqlite3_stmt* compiled_statement; - int score = 0; - - if (sqlite3_prepare_v2([Cart_CollectAppDelegate database], sqlQuery, -1, &compiled_statement, NULL) == SQLITE_OK) - { - if (sqlite3_step(compiled_statement) == SQLITE_ROW) - { - score = sqlite3_column_int(compiled_statement, 2); - } - } - - collectSelection = [GameModeSelection selectionWithName:@"Collect" location:@"Paris" filename:@"paris" highscore:score]; + collectSelection = [GameModeSelection selectionWithName:@"Collect" location:@"Paris" filename:@"paris" unlocked:YES]; } else { collectSelection = [GameModeSelection selectionWithName:@"Collect" location:@"Paris" filename:@"paris" unlockCondition:@"Beat the tutorial!"]; } -- cgit 1.4.1