From ab9fd1840b8025336081bd72fb9dbaea7b9909dd Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Sat, 28 Aug 2010 21:46:45 +0000 Subject: plugins: use lcd_putsf/lcd_putsxyf git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27926 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/nim.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'apps/plugins/nim.c') 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 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;isnprintf(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); } -- cgit v1.2.3