summaryrefslogtreecommitdiff
path: root/apps/plugins/star.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-07-06 22:58:02 +0000
committerJens Arnold <amiconn@rockbox.org>2005-07-06 22:58:02 +0000
commitf894a4c2691fbde1758a05407cb5eadcaec4a6c8 (patch)
tree46cb7ce63c794020175ab251cf0299663be8bf3c /apps/plugins/star.c
parent1076eb1d2720b88757616f642be0c39c6a3b76df (diff)
downloadrockbox-f894a4c2691fbde1758a05407cb5eadcaec4a6c8.tar.gz
rockbox-f894a4c2691fbde1758a05407cb5eadcaec4a6c8.zip
4-shades greyscale graphics core for iriver H1x0. 4-grey rockbox logo and light grey background in splash() boxes. Simplified the splash() box creation as the new graphics core does clipping. Adapted screendump feature and added flexible preprocessing to construct the bmp header. Rockboy now uses 4-grey mode as well. 4-grey support for win32 simulator. Fixed win32 player sim to not use double bitmap conversion via a recorder-like framebuffer, and correctly display double-height text. X11 simulator temporarily adapted. The display won't be distorted, but it still shows b&w only.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7046 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/star.c')
-rw-r--r--apps/plugins/star.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index 9b2e0bb010..9dd3659f52 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -485,11 +485,11 @@ static void star_display_board_info(void)
485 rb->lcd_putsxy(0, label_offset_y, str_info); 485 rb->lcd_putsxy(0, label_offset_y, str_info);
486 486
487 if (control == STAR_CONTROL_BALL) 487 if (control == STAR_CONTROL_BALL)
488 rb->lcd_bitmap (ball_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE, 488 rb->lcd_mono_bitmap (ball_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE,
489 STAR_TILE_SIZE); 489 STAR_TILE_SIZE);
490 else 490 else
491 rb->lcd_bitmap (block_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE, 491 rb->lcd_mono_bitmap (block_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE,
492 STAR_TILE_SIZE); 492 STAR_TILE_SIZE);
493 493
494 rb->lcd_update_rect(0, label_offset_y, LCD_WIDTH, char_height); 494 rb->lcd_update_rect(0, label_offset_y, LCD_WIDTH, char_height);
495} 495}
@@ -520,37 +520,37 @@ static int star_load_level(int current_level)
520 break; 520 break;
521 521
522 case STAR_WALL: 522 case STAR_WALL:
523 rb->lcd_bitmap (wall_bmp, 523 rb->lcd_mono_bitmap (wall_bmp,
524 STAR_OFFSET_X + x * STAR_TILE_SIZE, 524 STAR_OFFSET_X + x * STAR_TILE_SIZE,
525 STAR_OFFSET_Y + y * STAR_TILE_SIZE, 525 STAR_OFFSET_Y + y * STAR_TILE_SIZE,
526 STAR_TILE_SIZE, STAR_TILE_SIZE); 526 STAR_TILE_SIZE, STAR_TILE_SIZE);
527 break; 527 break;
528 528
529 case STAR_STAR: 529 case STAR_STAR:
530 rb->lcd_bitmap (star_bmp, 530 rb->lcd_mono_bitmap (star_bmp,
531 STAR_OFFSET_X + x * STAR_TILE_SIZE, 531 STAR_OFFSET_X + x * STAR_TILE_SIZE,
532 STAR_OFFSET_Y + y * STAR_TILE_SIZE, 532 STAR_OFFSET_Y + y * STAR_TILE_SIZE,
533 STAR_TILE_SIZE, STAR_TILE_SIZE); 533 STAR_TILE_SIZE, STAR_TILE_SIZE);
534 star_count++; 534 star_count++;
535 break; 535 break;
536 536
537 case STAR_BALL: 537 case STAR_BALL:
538 ball_x = x; 538 ball_x = x;
539 ball_y = y; 539 ball_y = y;
540 rb->lcd_bitmap (ball_bmp, 540 rb->lcd_mono_bitmap (ball_bmp,
541 STAR_OFFSET_X + x * STAR_TILE_SIZE, 541 STAR_OFFSET_X + x * STAR_TILE_SIZE,
542 STAR_OFFSET_Y + y * STAR_TILE_SIZE, 542 STAR_OFFSET_Y + y * STAR_TILE_SIZE,
543 STAR_TILE_SIZE, STAR_TILE_SIZE); 543 STAR_TILE_SIZE, STAR_TILE_SIZE);
544 break; 544 break;
545 545
546 546
547 case STAR_BLOCK: 547 case STAR_BLOCK:
548 block_x = x; 548 block_x = x;
549 block_y = y; 549 block_y = y;
550 rb->lcd_bitmap (block_bmp, 550 rb->lcd_mono_bitmap (block_bmp,
551 STAR_OFFSET_X + x * STAR_TILE_SIZE, 551 STAR_OFFSET_X + x * STAR_TILE_SIZE,
552 STAR_OFFSET_Y + y * STAR_TILE_SIZE, 552 STAR_OFFSET_Y + y * STAR_TILE_SIZE,
553 STAR_TILE_SIZE, STAR_TILE_SIZE); 553 STAR_TILE_SIZE, STAR_TILE_SIZE);
554 break; 554 break;
555 } 555 }
556 ptr_tab++; 556 ptr_tab++;
@@ -665,7 +665,7 @@ static int star_run_game(void)
665 { 665 {
666 for (i = 0 ; i < 7 ; i++) 666 for (i = 0 ; i < 7 ; i++)
667 { 667 {
668 rb->lcd_bitmap( 668 rb->lcd_mono_bitmap(
669 ball_bmp, 669 ball_bmp,
670 STAR_OFFSET_X + ball_x * STAR_TILE_SIZE + move_x * i, 670 STAR_OFFSET_X + ball_x * STAR_TILE_SIZE + move_x * i,
671 STAR_OFFSET_Y + ball_y * STAR_TILE_SIZE + move_y * i, 671 STAR_OFFSET_Y + ball_y * STAR_TILE_SIZE + move_y * i,
@@ -697,7 +697,7 @@ static int star_run_game(void)
697 { 697 {
698 for (i = 0 ; i < 7 ; i++) 698 for (i = 0 ; i < 7 ; i++)
699 { 699 {
700 rb->lcd_bitmap( 700 rb->lcd_mono_bitmap(
701 block_bmp, 701 block_bmp,
702 STAR_OFFSET_X + block_x * STAR_TILE_SIZE + move_x * i, 702 STAR_OFFSET_X + block_x * STAR_TILE_SIZE + move_x * i,
703 STAR_OFFSET_Y + block_y * STAR_TILE_SIZE + move_y * i, 703 STAR_OFFSET_Y + block_y * STAR_TILE_SIZE + move_y * i,
@@ -766,8 +766,8 @@ static int star_menu(void)
766 } 766 }
767 767
768 move_y = 0; 768 move_y = 0;
769 rb->lcd_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]], 769 rb->lcd_mono_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]],
770 2, menu_offset_y + menu_y * char_height, 7, 8); 770 2, menu_offset_y + menu_y * char_height, 7, 8);
771 rb->lcd_update_rect (2, menu_offset_y + menu_y * 8, 8, 8); 771 rb->lcd_update_rect (2, menu_offset_y + menu_y * 8, 8, 8);
772 rb->sleep(STAR_SLEEP); 772 rb->sleep(STAR_SLEEP);
773 anim_state++; 773 anim_state++;
@@ -842,8 +842,8 @@ static int star_menu(void)
842 rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 842 rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
843 rb->lcd_fillrect (2, 30, 7, 4 * 8); 843 rb->lcd_fillrect (2, 30, 7, 4 * 8);
844 rb->lcd_set_drawmode(DRMODE_FG); 844 rb->lcd_set_drawmode(DRMODE_FG);
845 rb->lcd_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]], 845 rb->lcd_mono_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]],
846 2, menu_offset_y + menu_y * 8 + move_y * i, 7, 8); 846 2, menu_offset_y + menu_y * 8 + move_y * i, 7, 8);
847 rb->lcd_update_rect(2, 30, 8, 4 * 8); 847 rb->lcd_update_rect(2, 30, 8, 4 * 8);
848 anim_state++; 848 anim_state++;
849 rb->sleep(STAR_SLEEP); 849 rb->sleep(STAR_SLEEP);