summaryrefslogtreecommitdiff
path: root/apps/plugins/brickmania.c
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2010-02-27 14:45:37 +0000
committerTeruaki Kawashima <teru@rockbox.org>2010-02-27 14:45:37 +0000
commit3f8d4a5a0f0ee98bc5299c6eb83e0461beebe5a6 (patch)
tree1bbcb42380b27662ad48ca27b346efaf068c2ebb /apps/plugins/brickmania.c
parentc3abab85acc0933615360225d23b69a078c5d186 (diff)
use same variable/macro name for highscore among plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24941 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/brickmania.c')
-rw-r--r--apps/plugins/brickmania.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c
index f39d9b03c7..f932e4563a 100644
--- a/apps/plugins/brickmania.c
+++ b/apps/plugins/brickmania.c
@@ -425,8 +425,8 @@ CONFIG_KEYPAD == SANSA_M200_PAD
#define CONFIG_FILE_NAME "brickmania.cfg"
#define SAVE_FILE PLUGIN_GAMES_DIR "/brickmania.save"
-#define HIGH_SCORE_FILE PLUGIN_GAMES_DIR "/brickmania.score"
-#define NUM_HIGH_SCORES 5
+#define SCORE_FILE PLUGIN_GAMES_DIR "/brickmania.score"
+#define NUM_SCORES 5
/*
@@ -981,7 +981,7 @@ static struct configdata config[] =
{TYPE_INT, 0, 1, { .int_p = &difficulty }, "difficulty", NULL},
};
-struct highscore highest[NUM_HIGH_SCORES];
+static struct highscore highscores[NUM_SCORES];
/*
@@ -1381,7 +1381,7 @@ static int brickmania_menu(void)
return 1;
break;
case 4:
- highscore_show(NUM_HIGH_SCORES, highest, NUM_HIGH_SCORES, true);
+ highscore_show(-1, highscores, NUM_SCORES, true);
break;
case 5:
if (playback_control(NULL))
@@ -2337,7 +2337,7 @@ enum plugin_status plugin_start(const void* parameter)
(void)parameter;
int last_difficulty;
- highscore_load(HIGH_SCORE_FILE,highest,NUM_HIGH_SCORES);
+ highscore_load(SCORE_FILE, highscores, NUM_SCORES);
configfile_load(CONFIG_FILE_NAME,config,1,0);
last_difficulty = difficulty;
@@ -2360,16 +2360,13 @@ enum plugin_status plugin_start(const void* parameter)
{
if(!resume)
{
- int position = highscore_update(score, level+1, "", highest,
- NUM_HIGH_SCORES);
- if (position == 0)
- {
- rb->splash(HZ*2, "New High Score");
- }
-
+ int position = highscore_update(score, level+1, "",
+ highscores, NUM_SCORES);
if (position != -1)
{
- highscore_show(position, highest, NUM_HIGH_SCORES, true);
+ if (position == 0)
+ rb->splash(HZ*2, "New High Score");
+ highscore_show(position, highscores, NUM_SCORES, true);
}
else
{
@@ -2378,7 +2375,7 @@ enum plugin_status plugin_start(const void* parameter)
}
}
- highscore_save(HIGH_SCORE_FILE,highest,NUM_HIGH_SCORES);
+ highscore_save(SCORE_FILE, highscores, NUM_SCORES);
if(last_difficulty != difficulty)
configfile_save(CONFIG_FILE_NAME,config,1,0);
/* Restore user's original backlight setting */