summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2006-07-27 22:04:07 +0000
committerAntoine Cellerier <dionoea@videolan.org>2006-07-27 22:04:07 +0000
commita322081e9469dee07f10398941aef5c43913cf68 (patch)
tree8b530af5d55fc272433f453ffa9a75962b7a16c7 /apps/plugins
parent821a6c9169de5bc11a9f34c66946d1efa89fd655 (diff)
downloadrockbox-a322081e9469dee07f10398941aef5c43913cf68.tar.gz
rockbox-a322081e9469dee07f10398941aef5c43913cf68.zip
Add bitmaps for greyscale LCD targets for "star" game. Closes http://www.rockbox.org/tracker/task/5509
(bitmaps are a bit too large for ipod mini, but the game is still playable) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10344 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/bitmaps/native/SOURCES4
-rw-r--r--apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmpbin0 -> 1678 bytes
-rw-r--r--apps/plugins/star.c18
3 files changed, 12 insertions, 10 deletions
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES
index 2c1c94b167..6b75c1e058 100644
--- a/apps/plugins/bitmaps/native/SOURCES
+++ b/apps/plugins/bitmaps/native/SOURCES
@@ -138,7 +138,7 @@ flipit_tokens.20x20x2.bmp
138#endif 138#endif
139 139
140/* Star */ 140/* Star */
141#ifdef HAVE_LCD_COLOR 141#if defined( HAVE_LCD_COLOR )
142#if LCD_WIDTH >= 320 142#if LCD_WIDTH >= 320
143star_tiles.20x20.bmp 143star_tiles.20x20.bmp
144#elif LCD_WIDTH >= 220 144#elif LCD_WIDTH >= 220
@@ -146,6 +146,8 @@ star_tiles.13x13.bmp
146#else 146#else
147star_tiles.10x10.bmp 147star_tiles.10x10.bmp
148#endif 148#endif
149#elif LCD_DEPTH > 1
150star_tiles.10x10.grey.bmp
149#endif 151#endif
150 152
151/* Solitaire */ 153/* Solitaire */
diff --git a/apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp b/apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp
new file mode 100644
index 0000000000..1333d49c6e
--- /dev/null
+++ b/apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp
Binary files differ
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index 2cb380810f..cdaeba1ddb 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -156,14 +156,14 @@ static int control;
156/* the current board */ 156/* the current board */
157static char board[STAR_HEIGHT][STAR_WIDTH]; 157static char board[STAR_HEIGHT][STAR_WIDTH];
158 158
159#ifdef HAVE_LCD_COLOR 159#if LCD_DEPTH > 1
160 160
161extern const fb_data star_tiles[]; 161extern const fb_data star_tiles[];
162 162
163/* size of a tile */ 163/* size of a tile */
164#if LCD_WIDTH >= 320 164#if LCD_WIDTH >= 320 && defined( HAVE_LCD_COLOR )
165# define STAR_TILE_SIZE 20 165# define STAR_TILE_SIZE 20
166#elif LCD_WIDTH >= 220 166#elif LCD_WIDTH >= 220 && defined( HAVE_LCD_COLOR )
167# define STAR_TILE_SIZE 13 167# define STAR_TILE_SIZE 13
168#else 168#else
169# define STAR_TILE_SIZE 10 169# define STAR_TILE_SIZE 10
@@ -565,7 +565,7 @@ static void star_display_board_info(void)
565 current_level, star_count); 565 current_level, star_count);
566 rb->lcd_putsxy(0, label_offset_y, str_info); 566 rb->lcd_putsxy(0, label_offset_y, str_info);
567 567
568#if HAVE_LCD_COLOR 568#if LCD_DEPTH > 1
569 if( control == STAR_CONTROL_BALL ) 569 if( control == STAR_CONTROL_BALL )
570 rb->lcd_bitmap_part( star_tiles, 0, 570 rb->lcd_bitmap_part( star_tiles, 0,
571 ball*STAR_TILE_SIZE, STAR_TILE_SIZE, 571 ball*STAR_TILE_SIZE, STAR_TILE_SIZE,
@@ -612,7 +612,7 @@ static int star_load_level(int current_level)
612 board[y][x] = *ptr_tab; 612 board[y][x] = *ptr_tab;
613 switch (*ptr_tab) 613 switch (*ptr_tab)
614 { 614 {
615#if HAVE_LCD_COLOR 615#if LCD_DEPTH > 1
616# define DRAW_TILE( a ) \ 616# define DRAW_TILE( a ) \
617 rb->lcd_bitmap_part( star_tiles, 0, \ 617 rb->lcd_bitmap_part( star_tiles, 0, \
618 a*STAR_TILE_SIZE, STAR_TILE_SIZE, \ 618 a*STAR_TILE_SIZE, STAR_TILE_SIZE, \
@@ -627,7 +627,7 @@ static int star_load_level(int current_level)
627 STAR_TILE_SIZE, STAR_TILE_SIZE); 627 STAR_TILE_SIZE, STAR_TILE_SIZE);
628#endif 628#endif
629 case STAR_VOID: 629 case STAR_VOID:
630#ifdef HAVE_LCD_COLOR 630#if LCD_DEPTH > 1
631 DRAW_TILE( space ); 631 DRAW_TILE( space );
632#endif 632#endif
633 break; 633 break;
@@ -769,7 +769,7 @@ static int star_run_game(void)
769 { 769 {
770 for (i = 0 ; i <= STAR_TILE_SIZE ; i++) 770 for (i = 0 ; i <= STAR_TILE_SIZE ; i++)
771 { 771 {
772#if HAVE_LCD_COLOR 772#if LCD_DEPTH > 1
773 rb->lcd_bitmap_part( 773 rb->lcd_bitmap_part(
774 star_tiles, 0, space * STAR_TILE_SIZE, STAR_TILE_SIZE, 774 star_tiles, 0, space * STAR_TILE_SIZE, STAR_TILE_SIZE,
775 STAR_OFFSET_X + ball_x * STAR_TILE_SIZE, 775 STAR_OFFSET_X + ball_x * STAR_TILE_SIZE,
@@ -818,7 +818,7 @@ static int star_run_game(void)
818 { 818 {
819 for (i = 0 ; i <= STAR_TILE_SIZE ; i++) 819 for (i = 0 ; i <= STAR_TILE_SIZE ; i++)
820 { 820 {
821#if HAVE_LCD_COLOR 821#if LCD_DEPTH > 1
822 rb->lcd_bitmap_part( 822 rb->lcd_bitmap_part(
823 star_tiles, 0, space * STAR_TILE_SIZE, STAR_TILE_SIZE, 823 star_tiles, 0, space * STAR_TILE_SIZE, STAR_TILE_SIZE,
824 STAR_OFFSET_X + block_x * STAR_TILE_SIZE, 824 STAR_OFFSET_X + block_x * STAR_TILE_SIZE,
@@ -1026,7 +1026,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
1026 if (char_width == -1) 1026 if (char_width == -1)
1027 rb->lcd_getstringsize("a", &char_width, &char_height); 1027 rb->lcd_getstringsize("a", &char_width, &char_height);
1028 1028
1029#ifdef HAVE_LCD_COLOR 1029#if LCD_DEPTH > 1
1030 rb->lcd_set_background( LCD_BLACK ); 1030 rb->lcd_set_background( LCD_BLACK );
1031 rb->lcd_set_foreground( LCD_WHITE ); 1031 rb->lcd_set_foreground( LCD_WHITE );
1032#endif 1032#endif