diff options
Diffstat (limited to 'apps/plugins/blackjack.c')
-rw-r--r-- | apps/plugins/blackjack.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c index 8b28b815b8..42f73ff47c 100644 --- a/apps/plugins/blackjack.c +++ b/apps/plugins/blackjack.c | |||
@@ -946,7 +946,6 @@ static signed int blackjack_get_amount(char message[20], signed int lower_limit, | |||
946 | signed int upper_limit, | 946 | signed int upper_limit, |
947 | signed int start) { | 947 | signed int start) { |
948 | int button; | 948 | int button; |
949 | char str[9]; | ||
950 | bool breakout = false, changed = false; | 949 | bool breakout = false, changed = false; |
951 | unsigned int w, h; | 950 | unsigned int w, h; |
952 | signed int amount; | 951 | signed int amount; |
@@ -968,8 +967,7 @@ static signed int blackjack_get_amount(char message[20], signed int lower_limit, | |||
968 | #if LCD_HEIGHT <= 64 | 967 | #if LCD_HEIGHT <= 64 |
969 | rb->lcd_clear_display(); | 968 | rb->lcd_clear_display(); |
970 | rb->lcd_puts(0, 1, message); | 969 | rb->lcd_puts(0, 1, message); |
971 | rb->snprintf(str, 9, "$%d", amount); | 970 | rb->lcd_putsf(0, 2, "$%d", amount); |
972 | rb->lcd_puts(0, 2, str); | ||
973 | rb->lcd_puts(0, 3, "RIGHT: +1"); | 971 | rb->lcd_puts(0, 3, "RIGHT: +1"); |
974 | rb->lcd_puts(0, 4, "LEFT: -1"); | 972 | rb->lcd_puts(0, 4, "LEFT: -1"); |
975 | rb->lcd_puts(0, 5, "UP: +10"); | 973 | rb->lcd_puts(0, 5, "UP: +10"); |
@@ -983,8 +981,7 @@ static signed int blackjack_get_amount(char message[20], signed int lower_limit, | |||
983 | rb->lcd_drawrect(LCD_WIDTH/2 - 9*w - 1, LCD_HEIGHT/2 - 4*h - 3, | 981 | rb->lcd_drawrect(LCD_WIDTH/2 - 9*w - 1, LCD_HEIGHT/2 - 4*h - 3, |
984 | 37*w / 2, 8*h -3); | 982 | 37*w / 2, 8*h -3); |
985 | rb->lcd_putsxy(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 4*h - 1, message); | 983 | rb->lcd_putsxy(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 4*h - 1, message); |
986 | rb->snprintf(str, 9, "$%d", amount); | 984 | rb->lcd_putsxyf(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, "$%d", amount); |
987 | rb->lcd_putsxy(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, str); | ||
988 | #if (CONFIG_KEYPAD == IPOD_4G_PAD) || \ | 985 | #if (CONFIG_KEYPAD == IPOD_4G_PAD) || \ |
989 | (CONFIG_KEYPAD == IPOD_3G_PAD) || \ | 986 | (CONFIG_KEYPAD == IPOD_3G_PAD) || \ |
990 | (CONFIG_KEYPAD == IPOD_1G2G_PAD) || \ | 987 | (CONFIG_KEYPAD == IPOD_1G2G_PAD) || \ |
@@ -1063,15 +1060,14 @@ static signed int blackjack_get_amount(char message[20], signed int lower_limit, | |||
1063 | } | 1060 | } |
1064 | 1061 | ||
1065 | if(changed) { | 1062 | if(changed) { |
1066 | rb->snprintf(str, 9, "$%d", amount); | ||
1067 | #if LCD_HEIGHT <= 64 | 1063 | #if LCD_HEIGHT <= 64 |
1068 | rb->lcd_puts(0, 2, str); | 1064 | rb->lcd_putsf(0, 2, "$%d", amount); |
1069 | rb->lcd_update(); | 1065 | rb->lcd_update(); |
1070 | #else | 1066 | #else |
1071 | rb->lcd_set_drawmode(DRMODE_BG+DRMODE_INVERSEVID); | 1067 | rb->lcd_set_drawmode(DRMODE_BG+DRMODE_INVERSEVID); |
1072 | rb->lcd_fillrect(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, 5*w, h); | 1068 | rb->lcd_fillrect(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, 5*w, h); |
1073 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1069 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1074 | rb->lcd_putsxy(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, str); | 1070 | rb->lcd_putsxyf(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, "$%d", amount); |
1075 | rb->lcd_update_rect(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, 5*w, h); | 1071 | rb->lcd_update_rect(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, 5*w, h); |
1076 | #endif | 1072 | #endif |
1077 | changed = false; | 1073 | changed = false; |