diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-28 21:46:45 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-28 21:46:45 +0000 |
commit | ab9fd1840b8025336081bd72fb9dbaea7b9909dd (patch) | |
tree | 4c410bffcf1a9de2ce55a59bef45e3ecfa183a62 /apps/plugins/xobox.c | |
parent | 8418a2c94a97da1d6f42f21dc348aadd1e177d77 (diff) | |
download | rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.tar.gz rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.zip |
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.c | 23 |
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) | |||
549 | static void refresh_board (void) | 549 | static void refresh_board (void) |
550 | { | 550 | { |
551 | int i, j; | 551 | int i, j; |
552 | char str[25]; | 552 | int x; |
553 | 553 | ||
554 | #if LCD_DEPTH>=2 | 554 | #if LCD_DEPTH>=2 |
555 | rb->lcd_set_background (LCD_BLACK); | 555 | rb->lcd_set_background (LCD_BLACK); |
@@ -590,21 +590,18 @@ static void refresh_board (void) | |||
590 | #else | 590 | #else |
591 | rb->lcd_set_drawmode (DRMODE_COMPLEMENT); | 591 | rb->lcd_set_drawmode (DRMODE_COMPLEMENT); |
592 | #endif | 592 | #endif |
593 | rb->snprintf (str, sizeof (str), "Level %d", player.level + 1); | 593 | rb->lcd_putsxyf (BOARD_X, BOARD_Y, "Level %d", player.level + 1); |
594 | rb->lcd_putsxy (BOARD_X, BOARD_Y, str); | 594 | rb->lcd_putsxyf (BOARD_X + CUBE_SIZE * BOARD_W - 24, BOARD_Y, "%d%%", |
595 | rb->snprintf (str, sizeof (str), "%d%%", percentage_cache); | 595 | percentage_cache); |
596 | rb->lcd_putsxy (BOARD_X + CUBE_SIZE * BOARD_W - 24, BOARD_Y, str); | 596 | rb->lcd_putsxyf (BOARD_X, BOARD_Y + CUBE_SIZE * BOARD_H - 8, "Score: %d", |
597 | rb->snprintf (str, sizeof (str), "Score: %d", player.score); | 597 | player.score); |
598 | rb->lcd_putsxy (BOARD_X, BOARD_Y + CUBE_SIZE * BOARD_H - 8, str); | ||
599 | rb->snprintf (str, sizeof (str), | ||
600 | (player.lives != 1) ? "%d Lives" : "%d Life", player.lives); | ||
601 | #if LCD_DEPTH>=2 | 598 | #if LCD_DEPTH>=2 |
602 | rb->lcd_putsxy (BOARD_X + CUBE_SIZE * BOARD_W - 60, | 599 | x = BOARD_X + CUBE_SIZE * BOARD_W - 60; |
603 | BOARD_Y + CUBE_SIZE * BOARD_H - 8, str); | ||
604 | #else | 600 | #else |
605 | rb->lcd_putsxy (BOARD_X + CUBE_SIZE * BOARD_W - 40, | 601 | x = BOARD_X + CUBE_SIZE * BOARD_W - 40; |
606 | BOARD_Y + CUBE_SIZE * BOARD_H - 8, str); | ||
607 | #endif | 602 | #endif |
603 | rb->lcd_putsxyf (x, BOARD_Y + CUBE_SIZE * BOARD_H - 8, | ||
604 | (player.lives != 1) ? "%d Lives" : "%d Life", player.lives); | ||
608 | 605 | ||
609 | #if LCD_DEPTH>=2 | 606 | #if LCD_DEPTH>=2 |
610 | rb->lcd_set_foreground (PLR_COL); | 607 | rb->lcd_set_foreground (PLR_COL); |