17.04.2017, 02:09
Dunno if this is of any use to somebody, but I converted all the card sprites to an array
PHP Code:
enum {
BACK_OF_CARD,
CARD_SET_SPADES,
CARD_SET_HEARTS,
CARD_SET_DIAMONDS,
CARD_SET_CLOVERS
} ;
enum CardData {
card_name [ 32 ],
card_sprite [ 32 ],
card_value ,
card_set
} ;
new Card [ ] [ CardData ] = {
{ "Card Back", "LD_CARD:cdback", 0, BACK_OF_CARD },
{ "King of Spades", "LD_CARD:cd13s", 13, CARD_SET_SPADES },
{ "King of Hearts", "LD_CARD:cd13h", 13, CARD_SET_HEARTS },
{ "King of Diamonds", "LD_CARD:cd13d", 13, CARD_SET_DIAMONDS },
{ "King of Clovers", "LD_CARD:cd13c", 13, CARD_SET_CLOVERS },
{ "Queen of Spades", "LD_CARD:cd12s", 12, CARD_SET_SPADES },
{ "Queen of Hearts", "LD_CARD:cd12h", 12, CARD_SET_HEARTS },
{ "Queen of Diamonds", "LD_CARD:cd12d", 12, CARD_SET_DIAMONDS },
{ "Queen of Clovers", "LD_CARD:cd12c", 12, CARD_SET_CLOVERS },
{ "Jack of Spades", "LD_CARD:cd11s", 11, CARD_SET_SPADES },
{ "Jack of Hearts", "LD_CARD:cd11h", 11, CARD_SET_HEARTS },
{ "Jack of Diamonds", "LD_CARD:cd11d", 11, CARD_SET_DIAMONDS },
{ "Jack of Clovers", "LD_CARD:cd11c", 11, CARD_SET_CLOVERS },
{ "10 of Spades", "LD_CARD:cd10s", 10, CARD_SET_SPADES },
{ "10 of Hearts", "LD_CARD:cd10h", 10, CARD_SET_HEARTS },
{ "10 of Diamonds", "LD_CARD:cd10d", 10, CARD_SET_DIAMONDS },
{ "10 of Clovers", "LD_CARD:cd10c", 10, CARD_SET_CLOVERS },
{ "9 of Spades", "LD_CARD:cd9s", 9, CARD_SET_SPADES },
{ "9 of Hearts", "LD_CARD:cd9h", 9, CARD_SET_HEARTS },
{ "9 of Diamonds", "LD_CARD:cd9d", 9, CARD_SET_DIAMONDS },
{ "9 of Clovers", "LD_CARD:cd9c", 9, CARD_SET_CLOVERS },
{ "8 of Spades", "LD_CARD:cd8s", 8, CARD_SET_SPADES },
{ "8 of Hearts", "LD_CARD:cd8h", 8, CARD_SET_HEARTS },
{ "8 of Diamonds", "LD_CARD:cd8d", 8, CARD_SET_DIAMONDS },
{ "8 of Clovers", "LD_CARD:cd8c", 8, CARD_SET_CLOVERS },
{ "7 of Spades", "LD_CARD:cd7s", 7, CARD_SET_SPADES },
{ "7 of Hearts", "LD_CARD:cd7h", 7, CARD_SET_HEARTS },
{ "7 of Diamonds", "LD_CARD:cd7d", 7, CARD_SET_DIAMONDS },
{ "7 of Clovers", "LD_CARD:cd7c", 7, CARD_SET_CLOVERS },
{ "6 of Spades", "LD_CARD:cd6s", 6, CARD_SET_SPADES },
{ "6 of Hearts", "LD_CARD:cd6h", 6, CARD_SET_HEARTS },
{ "6 of Diamonds", "LD_CARD:cd6d", 6, CARD_SET_DIAMONDS },
{ "6 of Clovers", "LD_CARD:cd6c", 6, CARD_SET_CLOVERS },
{ "5 of Spades", "LD_CARD:cd5s", 5, CARD_SET_SPADES },
{ "5 of Hearts", "LD_CARD:cd5h", 5, CARD_SET_HEARTS },
{ "5 of Diamonds", "LD_CARD:cd5d", 5, CARD_SET_DIAMONDS },
{ "5 of Clovers", "LD_CARD:cd5c", 5, CARD_SET_CLOVERS },
{ "4 of Spades", "LD_CARD:cd4s", 4, CARD_SET_SPADES },
{ "4 of Hearts", "LD_CARD:cd4h", 4, CARD_SET_HEARTS },
{ "4 of Diamonds", "LD_CARD:cd4d", 4, CARD_SET_DIAMONDS },
{ "4 of Clovers", "LD_CARD:cd4c", 4, CARD_SET_CLOVERS },
{ "3 of Spades", "LD_CARD:cd3s", 3, CARD_SET_SPADES },
{ "3 of Hearts", "LD_CARD:cd3h", 3, CARD_SET_HEARTS },
{ "3 of Diamonds", "LD_CARD:cd3d", 3, CARD_SET_DIAMONDS },
{ "3 of Clovers", "LD_CARD:cd3c", 3, CARD_SET_CLOVERS },
{ "2 of Spades", "LD_CARD:cd2s", 2, CARD_SET_SPADES },
{ "2 of Hearts", "LD_CARD:cd2h", 2, CARD_SET_HEARTS },
{ "2 of Diamonds", "LD_CARD:cd2d", 2, CARD_SET_DIAMONDS },
{ "2 of Clovers", "LD_CARD:cd2c", 2, CARD_SET_CLOVERS },
{ "Ace of Spades", "LD_CARD:cd1s", 1, CARD_SET_SPADES },
{ "Ace of Hearts", "LD_CARD:cd1h", 1, CARD_SET_HEARTS },
{ "Ace of Diamonds", "LD_CARD:cd1d", 1, CARD_SET_DIAMONDS },
{ "Ace of Clovers", "LD_CARD:cd1c", 1, CARD_SET_CLOVERS }
} ;