summaryrefslogtreecommitdiff
path: root/apps/plugins/nim.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/nim.c
parent8418a2c94a97da1d6f42f21dc348aadd1e177d77 (diff)
downloadrockbox-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/nim.c')
-rw-r--r--apps/plugins/nim.c13
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
56static unsigned char pattern2[]={0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14}; /*2 parts*/ 56static unsigned char pattern2[]={0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14}; /*2 parts*/
57static unsigned char pattern1[]={0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}; /*1 part*/ 57static unsigned char pattern1[]={0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}; /*1 part*/
58 58
59static unsigned char str[12]; /*String use to display the first line*/
60static unsigned long hsmile,hcry,h1,h2; /*Handle for the new pattern*/ 59static unsigned long hsmile,hcry,h1,h2; /*Handle for the new pattern*/
61 60
62static bool end; /*If true game is finished*/ 61static 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 }