1 /*
2  *   XFrisk - The classic board game for X
3  *   Copyright (C) 1993-1999 Elan Feingold (elan@aetherworks.com)
4  *
5  *   This program is free software; you can redistribute it and/or modify
6  *   it under the terms of the GNU General Public License as published by
7  *   the Free Software Foundation; either version 2 of the License, or
8  *   (at your option) any later version.
9  *
10  *   This program is distributed in the hope that it will be useful,
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *   GNU General Public License for more details.
14  *
15  *   You should have received a copy of the GNU General Public License
16  *   along with this program; if not, write to the Free Software
17  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  *
19  *   $Id: cards.h,v 1.5 2000/01/05 23:21:13 tony Exp $
20  */
21 
22 #ifndef _CARDS
23 #define _CARDS
24 
25 #include "types.h"
26 #include <X11/Xlib.h>
27 
28 #define CARD_WIDTH  138
29 #define CARD_HEIGHT 190
30 
31 
32 
33 /* Card types */
34 #define CARD_CANON    0
35 #define CARD_FOOTMAN  1
36 #define CARD_HORSEMAN 2
37 #define CARD_JOKER    3
38 
39 
40 
41 /* Initialize */
42 void CARDS_Init();
43 
44 /* The main function */
45 void    CARDS_RenderCard(Int32 iCard, Int32 iPositions);
46 
47 /* Worker functions */
48 XImage *CARDS_ScaleImage(XImage *pimageInput, Int32 iMaxWidth,
49 			Int32 iMaxHeight);
50 XImage *CARDS_GetCountryImage(Int32 iCountry, Int32 iFgColor, Int32 iBgColor);
51 
52 /* This is the mapping from (card #) :==> (country, type) where country
53  * is the country to portray on the card, and type is defined in risk.h,
54  * as CARD_[FOOTMAN|HORSEMAN|CANNON|JOKER]:
55  *
56  * The first 42 cards are: Card i is of country i and of type (i mod 3).
57  * The next 2 cards are jokers.
58  */
59 
60 #endif
61