diff options
Diffstat (limited to 'apps/plugins/nim.c')
-rw-r--r-- | apps/plugins/nim.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/apps/plugins/nim.c b/apps/plugins/nim.c index 3a3a870dad..70cf8dcec4 100644 --- a/apps/plugins/nim.c +++ b/apps/plugins/nim.c | |||
@@ -56,7 +56,6 @@ static unsigned char pattern3[]={0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15}; /*3 | |||
56 | static unsigned char pattern2[]={0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14}; /*2 parts*/ | 56 | static unsigned char pattern2[]={0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14}; /*2 parts*/ |
57 | static unsigned char pattern1[]={0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}; /*1 part*/ | 57 | static unsigned char pattern1[]={0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}; /*1 part*/ |
58 | 58 | ||
59 | static unsigned char str[12]; /*String use to display the first line*/ | ||
60 | static unsigned long hsmile,hcry,h1,h2; /*Handle for the new pattern*/ | 59 | static unsigned long hsmile,hcry,h1,h2; /*Handle for the new pattern*/ |
61 | 60 | ||
62 | static bool end; /*If true game is finished*/ | 61 | static bool end; /*If true game is finished*/ |
@@ -101,8 +100,7 @@ static void display_first_line(int x) | |||
101 | { | 100 | { |
102 | int i; | 101 | int i; |
103 | 102 | ||
104 | rb->snprintf(str,sizeof(str)," =%d",x); | 103 | rb->lcd_putsf(0,0," =%d",x); |
105 | rb->lcd_puts(0,0,str); | ||
106 | 104 | ||
107 | rb->lcd_define_pattern(h1,pattern3); | 105 | rb->lcd_define_pattern(h1,pattern3); |
108 | for (i=0;i<x/3;i++) | 106 | for (i=0;i<x/3;i++) |
@@ -179,8 +177,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
179 | y=1; | 177 | y=1; |
180 | display_first_line(x); | 178 | display_first_line(x); |
181 | 179 | ||
182 | rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y); | 180 | rb->lcd_putsf(0,1,"[%d..%d]?=%d",min,v,y); |
183 | rb->lcd_puts(0,1,str); | ||
184 | rb->lcd_update(); | 181 | rb->lcd_update(); |
185 | 182 | ||
186 | go=false; | 183 | go=false; |
@@ -215,8 +212,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
215 | break; | 212 | break; |
216 | } | 213 | } |
217 | display_first_line(x); | 214 | display_first_line(x); |
218 | rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y); | 215 | rb->lcd_putsf(0,1,"[%d..%d]?=%d",min,v,y); |
219 | rb->lcd_puts(0,1,str); | ||
220 | rb->lcd_update(); | 216 | rb->lcd_update(); |
221 | } | 217 | } |
222 | 218 | ||
@@ -276,8 +272,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
276 | } | 272 | } |
277 | v=y*2; | 273 | v=y*2; |
278 | x-=y; | 274 | x-=y; |
279 | rb->snprintf(str,sizeof(str),"I take=%d",y); | 275 | rb->lcd_putsf(0,1,"I take=%d",y); |
280 | rb->lcd_puts(0,1,str); | ||
281 | rb->lcd_update(); | 276 | rb->lcd_update(); |
282 | rb->sleep(HZ); | 277 | rb->sleep(HZ); |
283 | } | 278 | } |