Update of /cvsroot/rockbox/apps/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv4785/apps/plugins
Modified Files:
bounce.c
Log Message:
The conversion to plugin broke the Bounce demo
Index: bounce.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/bounce.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- bounce.c 29 Jun 2003 16:33:04 -0000 1.1
+++ bounce.c 30 Jun 2003 02:07:20 -0000 1.2
@@ -231,6 +231,7 @@
int textpos=0;
char* rock="Rockbox! Pure pleasure. Pure fun. Oooh. What fun! ;-) ";
+ unsigned int rocklen = rb->strlen(rock);
int letter;
rb->lcd_clear_display();
@@ -245,7 +246,7 @@
rb->lcd_clear_display();
for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) {
- letter = rock[(i+textpos) % (sizeof(rock)-1) ];
+ letter = rock[(i+textpos) % rocklen ];
rb->lcd_bitmap((char *)char_gen_12x16[letter-0x20],
xx, table[yy&63],
@@ -282,6 +283,7 @@
unsigned int xsanke=0;
char* rock="ROCKbox";
+ unsigned int rocklen = rb->strlen(rock);
int show=0;
int timeout=0;
@@ -334,7 +336,7 @@
timeout--;
}
for(i=0, yy=y, xx=x;
- i<sizeof(rock)-1;
+ i<rocklen;
i++, yy+=values[NUM_YDIST].num, xx+=values[NUM_XDIST].num)
rb->lcd_bitmap((char *)char_gen_12x16[rock[i]-0x20],
xtable[xx%71], table[yy&63],
|