summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/star.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index 1c2501d6a4..069981868b 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -512,8 +512,6 @@ void star_display_text(char *str, bool waitkey)
512/** 512/**
513 * Do a pretty transition from one level to another. 513 * Do a pretty transition from one level to another.
514 */ 514 */
515#if !defined(GIGABEAT_F) || defined(SIMULATOR)
516/* FIXME: this crashes on the Gigabeat but not in the sim */
517static void star_transition_update(void) 515static void star_transition_update(void)
518{ 516{
519 const int center_x = LCD_WIDTH / 2; 517 const int center_x = LCD_WIDTH / 2;
@@ -537,10 +535,16 @@ static void star_transition_update(void)
537 var_y -= LCD_WIDTH; 535 var_y -= LCD_WIDTH;
538 y+=step; 536 y+=step;
539 } 537 }
540 rb->lcd_update_rect(center_x - x, center_y - y, x*2, step); 538 if( x )
541 rb->lcd_update_rect(center_x - x, center_y - y, step, y*2); 539 {
542 rb->lcd_update_rect(center_x + x - step, center_y - y, step, y*2); 540 rb->lcd_update_rect(center_x - x, center_y - y, x*2, step);
543 rb->lcd_update_rect(center_x - x, center_y + y - step, x*2, step); 541 rb->lcd_update_rect(center_x - x, center_y + y - step, x*2, step);
542 }
543 if( y )
544 {
545 rb->lcd_update_rect(center_x - x, center_y - y, step, y*2);
546 rb->lcd_update_rect(center_x + x - step, center_y - y, step, y*2);
547 }
544 STAR_SLEEP 548 STAR_SLEEP
545 } 549 }
546#else 550#else
@@ -555,16 +559,21 @@ static void star_transition_update(void)
555 var_x -= LCD_HEIGHT; 559 var_x -= LCD_HEIGHT;
556 x++; 560 x++;
557 } 561 }
558 rb->lcd_update_rect(center_x - x, center_y - y, x * 2, 1); 562 if( x )
559 rb->lcd_update_rect(center_x - x, center_y - y, 1, y * 2); 563 {
560 rb->lcd_update_rect(center_x + x - 1, center_y - y, 1, y * 2); 564 rb->lcd_update_rect(center_x - x, center_y - y, x * 2, 1);
561 rb->lcd_update_rect(center_x - x, center_y + y - 1, x * 2, 1); 565 rb->lcd_update_rect(center_x - x, center_y + y - 1, x * 2, 1);
566 }
567 if( y )
568 {
569 rb->lcd_update_rect(center_x - x, center_y - y, 1, y * 2);
570 rb->lcd_update_rect(center_x + x - 1, center_y - y, 1, y * 2);
571 }
562 STAR_SLEEP 572 STAR_SLEEP
563 } 573 }
564#endif 574#endif
565 rb->lcd_update(); 575 rb->lcd_update();
566} 576}
567#endif
568 577
569/** 578/**
570 * Display information board of the current level. 579 * Display information board of the current level.
@@ -666,11 +675,7 @@ static int star_load_level(int current_level)
666 ptr_tab++; 675 ptr_tab++;
667 } 676 }
668 star_display_board_info(current_level); 677 star_display_board_info(current_level);
669#if !defined(GIGABEAT_F) || defined(SIMULATOR)
670 star_transition_update(); 678 star_transition_update();
671#else
672 rb->lcd_update();
673#endif
674 return 1; 679 return 1;
675} 680}
676 681