summaryrefslogtreecommitdiffstats
path: root/apps/plugins/blackjack.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/blackjack.c
parentc3abab85acc0933615360225d23b69a078c5d186 (diff)
downloadrockbox-3f8d4a5a0f0ee98bc5299c6eb83e0461beebe5a6.tar.gz
rockbox-3f8d4a5a0f0ee98bc5299c6eb83e0461beebe5a6.tar.bz2
rockbox-3f8d4a5a0f0ee98bc5299c6eb83e0461beebe5a6.zip
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/blackjack.c')
-rw-r--r--apps/plugins/blackjack.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c
index 9a9c91cb0a..a8f92b9f5a 100644
--- a/apps/plugins/blackjack.c
+++ b/apps/plugins/blackjack.c
@@ -29,7 +29,7 @@
PLUGIN_HEADER
/* save files */
-#define HIGH_SCORE PLUGIN_GAMES_DIR "/blackjack.score"
+#define SCORE_FILE PLUGIN_GAMES_DIR "/blackjack.score"
#define SAVE_FILE PLUGIN_GAMES_DIR "/blackjack.save"
#define NUM_SCORES 5
@@ -491,7 +491,7 @@ typedef struct game_context {
static bool resume = false;
static bool resume_file = false;
-static struct highscore highest[NUM_SCORES];
+static struct highscore highscores[NUM_SCORES];
/*****************************************************************************
* blackjack_init() initializes blackjack data structures.
@@ -1200,7 +1200,7 @@ static unsigned int blackjack_menu(void) {
resume = false;
break;
case 2:
- highscore_show(NUM_SCORES, highest, NUM_SCORES, false);
+ highscore_show(-1, highscores, NUM_SCORES, false);
break;
case 3:
if(blackjack_help())
@@ -1488,7 +1488,7 @@ enum plugin_status plugin_start(const void* parameter)
#endif
/* load high scores */
- highscore_load(HIGH_SCORE,highest,NUM_SCORES);
+ highscore_load(SCORE_FILE, highscores, NUM_SCORES);
resume = blackjack_loadgame(&bj);
resume_file = resume;
@@ -1504,16 +1504,18 @@ enum plugin_status plugin_start(const void* parameter)
if(!resume && bj.player_money > 10) {
/* There is no level, so store -1 to blank column */
int position = highscore_update(bj.player_money, -1, "",
- highest, NUM_SCORES);
- if (position==0)
- rb->splash(HZ*2, "New High Score");
+ highscores, NUM_SCORES);
if (position != -1)
- highscore_show(position, highest, NUM_SCORES, false);
+ {
+ if (position==0)
+ rb->splash(HZ*2, "New High Score");
+ highscore_show(position, highscores, NUM_SCORES, false);
+ }
}
break;
case BJ_USB:
- highscore_save(HIGH_SCORE,highest,NUM_SCORES);
+ highscore_save(SCORE_FILE, highscores, NUM_SCORES);
return PLUGIN_USB_CONNECTED;
case BJ_QUIT:
@@ -1529,6 +1531,6 @@ enum plugin_status plugin_start(const void* parameter)
break;
}
}
- highscore_save(HIGH_SCORE,highest,NUM_SCORES);
+ highscore_save(SCORE_FILE, highscores, NUM_SCORES);
return PLUGIN_OK;
}