diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index 15b1c46237..163482a6ae 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -1,5 +1,10 @@ #ifdef HAVE_LCD_BITMAP +/* Solitaire */ +#ifdef HAVE_LCD_COLOR +solitaire_cardback.220x176x16.bmp +#endif + /* Sudoku */ #if (LCD_WIDTH == 112) && (LCD_HEIGHT==64) && (LCD_DEPTH == 1) sudoku_start.112x64x1.bmp diff --git a/apps/plugins/bitmaps/native/solitaire_cardback.220x176x16.bmp b/apps/plugins/bitmaps/native/solitaire_cardback.220x176x16.bmp new file mode 100644 index 0000000000..1810d18ce3 Binary files /dev/null and b/apps/plugins/bitmaps/native/solitaire_cardback.220x176x16.bmp differ diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 33ac536267..83f203c4aa 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -196,109 +196,13 @@ static const unsigned colors[4] = { #define BMPHEIGHT_c 10 #define BMPWIDTH_c 8 -#define BMPHEIGHT_BACKSIDE 33 -#define BMPWIDTH_BACKSIDE 26 -static const unsigned short backside[33*26] = { -0x9572, 0xdf3a, 0xdf3a, 0xdf39, 0xdf39, 0xdf39, 0xdf39, 0xdf39, 0xdf39, 0xdf39, -0xdf3a, 0xdf3a, 0xdf39, 0xdf39, 0xdf39, 0xdf39, 0xdf39, 0xdf39, 0xdf39, 0xdf39, -0xdf39, 0xdf39, 0xdf39, 0xdf3a, 0xdf3a, 0x9572, -0xe77b, 0xfffc, 0xffbc, 0xfffd, 0xfffd, 0xfffc, 0xfffc, 0xfffd, 0xfffd, 0xfffc, -0xfffc, 0xfffc, 0xfffd, 0xfffc, 0xfffc, 0xfffd, 0xfffc, 0xfffc, 0xfffc, 0xfffd, -0xfffd, 0xfffd, 0xfffd, 0xffbc, 0xfffc, 0xe73a, -0xdf3a, 0xfffb, 0xf7bc, 0xc639, 0xbdf9, 0xc63a, 0xc67a, 0xc67b, 0xc63a, 0xbe3a, -0xc639, 0xbe39, 0xbe3a, 0xbe3a, 0xbe3a, 0xc63b, 0xbe3a, 0xc63a, 0xc63a, 0xb5fa, -0xb5f9, 0xb5f9, 0xc63b, 0xf77c, 0xf7fc, 0xe6fa, -0xdefa, 0xfffc, 0xc679, 0x6bd4, 0x5b54, 0x6394, 0x5b54, 0x6c34, 0x7433, 0x7435, -0x7c34, 0x9536, 0x7c35, 0x7c35, 0x8cb5, 0x7434, 0x8474, 0x7c74, 0x8cf5, 0x7434, -0x8475, 0x7c75, 0x6b93, 0xc63a, 0xfffc, 0xe6f9, -0xdefa, 0xfffd, 0xc6ba, 0x6395, 0x42d3, 0x7c77, 0x7436, 0x73d5, 0x5b11, 0x8cb6, -0xa578, 0x7c35, 0xadb9, 0xadb8, 0x6bd4, 0x9537, 0x84b6, 0x5312, 0x5b53, 0x7436, -0x9538, 0x7436, 0x5b94, 0xc67b, 0xfffd, 0xdefa, -0xdefa, 0xfffc, 0xce7a, 0x6bd5, 0x5311, 0x73d4, 0x94f7, 0xa5b8, 0x7435, 0x9538, -0x84b6, 0x190d, 0x7c35, 0x94f7, 0x088d, 0x7c76, 0x84b7, 0x7c75, 0x8cb6, 0xadb9, -0x7c35, 0x7436, 0x6bd3, 0xce7b, 0xfffd, 0xdefa, -0xdf39, 0xfffd, 0xceba, 0x63d5, 0x6bd5, 0x31cf, 0x8476, 0xa577, 0x84b7, 0x5b54, -0x7436, 0x6b94, 0x84b5, 0x9d38, 0x7394, 0x7c37, 0x84b7, 0x84b7, 0xa578, 0x9d77, -0x31cf, 0x6bd5, 0x6bd4, 0xcebb, 0xfffc, 0xdefa, -0xdf3a, 0xfffc, 0xce7a, 0x6c35, 0x7c76, 0x9537, 0xa5b9, 0x6b94, 0x5291, 0x4ad2, -0x7c35, 0x9537, 0x6394, 0x5353, 0x9578, 0x8cb6, 0x5b13, 0x3a11, 0x5b13, 0x9538, -0x9539, 0x7434, 0x7434, 0xce7a, 0xfffc, 0xe6fa, -0xdf3a, 0xfffd, 0xc67a, 0x6394, 0x84b7, 0x7c75, 0xa578, 0x94f7, 0x8cb6, 0x94f6, -0xa5b8, 0x5b12, 0x4b13, 0x4b13, 0x4291, 0xa5b9, 0x6bd4, 0x73d5, 0x7c34, 0xa578, -0x6bd5, 0x7c75, 0x6b94, 0xc67a, 0xfffd, 0xdefa, -0xdf3a, 0xfffd, 0xc67a, 0x63d4, 0x7c76, 0x320f, 0xc67b, 0xadf9, 0x5b52, 0xadba, -0x5b53, 0x6bd4, 0x4b13, 0x6bd5, 0x6bd5, 0x52d2, 0xbe7b, 0x4a91, 0x94f7, 0xbe7b, -0x320f, 0x7c35, 0x6b94, 0xc67a, 0xfffd, 0xdefa, -0xdf3a, 0xfffd, 0xbe39, 0x6bd5, 0x84b7, 0x9537, 0xb5f9, 0x6352, 0xbe3b, 0x6393, -0x4ad4, 0x73d5, 0x6395, 0x6bd5, 0x84b6, 0x52d3, 0x7c76, 0xbe3a, 0x5ad2, 0x8477, -0x6bd5, 0x84b6, 0x73d5, 0xbe39, 0xfffd, 0xdefa, -0xdf3a, 0xfffc, 0xc639, 0x7cb6, 0x8cf6, 0xa578, 0x4ad0, 0xc63a, 0x7c74, 0x7475, -0x84b8, 0x3a51, 0x3210, 0x4292, 0x4250, 0x9d79, 0x7c77, 0x7435, 0xbe3a, 0x424f, -0x84b8, 0x84b6, 0x84b6, 0xc63a, 0xfffd, 0xdefb, -0xdf3a, 0xfffd, 0xc63a, 0x6bd5, 0x7c75, 0x4ad0, 0xb5fa, 0x9d38, 0x8cf6, 0x6353, -0x5313, 0x6395, 0x7c77, 0x7c76, 0x7436, 0x6bd4, 0x5b52, 0xa5b9, 0xb5fa, 0xbdf9, -0x4a91, 0x7435, 0x6c34, 0xc63a, 0xfffe, 0xdefb, -0xdf3a, 0xfffd, 0xbe39, 0x7c76, 0x8cb6, 0xb639, 0x9d78, 0x7c35, 0x52d2, 0x2990, -0x9538, 0xbe3b, 0x9d78, 0xadfa, 0xb63c, 0xadb9, 0x73d5, 0x5b13, 0x6353, 0x9d38, -0xadf9, 0x8cb5, 0x7c75, 0xbe39, 0xfffd, 0xdefb, -0xdf3b, 0xfffe, 0xbdf9, 0x5312, 0xadfa, 0x9d78, 0x3a51, 0x9d78, 0x4251, 0x84b8, -0x7c75, 0x8d37, 0x7cb7, 0x7476, 0x84f7, 0x9d37, 0xcebc, 0x6bd4, 0x94f7, 0x5b53, -0x94f6, 0xadf8, 0x5b13, 0xb5f9, 0xfffd, 0xdefa, -0xdf3b, 0xffff, 0xb5f9, 0x63d5, 0x8cf8, 0x4ad2, 0x4ad4, 0x6c35, 0x4293, 0x9d78, -0x7cb7, 0x6435, 0x5b55, 0x4b13, 0x63d4, 0x9537, 0x9d37, 0x84b7, 0x63d4, 0x84b7, -0x4292, 0x8cb6, 0x6bd4, 0xb5f9, 0xfffd, 0xdefa, -0xdf3b, 0xffff, 0xadf9, 0x5b54, 0x7c77, 0x6c35, 0x42d4, 0x218f, 0x4292, 0x9537, -0x8d38, 0x5354, 0x7475, 0x9538, 0x5b94, 0x7c76, 0x9537, 0x84b8, 0x114e, 0x4b13, -0x5315, 0x7c76, 0x6353, 0xb5b9, 0xfffd, 0xdefa, -0xdf3b, 0xffff, 0xb5f9, 0x6395, 0x8cf8, 0x6bd4, 0x5313, 0x7cb6, 0x4ad3, 0xb63b, -0x8cf7, 0x7436, 0x6c35, 0x6bd6, 0x7cb7, 0xadba, 0xadb8, 0x8477, 0x7435, 0x7435, -0x4ad2, 0x7cb6, 0x6b95, 0xb5fa, 0xfffc, 0xdefa, -0xdf3b, 0xffff, 0xadb8, 0x5b53, 0xadfa, 0xb63a, 0x42d2, 0x8cf7, 0x29cf, 0x7c77, -0x8cb6, 0x7cb6, 0x7436, 0x7435, 0x9538, 0x84b6, 0xa5ba, 0x4a91, 0x84b7, 0x4b12, -0x8cf7, 0xb63a, 0x5b53, 0xadb8, 0xfffd, 0xdefa, -0xdf3b, 0xffff, 0xadf9, 0x5353, 0x7cb6, 0x9d36, 0xadfa, 0x6393, 0x5b53, 0x194f, -0x6395, 0x8d38, 0x9538, 0x9537, 0xa5b9, 0x9539, 0x4a92, 0x4291, 0x6352, 0x8476, -0xa578, 0x7435, 0x5b53, 0xadb9, 0xfffd, 0xdefa, -0xdf3b, 0xffff, 0xb5f9, 0x6394, 0x8cf7, 0x4ad1, 0xadb9, 0xa5f9, 0x84b6, 0x6b94, -0x4a92, 0x31d0, 0x5b55, 0x5314, 0x4252, 0x4a92, 0x52d2, 0x94f8, 0x9d78, 0xb5f9, -0x5ad2, 0x8477, 0x6b95, 0xb5b9, 0xfffc, 0xdefa, -0xdf3b, 0xffff, 0xadb9, 0x5354, 0x84f8, 0x7435, 0x4292, 0xadb8, 0x8475, 0x5b53, -0x7c77, 0x3a93, 0x29d1, 0x4b13, 0x3a51, 0x6bd5, 0x6355, 0x5312, 0xa5b8, 0x4a91, -0x84b7, 0x7cb6, 0x5b54, 0xadb9, 0xfffc, 0xdefa, -0xdf3b, 0xffff, 0xadb8, 0x6394, 0x8cf8, 0x6393, 0xa57a, 0x6352, 0xbe7b, 0x7c75, -0x2a10, 0x5b54, 0x4ad4, 0x5353, 0x5b54, 0x4292, 0x6354, 0xadb9, 0x5b12, 0xa5b9, -0x6394, 0x7c76, 0x6394, 0xadb8, 0xfffd, 0xdefa, -0xdf3b, 0xffff, 0xb5f9, 0x6c35, 0x8cf7, 0x31cf, 0x9578, 0x84b7, 0x4a91, 0xadf9, -0x5b53, 0x5b94, 0x4293, 0x4b53, 0x5b55, 0x4291, 0xa5b8, 0x6352, 0x7c36, 0xc6bb, -0x4a91, 0x6b95, 0x7436, 0xb5b9, 0xfffd, 0xdefa, -0xdf3b, 0xffff, 0xb5f8, 0x5b53, 0x9539, 0x7435, 0x6bd5, 0x6bd5, 0x7c75, 0x6b94, -0xadb9, 0x6bd4, 0x2a11, 0x2a11, 0x3a51, 0x84b6, 0x7434, 0x8476, 0x73d4, 0xa5b9, -0x7435, 0x7476, 0x6394, 0xadb9, 0xfffd, 0xdefa, -0xdf3b, 0xffff, 0xb5f9, 0x6bd4, 0x9539, 0x9d38, 0x6bd6, 0x5313, 0x4291, 0x4ad2, -0x94f6, 0xd6fd, 0x5b52, 0x5353, 0x8cb7, 0x9538, 0x5b53, 0x4292, 0x5b52, 0x9537, -0xb5fa, 0x7c36, 0x6c35, 0xb5f9, 0xfffd, 0xdefa, -0xdf3b, 0xffff, 0xb5f8, 0x7434, 0x84b7, 0x298e, 0x8cf6, 0xadf9, 0x9538, 0xadf9, -0x9d78, 0x5312, 0xadb9, 0xadf9, 0x6bd4, 0x6395, 0x8cf7, 0x7435, 0x9d77, 0xa578, -0x3a10, 0x6394, 0x7c75, 0xb5f9, 0xfffd, 0xdefa, -0xdf3b, 0xffff, 0xbe39, 0x63d5, 0x6394, 0x84b6, 0xa5b8, 0x84b7, 0x6353, 0xa5b8, -0x8cf7, 0x008c, 0x6b93, 0xadb9, 0x190d, 0x7476, 0xadfa, 0x6c35, 0x8cf7, 0xbe3a, -0x6393, 0x7c75, 0x63d5, 0xb63a, 0xfffd, 0xdefa, -0xdf3b, 0xffff, 0xb5f9, 0x5354, 0x6354, 0x94f8, 0x5b54, 0x63d4, 0x5b93, 0x84b7, -0xa578, 0x7434, 0xadb9, 0xb5f9, 0x8cb6, 0x9d78, 0x9537, 0x5b93, 0x6bd5, 0x84b6, -0x8cf7, 0x84b6, 0x5353, 0xb639, 0xfffd, 0xdefa, -0xdf3a, 0xfffe, 0xbdf8, 0x63d4, 0x5b53, 0x6394, 0x6354, 0x7434, 0x7433, 0x7435, -0x7433, 0x9537, 0x7c35, 0x7c34, 0x84b4, 0x7433, 0x7c74, 0x7474, 0x84b5, 0x73d4, -0x8476, 0x7c35, 0x6393, 0xbe38, 0xfffd, 0xdefa, -0xdf3a, 0xffbc, 0xf7bc, 0xc67a, 0xbe3a, 0xc67a, 0xc67b, 0xce7a, 0xc67a, 0xc63a, -0xc67a, 0xc67a, 0xc63a, 0xc63b, 0xc67a, 0xc67a, 0xc63a, 0xc67a, 0xc63a, 0xbdf9, -0xbdf9, 0xb5f9, 0xc67a, 0xf7bc, 0xfffc, 0xdefa, -0xdf7b, 0xfffc, 0xffbc, 0xfffc, 0xfffd, 0xfffc, 0xfffc, 0xfffc, 0xfffd, 0xfffd, -0xfffd, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffd, 0xfffc, 0xfffb, 0xfffd, 0xfffd, -0xfffc, 0xfffc, 0xfffd, 0xfffc, 0xfffc, 0xdefa, -0x9572, 0xe73b, 0xdefa, 0xdefa, 0xdefa, 0xdefa, 0xdefa, 0xdefa, 0xdefa, 0xdefa, -0xdefa, 0xdefa, 0xe6fa, 0xe6fa, 0xdefa, 0xdefa, 0xdefa, 0xdefa, 0xdefa, 0xdefa, -0xdefa, 0xdefa, 0xdefa, 0xdefa, 0xe73a, 0xd6b9}; +#ifdef HAVE_LCD_COLOR +#define BMPHEIGHT_CARDBACK 33 +#define BMPWIDTH_CARDBACK 26 + +extern const fb_data solitaire_cardback[]; +#endif static const unsigned char suitsi[4][30] = { {0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x07, 0x0f, 0x1f, 0x1f, 0x0f, 0x7f, 0x7f, 0x7f, 0x0f, 0x1f, 0x1f, 0x0f, 0x07, 0x00}, @@ -371,7 +275,7 @@ static unsigned char numbers[13][16] = { /* size of a card on the screen */ -#if (CONFIG_KEYPAD == IRIVER_H300_PAD) +#if (LCD_WIDTH >= 220) && (LCD_HEIGHT >= 176) #define CARD_WIDTH 26 #define CARD_HEIGHT 34 #else @@ -382,7 +286,7 @@ static unsigned char numbers[13][16] = { /* where the cards start */ #define CARD_START CARD_HEIGHT +4 -#if (CONFIG_KEYPAD == IRIVER_H300_PAD) +#if (LCD_WIDTH >= 220) && (LCD_HEIGHT >= 176) #define KNOWN_CARD 23 #define NOT_KNOWN_CARD 30 #else @@ -1061,7 +965,9 @@ int solitaire(void){ #endif } else { #ifdef HAVE_LCD_COLOR - rb->lcd_bitmap(backside, 1+i*(LCD_WIDTH - 2)/COL_NUM+1, j+1, BMPWIDTH_BACKSIDE, BMPHEIGHT_BACKSIDE); + rb->lcd_bitmap(solitaire_cardback, + 1+i*(LCD_WIDTH - 2)/COL_NUM+1, j+1, + BMPWIDTH_CARDBACK, BMPHEIGHT_CARDBACK); #endif } /* draw top line of the card */ @@ -1276,7 +1182,8 @@ int solitaire(void){ } if(rem != NOT_A_CARD){ #ifdef HAVE_LCD_COLOR - rb->lcd_bitmap(backside, 2, 2, BMPWIDTH_BACKSIDE, BMPHEIGHT_BACKSIDE); + rb->lcd_bitmap(solitaire_cardback, 2, 2, + BMPWIDTH_CARDBACK, BMPHEIGHT_CARDBACK); #endif } }