64 lines
883 B
C
64 lines
883 B
C
//Troy Rosin
|
|
|
|
#ifndef __deck_h__
|
|
#define __deck_h__
|
|
|
|
#include <SDL2/SDL.h>
|
|
|
|
#define MAX_HANDSIZE 8
|
|
#define CARD_SIZE (128 * 2)
|
|
#define CARD_W (96 * 2)
|
|
|
|
#define MAX_CARDS 1 << 8
|
|
#define MAX_EFFECTS 4
|
|
#define MAX_ENCHANTS 4
|
|
#define MAX_NAME 64
|
|
|
|
#define R_COMMON 1
|
|
#define R_UNCOMMON 2
|
|
#define R_RARE 3
|
|
#define R_ANCIENT 4
|
|
#define R_MYTHICAL 5
|
|
#define R_DEVINE 6
|
|
|
|
|
|
typedef struct crd
|
|
{
|
|
SDL_Texture *texture;
|
|
int effect[MAX_EFFECTS];
|
|
int enchants[MAX_ENCHANTS];
|
|
int rarity;
|
|
int set;
|
|
int type;
|
|
char *explination;
|
|
char name[MAX_NAME];
|
|
struct crd *next;
|
|
} CARD;
|
|
|
|
typedef struct hand
|
|
{
|
|
int handsize;
|
|
SDL_Texture *cards[MAX_HANDSIZE];
|
|
SDL_Rect card_rects[MAX_HANDSIZE];
|
|
} HAND;
|
|
|
|
|
|
typedef struct discard_pile
|
|
{
|
|
CARD *bot;
|
|
CARD *top;
|
|
int count;
|
|
CARD cards[MAX_CARDS];
|
|
} D_PILE;
|
|
|
|
typedef struct dck
|
|
{
|
|
int count;
|
|
CARD *bot;
|
|
CARD *top;
|
|
} DECK;
|
|
|
|
|
|
|
|
#endif
|