summaryrefslogtreecommitdiff
path: root/apps/plugins/sokoban.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sokoban.c')
-rw-r--r--apps/plugins/sokoban.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c
index 6e94519803..1159402bac 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -982,14 +982,11 @@ static void update_screen(void)
982#define BOARD_WIDTH LCD_WIDTH 982#define BOARD_WIDTH LCD_WIDTH
983#define BOARD_HEIGHT (LCD_HEIGHT - STAT_HEIGHT) 983#define BOARD_HEIGHT (LCD_HEIGHT - STAT_HEIGHT)
984 rb->lcd_putsxy(STAT_X + 4, STAT_Y + 4, "Level"); 984 rb->lcd_putsxy(STAT_X + 4, STAT_Y + 4, "Level");
985 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.index + 1); 985 rb->lcd_putsxyf(STAT_X + 7, STAT_Y + 14, "%d", current_info.level.index + 1);
986 rb->lcd_putsxy(STAT_X + 7, STAT_Y + 14, buf);
987 rb->lcd_putsxy(STAT_X + 41, STAT_Y + 4, "Moves"); 986 rb->lcd_putsxy(STAT_X + 41, STAT_Y + 4, "Moves");
988 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.moves); 987 rb->lcd_putsxyf(STAT_X + 44, STAT_Y + 14, "%d", current_info.level.moves);
989 rb->lcd_putsxy(STAT_X + 44, STAT_Y + 14, buf);
990 rb->lcd_putsxy(STAT_X + 79, STAT_Y + 4, "Pushes"); 988 rb->lcd_putsxy(STAT_X + 79, STAT_Y + 4, "Pushes");
991 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.pushes); 989 rb->lcd_putsxyf(STAT_X + 82, STAT_Y + 14, "%d", current_info.level.pushes);
992 rb->lcd_putsxy(STAT_X + 82, STAT_Y + 14, buf);
993 990
994 rb->lcd_drawrect(STAT_X, STAT_Y, 38, STAT_HEIGHT); 991 rb->lcd_drawrect(STAT_X, STAT_Y, 38, STAT_HEIGHT);
995 rb->lcd_drawrect(STAT_X + 37, STAT_Y, 39, STAT_HEIGHT); 992 rb->lcd_drawrect(STAT_X + 37, STAT_Y, 39, STAT_HEIGHT);
@@ -1005,18 +1002,15 @@ static void update_screen(void)
1005#define BOARD_WIDTH (LCD_WIDTH - STAT_WIDTH) 1002#define BOARD_WIDTH (LCD_WIDTH - STAT_WIDTH)
1006#define BOARD_HEIGHT LCD_HEIGHT 1003#define BOARD_HEIGHT LCD_HEIGHT
1007 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 2, "Level"); 1004 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 2, "Level");
1008 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.index + 1); 1005 rb->lcd_putsxyf(STAT_X + 4, STAT_Y + 12, "%d", current_info.level.index + 1);
1009 rb->lcd_putsxy(STAT_X + 4, STAT_Y + 12, buf);
1010 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 23, "Moves"); 1006 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 23, "Moves");
1011 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.moves); 1007 rb->lcd_putsxyf(STAT_X + 4, STAT_Y + 33, "%d", current_info.level.moves);
1012 rb->lcd_putsxy(STAT_X + 4, STAT_Y + 33, buf);
1013#if STAT_WIDTH < 38 1008#if STAT_WIDTH < 38
1014 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 44, "Push"); 1009 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 44, "Push");
1015#else 1010#else
1016 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 44, "Pushes"); 1011 rb->lcd_putsxy(STAT_X + 1, STAT_Y + 44, "Pushes");
1017#endif 1012#endif
1018 rb->snprintf(buf, sizeof(buf), "%d", current_info.level.pushes); 1013 rb->lcd_putsxyf(STAT_X + 4, STAT_Y + 54, "%d", current_info.level.pushes);
1019 rb->lcd_putsxy(STAT_X + 4, STAT_Y + 54, buf);
1020 1014
1021 rb->lcd_drawrect(STAT_X, STAT_Y + 0, STAT_WIDTH, 64); 1015 rb->lcd_drawrect(STAT_X, STAT_Y + 0, STAT_WIDTH, 64);
1022 rb->lcd_hline(STAT_X, LCD_WIDTH - 1, STAT_Y + 21); 1016 rb->lcd_hline(STAT_X, LCD_WIDTH - 1, STAT_Y + 21);