diff options
Diffstat (limited to '')
-rw-r--r-- | cards.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/cards.h b/cards.h index 2ce85a9..0ed1b8f 100644 --- a/cards.h +++ b/cards.h @@ -23,12 +23,15 @@ enum { Cards_Width = 71, Cards_Height = 96, +}; - Cards_Club = 0, +enum { + Cards_Club, Cards_Diamond = 13, Cards_Heart = 26, Cards_Spade = 39, + // Add rank to suit to obtain card face index. Cards_A = 1, Cards_2, Cards_3, Cards_4, Cards_5, Cards_6, Cards_7, Cards_8, Cards_9, Cards_10, Cards_J, Cards_Q, Cards_K, @@ -44,11 +47,21 @@ enum { Cards_Count, }; +// Some pointers will be NULL since there are gaps in the indices. struct Cards { - struct SDL_Surface *surfaces[Cards_Count]; + SDL_Surface *surfaces[Cards_Count]; +}; + +enum Cards_Flags { + // Set color key for Cards_Empty, Cards_X, Cards_O. + Cards_ColorKey = 1 << 0, + // Set alpha in card corners. + Cards_AlphaCorners = 1 << 1, + // Set red card borders to black. + Cards_BlackBorders = 1 << 2, }; -struct Cards *Cards_Load(struct SDL_RWops *rw); +struct Cards *Cards_Load(SDL_RWops *rw, enum Cards_Flags flags); void Cards_Free(struct Cards *cards); #endif |