Rename solitaire_ bitmaps to card_ since they are used in solitaire and blackjack. Ideally all future card games will use these graphics.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12281 a1c6a512-1295-4272-9138-f99709370657
|
@ -274,39 +274,39 @@ sokoban_tiles.6x6.bmp
|
||||||
sokoban_tiles.6x6x2.bmp
|
sokoban_tiles.6x6x2.bmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Solitaire */
|
/* Solitaire and Blackjack */
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
#if LCD_WIDTH >= 320
|
#if LCD_WIDTH >= 320
|
||||||
solitaire_cardback.37x49x16.bmp
|
card_back.37x49x16.bmp
|
||||||
solitaire_deck.481x196x16.bmp
|
card_deck.481x196x16.bmp
|
||||||
solitaire_suitsi.37x196x16.bmp
|
solitaire_suitsi.37x196x16.bmp
|
||||||
#elif LCD_WIDTH >= 220
|
#elif LCD_WIDTH >= 220
|
||||||
solitaire_cardback.26x33x16.bmp
|
card_back.26x33x16.bmp
|
||||||
solitaire_deck.338x132x16.bmp
|
card_deck.338x132x16.bmp
|
||||||
solitaire_suitsi.26x132x16.bmp
|
solitaire_suitsi.26x132x16.bmp
|
||||||
#elif LCD_WIDTH >= 160
|
#elif LCD_WIDTH >= 160
|
||||||
solitaire_cardback.18x23x16.bmp
|
card_back.18x23x16.bmp
|
||||||
solitaire_deck.234x92x16.bmp
|
card__deck.234x92x16.bmp
|
||||||
solitaire_suitsi.18x92x16.bmp
|
solitaire_suitsi.18x92x16.bmp
|
||||||
#elif LCD_WIDTH >= 128
|
#elif LCD_WIDTH >= 128
|
||||||
solitaire_cardback.15x20x16.bmp
|
card_back.15x20x16.bmp
|
||||||
solitaire_deck.195x80x16.bmp
|
card__deck.195x80x16.bmp
|
||||||
solitaire_suitsi.15x80x16.bmp
|
solitaire_suitsi.15x80x16.bmp
|
||||||
#endif
|
#endif
|
||||||
#elif LCD_DEPTH > 1 /* greyscale */
|
#elif LCD_DEPTH > 1 /* greyscale */
|
||||||
#if LCD_WIDTH >= 160
|
#if LCD_WIDTH >= 160
|
||||||
solitaire_cardback.18x23x2.bmp
|
card_back.18x23x2.bmp
|
||||||
solitaire_deck.234x92x2.bmp
|
card_deck.234x92x2.bmp
|
||||||
solitaire_suitsi.18x92x2.bmp
|
solitaire_suitsi.18x92x2.bmp
|
||||||
#elif LCD_WIDTH >= 128
|
#elif LCD_WIDTH >= 128
|
||||||
solitaire_cardback.15x20x2.bmp
|
card_back.15x20x2.bmp
|
||||||
solitaire_deck.195x80x2.bmp
|
card_deck.195x80x2.bmp
|
||||||
solitaire_suitsi.15x80x2.bmp
|
solitaire_suitsi.15x80x2.bmp
|
||||||
#endif
|
#endif
|
||||||
#else /* monochrome */
|
#else /* monochrome */
|
||||||
#if LCD_WIDTH >= 112
|
#if LCD_WIDTH >= 112
|
||||||
solitaire_cardback.13x13x1.bmp
|
card_back.13x13x1.bmp
|
||||||
solitaire_deck.169x52x1.bmp
|
card_deck.169x52x1.bmp
|
||||||
solitaire_suitsi.13x52x1.bmp
|
solitaire_suitsi.13x52x1.bmp
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 1,014 B After Width: | Height: | Size: 1,014 B |
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 392 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 532 B |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 276 KiB |
|
@ -18,8 +18,8 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
#include "solitaire_deck.h"
|
#include "card_deck.h"
|
||||||
#include "solitaire_cardback.h"
|
#include "card_back.h"
|
||||||
|
|
||||||
PLUGIN_HEADER
|
PLUGIN_HEADER
|
||||||
|
|
||||||
|
@ -199,14 +199,14 @@ PLUGIN_HEADER
|
||||||
#define FG_COLOR LCD_BLACK
|
#define FG_COLOR LCD_BLACK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CARD_WIDTH BMPWIDTH_solitaire_cardback
|
#define CARD_WIDTH BMPWIDTH_card_back
|
||||||
#define CARD_HEIGHT BMPHEIGHT_solitaire_cardback
|
#define CARD_HEIGHT BMPHEIGHT_card_back
|
||||||
|
|
||||||
/* This is the max amount of cards onscreen before condensing */
|
/* This is the max amount of cards onscreen before condensing */
|
||||||
#define MAX_CARDS LCD_WIDTH/(CARD_WIDTH+4)
|
#define MAX_CARDS LCD_WIDTH/(CARD_WIDTH+4)
|
||||||
|
|
||||||
extern const fb_data solitaire_deck[];
|
extern const fb_data card_deck[];
|
||||||
extern const fb_data solitaire_cardback[];
|
extern const fb_data card_back[];
|
||||||
|
|
||||||
#define NEXT_CARD bj->player_cards[done][bj->num_player_cards[done]]
|
#define NEXT_CARD bj->player_cards[done][bj->num_player_cards[done]]
|
||||||
|
|
||||||
|
@ -332,11 +332,11 @@ static unsigned int find_value(unsigned int number) {
|
||||||
static void draw_card(struct card temp_card, bool shown, unsigned int x,
|
static void draw_card(struct card temp_card, bool shown, unsigned int x,
|
||||||
unsigned int y) {
|
unsigned int y) {
|
||||||
if(shown)
|
if(shown)
|
||||||
rb->lcd_bitmap_part(solitaire_deck, CARD_WIDTH*temp_card.num,
|
rb->lcd_bitmap_part(card_deck, CARD_WIDTH*temp_card.num,
|
||||||
CARD_HEIGHT*temp_card.suit, BMPWIDTH_solitaire_deck,
|
CARD_HEIGHT*temp_card.suit, BMPWIDTH_card_deck,
|
||||||
x+1, y+1, CARD_WIDTH, CARD_HEIGHT);
|
x+1, y+1, CARD_WIDTH, CARD_HEIGHT);
|
||||||
else
|
else
|
||||||
rb->lcd_bitmap(solitaire_cardback, x+1, y+1,CARD_WIDTH, CARD_HEIGHT);
|
rb->lcd_bitmap(card_back, x+1, y+1,CARD_WIDTH, CARD_HEIGHT);
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
rb->lcd_set_foreground(LCD_BLACK);
|
rb->lcd_set_foreground(LCD_BLACK);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -264,14 +264,14 @@ static char helptext[] =
|
||||||
* Misc constants, graphics and other defines
|
* Misc constants, graphics and other defines
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "solitaire_cardback.h"
|
#include "card_back.h"
|
||||||
#include "solitaire_deck.h"
|
#include "card_deck.h"
|
||||||
#include "solitaire_suitsi.h"
|
#include "solitaire_suitsi.h"
|
||||||
|
|
||||||
#define CARD_GFX_WIDTH BMPWIDTH_solitaire_cardback
|
#define CARD_GFX_WIDTH BMPWIDTH_card_back
|
||||||
#define CARD_GFX_HEIGHT BMPHEIGHT_solitaire_cardback
|
#define CARD_GFX_HEIGHT BMPHEIGHT_card_back
|
||||||
#define CARD_WIDTH (BMPWIDTH_solitaire_cardback+2)
|
#define CARD_WIDTH (BMPWIDTH_card_back+2)
|
||||||
#define CARD_HEIGHT (BMPHEIGHT_solitaire_cardback+2)
|
#define CARD_HEIGHT (BMPHEIGHT_card_back+2)
|
||||||
|
|
||||||
#if LCD_WIDTH >= 320
|
#if LCD_WIDTH >= 320
|
||||||
# define MARGIN 4
|
# define MARGIN 4
|
||||||
|
@ -405,13 +405,13 @@ static void draw_card( card_t *card, int x, int y,
|
||||||
{
|
{
|
||||||
if( card->known )
|
if( card->known )
|
||||||
{
|
{
|
||||||
rb->lcd_bitmap_part( solitaire_deck, CARD_GFX_WIDTH * card->num,
|
rb->lcd_bitmap_part( card_deck, CARD_GFX_WIDTH * card->num,
|
||||||
CARD_GFX_HEIGHT * card->suit, BMPWIDTH_solitaire_deck,
|
CARD_GFX_HEIGHT * card->suit, BMPWIDTH_card_deck,
|
||||||
x+1, y+1, CARD_GFX_WIDTH, CARD_GFX_HEIGHT );
|
x+1, y+1, CARD_GFX_WIDTH, CARD_GFX_HEIGHT );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rb->lcd_bitmap( solitaire_cardback, x+1, y+1,
|
rb->lcd_bitmap( card_back, x+1, y+1,
|
||||||
CARD_GFX_WIDTH, CARD_GFX_HEIGHT );
|
CARD_GFX_WIDTH, CARD_GFX_HEIGHT );
|
||||||
}
|
}
|
||||||
draw_card_ext( x, y, selected, cursor );
|
draw_card_ext( x, y, selected, cursor );
|
||||||
|
|