forked from len0rd/rockbox
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
This commit is contained in:
parent
821a6c9169
commit
a322081e94
3 changed files with 12 additions and 10 deletions
|
|
@ -138,7 +138,7 @@ flipit_tokens.20x20x2.bmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Star */
|
/* Star */
|
||||||
#ifdef HAVE_LCD_COLOR
|
#if defined( HAVE_LCD_COLOR )
|
||||||
#if LCD_WIDTH >= 320
|
#if LCD_WIDTH >= 320
|
||||||
star_tiles.20x20.bmp
|
star_tiles.20x20.bmp
|
||||||
#elif LCD_WIDTH >= 220
|
#elif LCD_WIDTH >= 220
|
||||||
|
|
@ -146,6 +146,8 @@ star_tiles.13x13.bmp
|
||||||
#else
|
#else
|
||||||
star_tiles.10x10.bmp
|
star_tiles.10x10.bmp
|
||||||
#endif
|
#endif
|
||||||
|
#elif LCD_DEPTH > 1
|
||||||
|
star_tiles.10x10.grey.bmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Solitaire */
|
/* Solitaire */
|
||||||
|
|
|
||||||
BIN
apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp
Normal file
BIN
apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
|
|
@ -156,14 +156,14 @@ static int control;
|
||||||
/* the current board */
|
/* the current board */
|
||||||
static char board[STAR_HEIGHT][STAR_WIDTH];
|
static char board[STAR_HEIGHT][STAR_WIDTH];
|
||||||
|
|
||||||
#ifdef HAVE_LCD_COLOR
|
#if LCD_DEPTH > 1
|
||||||
|
|
||||||
extern const fb_data star_tiles[];
|
extern const fb_data star_tiles[];
|
||||||
|
|
||||||
/* size of a tile */
|
/* size of a tile */
|
||||||
#if LCD_WIDTH >= 320
|
#if LCD_WIDTH >= 320 && defined( HAVE_LCD_COLOR )
|
||||||
# define STAR_TILE_SIZE 20
|
# define STAR_TILE_SIZE 20
|
||||||
#elif LCD_WIDTH >= 220
|
#elif LCD_WIDTH >= 220 && defined( HAVE_LCD_COLOR )
|
||||||
# define STAR_TILE_SIZE 13
|
# define STAR_TILE_SIZE 13
|
||||||
#else
|
#else
|
||||||
# define STAR_TILE_SIZE 10
|
# define STAR_TILE_SIZE 10
|
||||||
|
|
@ -565,7 +565,7 @@ static void star_display_board_info(void)
|
||||||
current_level, star_count);
|
current_level, star_count);
|
||||||
rb->lcd_putsxy(0, label_offset_y, str_info);
|
rb->lcd_putsxy(0, label_offset_y, str_info);
|
||||||
|
|
||||||
#if HAVE_LCD_COLOR
|
#if LCD_DEPTH > 1
|
||||||
if( control == STAR_CONTROL_BALL )
|
if( control == STAR_CONTROL_BALL )
|
||||||
rb->lcd_bitmap_part( star_tiles, 0,
|
rb->lcd_bitmap_part( star_tiles, 0,
|
||||||
ball*STAR_TILE_SIZE, STAR_TILE_SIZE,
|
ball*STAR_TILE_SIZE, STAR_TILE_SIZE,
|
||||||
|
|
@ -612,7 +612,7 @@ static int star_load_level(int current_level)
|
||||||
board[y][x] = *ptr_tab;
|
board[y][x] = *ptr_tab;
|
||||||
switch (*ptr_tab)
|
switch (*ptr_tab)
|
||||||
{
|
{
|
||||||
#if HAVE_LCD_COLOR
|
#if LCD_DEPTH > 1
|
||||||
# define DRAW_TILE( a ) \
|
# define DRAW_TILE( a ) \
|
||||||
rb->lcd_bitmap_part( star_tiles, 0, \
|
rb->lcd_bitmap_part( star_tiles, 0, \
|
||||||
a*STAR_TILE_SIZE, STAR_TILE_SIZE, \
|
a*STAR_TILE_SIZE, STAR_TILE_SIZE, \
|
||||||
|
|
@ -627,7 +627,7 @@ static int star_load_level(int current_level)
|
||||||
STAR_TILE_SIZE, STAR_TILE_SIZE);
|
STAR_TILE_SIZE, STAR_TILE_SIZE);
|
||||||
#endif
|
#endif
|
||||||
case STAR_VOID:
|
case STAR_VOID:
|
||||||
#ifdef HAVE_LCD_COLOR
|
#if LCD_DEPTH > 1
|
||||||
DRAW_TILE( space );
|
DRAW_TILE( space );
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
@ -769,7 +769,7 @@ static int star_run_game(void)
|
||||||
{
|
{
|
||||||
for (i = 0 ; i <= STAR_TILE_SIZE ; i++)
|
for (i = 0 ; i <= STAR_TILE_SIZE ; i++)
|
||||||
{
|
{
|
||||||
#if HAVE_LCD_COLOR
|
#if LCD_DEPTH > 1
|
||||||
rb->lcd_bitmap_part(
|
rb->lcd_bitmap_part(
|
||||||
star_tiles, 0, space * STAR_TILE_SIZE, STAR_TILE_SIZE,
|
star_tiles, 0, space * STAR_TILE_SIZE, STAR_TILE_SIZE,
|
||||||
STAR_OFFSET_X + ball_x * STAR_TILE_SIZE,
|
STAR_OFFSET_X + ball_x * STAR_TILE_SIZE,
|
||||||
|
|
@ -818,7 +818,7 @@ static int star_run_game(void)
|
||||||
{
|
{
|
||||||
for (i = 0 ; i <= STAR_TILE_SIZE ; i++)
|
for (i = 0 ; i <= STAR_TILE_SIZE ; i++)
|
||||||
{
|
{
|
||||||
#if HAVE_LCD_COLOR
|
#if LCD_DEPTH > 1
|
||||||
rb->lcd_bitmap_part(
|
rb->lcd_bitmap_part(
|
||||||
star_tiles, 0, space * STAR_TILE_SIZE, STAR_TILE_SIZE,
|
star_tiles, 0, space * STAR_TILE_SIZE, STAR_TILE_SIZE,
|
||||||
STAR_OFFSET_X + block_x * STAR_TILE_SIZE,
|
STAR_OFFSET_X + block_x * STAR_TILE_SIZE,
|
||||||
|
|
@ -1026,7 +1026,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
if (char_width == -1)
|
if (char_width == -1)
|
||||||
rb->lcd_getstringsize("a", &char_width, &char_height);
|
rb->lcd_getstringsize("a", &char_width, &char_height);
|
||||||
|
|
||||||
#ifdef HAVE_LCD_COLOR
|
#if LCD_DEPTH > 1
|
||||||
rb->lcd_set_background( LCD_BLACK );
|
rb->lcd_set_background( LCD_BLACK );
|
||||||
rb->lcd_set_foreground( LCD_WHITE );
|
rb->lcd_set_foreground( LCD_WHITE );
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue