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.zip
rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.tar.gz
rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.tar.bz2
rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.tar.xz
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 3a3a870..70cf8dc 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
static unsigned char pattern2[]={0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14}; /*2 parts*/
static unsigned char pattern1[]={0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}; /*1 part*/
-static unsigned char str[12]; /*String use to display the first line*/
static unsigned long hsmile,hcry,h1,h2; /*Handle for the new pattern*/
static bool end; /*If true game is finished*/
@@ -101,8 +100,7 @@ static void display_first_line(int x)
{
int i;
- rb->snprintf(str,sizeof(str)," =%d",x);
- rb->lcd_puts(0,0,str);
+ rb->lcd_putsf(0,0," =%d",x);
rb->lcd_define_pattern(h1,pattern3);
for (i=0;i<x/3;i++)
@@ -179,8 +177,7 @@ enum plugin_status plugin_start(const void* parameter)
y=1;
display_first_line(x);
- rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y);
- rb->lcd_puts(0,1,str);
+ rb->lcd_putsf(0,1,"[%d..%d]?=%d",min,v,y);
rb->lcd_update();
go=false;
@@ -215,8 +212,7 @@ enum plugin_status plugin_start(const void* parameter)
break;
}
display_first_line(x);
- rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y);
- rb->lcd_puts(0,1,str);
+ rb->lcd_putsf(0,1,"[%d..%d]?=%d",min,v,y);
rb->lcd_update();
}
@@ -276,8 +272,7 @@ enum plugin_status plugin_start(const void* parameter)
}
v=y*2;
x-=y;
- rb->snprintf(str,sizeof(str),"I take=%d",y);
- rb->lcd_puts(0,1,str);
+ rb->lcd_putsf(0,1,"I take=%d",y);
rb->lcd_update();
rb->sleep(HZ);
}