diff options
Diffstat (limited to 'apps/plugins/bounce.c')
-rw-r--r-- | apps/plugins/bounce.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index 0c53d49887..c731764a63 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c | |||
@@ -231,6 +231,7 @@ static int scrollit(void) | |||
231 | int textpos=0; | 231 | int textpos=0; |
232 | 232 | ||
233 | char* rock="Rockbox! Pure pleasure. Pure fun. Oooh. What fun! ;-) "; | 233 | char* rock="Rockbox! Pure pleasure. Pure fun. Oooh. What fun! ;-) "; |
234 | unsigned int rocklen = rb->strlen(rock); | ||
234 | int letter; | 235 | int letter; |
235 | 236 | ||
236 | rb->lcd_clear_display(); | 237 | rb->lcd_clear_display(); |
@@ -245,7 +246,7 @@ static int scrollit(void) | |||
245 | rb->lcd_clear_display(); | 246 | rb->lcd_clear_display(); |
246 | 247 | ||
247 | for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) { | 248 | for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) { |
248 | letter = rock[(i+textpos) % (sizeof(rock)-1) ]; | 249 | letter = rock[(i+textpos) % rocklen ]; |
249 | 250 | ||
250 | rb->lcd_bitmap((char *)char_gen_12x16[letter-0x20], | 251 | rb->lcd_bitmap((char *)char_gen_12x16[letter-0x20], |
251 | xx, table[yy&63], | 252 | xx, table[yy&63], |
@@ -282,6 +283,7 @@ static int loopit(void) | |||
282 | unsigned int xsanke=0; | 283 | unsigned int xsanke=0; |
283 | 284 | ||
284 | char* rock="ROCKbox"; | 285 | char* rock="ROCKbox"; |
286 | unsigned int rocklen = rb->strlen(rock); | ||
285 | 287 | ||
286 | int show=0; | 288 | int show=0; |
287 | int timeout=0; | 289 | int timeout=0; |
@@ -334,7 +336,7 @@ static int loopit(void) | |||
334 | timeout--; | 336 | timeout--; |
335 | } | 337 | } |
336 | for(i=0, yy=y, xx=x; | 338 | for(i=0, yy=y, xx=x; |
337 | i<sizeof(rock)-1; | 339 | i<rocklen; |
338 | i++, yy+=values[NUM_YDIST].num, xx+=values[NUM_XDIST].num) | 340 | i++, yy+=values[NUM_YDIST].num, xx+=values[NUM_XDIST].num) |
339 | rb->lcd_bitmap((char *)char_gen_12x16[rock[i]-0x20], | 341 | rb->lcd_bitmap((char *)char_gen_12x16[rock[i]-0x20], |
340 | xtable[xx%71], table[yy&63], | 342 | xtable[xx%71], table[yy&63], |