summaryrefslogtreecommitdiff
path: root/apps/plugins/xobox.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-08-28 21:46:45 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-08-28 21:46:45 +0000
commitab9fd1840b8025336081bd72fb9dbaea7b9909dd (patch)
tree4c410bffcf1a9de2ce55a59bef45e3ecfa183a62 /apps/plugins/xobox.c
parent8418a2c94a97da1d6f42f21dc348aadd1e177d77 (diff)
plugins: use lcd_putsf/lcd_putsxyf
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27926 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/xobox.c')
-rw-r--r--apps/plugins/xobox.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c
index 871cb2bdf5..e93a820b71 100644
--- a/apps/plugins/xobox.c
+++ b/apps/plugins/xobox.c
@@ -549,7 +549,7 @@ static int percentage (void)
static void refresh_board (void)
{
int i, j;
- char str[25];
+ int x;
#if LCD_DEPTH>=2
rb->lcd_set_background (LCD_BLACK);
@@ -590,21 +590,18 @@ static void refresh_board (void)
#else
rb->lcd_set_drawmode (DRMODE_COMPLEMENT);
#endif
- rb->snprintf (str, sizeof (str), "Level %d", player.level + 1);
- rb->lcd_putsxy (BOARD_X, BOARD_Y, str);
- rb->snprintf (str, sizeof (str), "%d%%", percentage_cache);
- rb->lcd_putsxy (BOARD_X + CUBE_SIZE * BOARD_W - 24, BOARD_Y, str);
- rb->snprintf (str, sizeof (str), "Score: %d", player.score);
- rb->lcd_putsxy (BOARD_X, BOARD_Y + CUBE_SIZE * BOARD_H - 8, str);
- rb->snprintf (str, sizeof (str),
- (player.lives != 1) ? "%d Lives" : "%d Life", player.lives);
+ rb->lcd_putsxyf (BOARD_X, BOARD_Y, "Level %d", player.level + 1);
+ rb->lcd_putsxyf (BOARD_X + CUBE_SIZE * BOARD_W - 24, BOARD_Y, "%d%%",
+ percentage_cache);
+ rb->lcd_putsxyf (BOARD_X, BOARD_Y + CUBE_SIZE * BOARD_H - 8, "Score: %d",
+ player.score);
#if LCD_DEPTH>=2
- rb->lcd_putsxy (BOARD_X + CUBE_SIZE * BOARD_W - 60,
- BOARD_Y + CUBE_SIZE * BOARD_H - 8, str);
+ x = BOARD_X + CUBE_SIZE * BOARD_W - 60;
#else
- rb->lcd_putsxy (BOARD_X + CUBE_SIZE * BOARD_W - 40,
- BOARD_Y + CUBE_SIZE * BOARD_H - 8, str);
+ x = BOARD_X + CUBE_SIZE * BOARD_W - 40;
#endif
+ rb->lcd_putsxyf (x, BOARD_Y + CUBE_SIZE * BOARD_H - 8,
+ (player.lives != 1) ? "%d Lives" : "%d Life", player.lives);
#if LCD_DEPTH>=2
rb->lcd_set_foreground (PLR_COL);