Fix solitaire card colors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10861 a1c6a512-1295-4272-9138-f99709370657
|
@ -31,4 +31,22 @@ brickmania_powerups.112x64x1.bmp
|
||||||
tetrox_background.112x64x1.bmp
|
tetrox_background.112x64x1.bmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Solitaire */
|
||||||
|
#if LCD_HEIGHT > 64
|
||||||
|
solitaire_numbers.8x10x1.bmp
|
||||||
|
#if HAVE_LCD_COLOR
|
||||||
|
solitaire_suits.8x10x1_filled.bmp
|
||||||
|
#else
|
||||||
|
solitaire_suits.8x10x1.bmp
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
solitaire_numbers.6x6x1.bmp
|
||||||
|
solitaire_suits.6x6x1.bmp
|
||||||
|
#endif
|
||||||
|
#if HAVE_LCD_COLOR
|
||||||
|
solitaire_suitsi.15x16x1_filled.bmp
|
||||||
|
#else
|
||||||
|
solitaire_suitsi.15x16x1.bmp
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* HAVE_LCD_BITMAP */
|
#endif /* HAVE_LCD_BITMAP */
|
||||||
|
|
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 374 B |
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 582 B |
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
BIN
apps/plugins/bitmaps/mono/solitaire_suits.8x10x1_filled.bmp
Normal file
After Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
BIN
apps/plugins/bitmaps/mono/solitaire_suitsi.15x16x1_filled.bmp
Normal file
After Width: | Height: | Size: 318 B |
|
@ -158,21 +158,6 @@ solitaire_cardback.220x176x16.bmp
|
||||||
solitaire_cardback.176x132x16.bmp
|
solitaire_cardback.176x132x16.bmp
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if defined( HAVE_LCD_COLOR )
|
|
||||||
solitaire_numbers.8x10x1.bmp
|
|
||||||
solitaire_suits.8x10x16.bmp
|
|
||||||
#elif LCD_HEIGHT > 64
|
|
||||||
solitaire_numbers.8x10x1.bmp
|
|
||||||
solitaire_suits.8x10x1.bmp
|
|
||||||
#else
|
|
||||||
solitaire_numbers.6x6x1.bmp
|
|
||||||
solitaire_suits.6x6x1.bmp
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
solitaire_suitsi.15x16x16.bmp
|
|
||||||
#else
|
|
||||||
solitaire_suitsi.15x16x1.bmp
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Sudoku */
|
/* Sudoku */
|
||||||
#if LCD_WIDTH >= LCD_HEIGHT
|
#if LCD_WIDTH >= LCD_HEIGHT
|
||||||
|
|
Before Width: | Height: | Size: 1,014 B |
Before Width: | Height: | Size: 3.1 KiB |
|
@ -265,15 +265,15 @@ static struct plugin_api* rb;
|
||||||
|
|
||||||
|
|
||||||
#define draw_number( num, x, y ) \
|
#define draw_number( num, x, y ) \
|
||||||
rb->lcd_bitmap_part( numbers, 0, num * NUMBER_HEIGHT, NUMBER_STRIDE, \
|
rb->lcd_mono_bitmap_part( numbers, 0, num * NUMBER_HEIGHT, NUMBER_STRIDE, \
|
||||||
x, y, NUMBER_WIDTH, NUMBER_HEIGHT );
|
x, y, NUMBER_WIDTH, NUMBER_HEIGHT );
|
||||||
extern const fb_data solitaire_numbers[];
|
extern const unsigned char solitaire_numbers[];
|
||||||
#define numbers solitaire_numbers
|
#define numbers solitaire_numbers
|
||||||
|
|
||||||
#define draw_suit( num, x, y ) \
|
#define draw_suit( num, x, y ) \
|
||||||
rb->lcd_bitmap_part( suits, 0, num * SUIT_HEIGHT, SUIT_STRIDE, \
|
rb->lcd_mono_bitmap_part( suits, 0, num * SUIT_HEIGHT, SUIT_STRIDE, \
|
||||||
x, y, SUIT_WIDTH, SUIT_HEIGHT );
|
x, y, SUIT_WIDTH, SUIT_HEIGHT );
|
||||||
extern const fb_data solitaire_suits[];
|
extern const unsigned char solitaire_suits[];
|
||||||
#define suits solitaire_suits
|
#define suits solitaire_suits
|
||||||
|
|
||||||
#if ( CARD_HEIGHT < SUITI_HEIGHT + 1 ) || ( CARD_WIDTH < SUITI_WIDTH + 1 )
|
#if ( CARD_HEIGHT < SUITI_HEIGHT + 1 ) || ( CARD_WIDTH < SUITI_WIDTH + 1 )
|
||||||
|
@ -284,9 +284,9 @@ extern const fb_data solitaire_suits[];
|
||||||
# define draw_suiti( num, x, y ) draw_suit( num, x, y )
|
# define draw_suiti( num, x, y ) draw_suit( num, x, y )
|
||||||
#else
|
#else
|
||||||
# define draw_suiti( num, x, y ) \
|
# define draw_suiti( num, x, y ) \
|
||||||
rb->lcd_bitmap_part( suitsi, 0, num * SUITI_HEIGHT, SUITI_STRIDE, \
|
rb->lcd_mono_bitmap_part( suitsi, 0, num * SUITI_HEIGHT, SUITI_STRIDE, \
|
||||||
x, y, SUITI_WIDTH, SUITI_HEIGHT );
|
x, y, SUITI_WIDTH, SUITI_HEIGHT );
|
||||||
extern const fb_data solitaire_suitsi[];
|
extern const unsigned char solitaire_suitsi[];
|
||||||
# define suitsi solitaire_suitsi
|
# define suitsi solitaire_suitsi
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -302,6 +302,16 @@ extern const fb_data solitaire_suits[];
|
||||||
extern const fb_data solitaire_cardback[];
|
extern const fb_data solitaire_cardback[];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_LCD_COLOR
|
||||||
|
static const unsigned colors[4] = {
|
||||||
|
LCD_BLACK, LCD_RGBPACK(255, 0, 0), LCD_BLACK, LCD_RGBPACK(255, 0, 0)
|
||||||
|
};
|
||||||
|
#elif LCD_DEPTH > 1
|
||||||
|
static const unsigned colors[4] = {
|
||||||
|
LCD_BLACK, LCD_BRIGHTNESS(127), LCD_BLACK, LCD_BRIGHTNESS(127)
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CONFIG_FILENAME "sol.cfg"
|
#define CONFIG_FILENAME "sol.cfg"
|
||||||
|
|
||||||
#define NOT_A_CARD 255
|
#define NOT_A_CARD 255
|
||||||
|
@ -403,6 +413,10 @@ static void draw_card( card_t card, int x, int y,
|
||||||
rb->lcd_set_foreground( LCD_WHITE );
|
rb->lcd_set_foreground( LCD_WHITE );
|
||||||
rb->lcd_fillrect( x+1, y+1, CARD_WIDTH-1, CARD_HEIGHT-1 );
|
rb->lcd_fillrect( x+1, y+1, CARD_WIDTH-1, CARD_HEIGHT-1 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LCD_DEPTH > 1
|
||||||
|
rb->lcd_set_foreground( colors[card.suit] );
|
||||||
|
#endif
|
||||||
if( leftstyle )
|
if( leftstyle )
|
||||||
{
|
{
|
||||||
#if UPPER_ROW_MARGIN > 0
|
#if UPPER_ROW_MARGIN > 0
|
||||||
|
@ -442,6 +456,11 @@ static void draw_empty_stack( int s, int x, int y, bool cursor )
|
||||||
#if LCD_DEPTH == 1
|
#if LCD_DEPTH == 1
|
||||||
rb->lcd_set_drawmode( DRMODE_SOLID );
|
rb->lcd_set_drawmode( DRMODE_SOLID );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LCD_DEPTH > 1
|
||||||
|
rb->lcd_set_foreground( colors[s] );
|
||||||
|
#endif
|
||||||
|
|
||||||
draw_suiti( s, x+(CARD_WIDTH-SUITI_WIDTH)/2,
|
draw_suiti( s, x+(CARD_WIDTH-SUITI_WIDTH)/2,
|
||||||
y+(CARD_HEIGHT-SUITI_HEIGHT)/2 );
|
y+(CARD_HEIGHT-SUITI_HEIGHT)/2 );
|
||||||
|
|
||||||
|
|