1 2 /* 3 xskat - a card game for 1 to 3 players. 4 Copyright (C) 2004 Gunter Gerhardt 5 6 This program is free software; you can redistribute it freely. 7 Use it at your own risk; there is NO WARRANTY. 8 9 Redistribution of modified versions is permitted 10 provided that the following conditions are met: 11 1. All copyright & permission notices are preserved. 12 2.a) Only changes required for packaging or porting are made. 13 or 14 2.b) It is clearly stated who last changed the program. 15 The program is renamed or 16 the version number is of the form x.y.z, 17 where x.y is the version of the original program 18 and z is an arbitrary suffix. 19 */ 20 21 #ifndef XIO_H 22 #define XIO_H 23 24 #include <X11/Xlib.h> 25 #include <X11/Xutil.h> 26 #include "text.h" 27 28 #undef EXTERN 29 #ifdef XIO_C 30 #define EXTERN 31 #else 32 #define EXTERN extern 33 #endif 34 35 EXTERN tx_typ tspnames[3][2]; 36 EXTERN int charw[3],charh[3]; 37 EXTERN int lost[3]; 38 EXTERN Display *dpy[3]; 39 EXTERN Colormap cmap[3]; 40 EXTERN Window win[3]; 41 EXTERN unsigned long bpix[3],wpix[3],fgpix[3],bgpix[3],btpix[3]; 42 EXTERN unsigned long b3dpix[3],w3dpix[3],mkpix[3]; 43 EXTERN int gfx3d[3]; 44 EXTERN GC gc[3],gcbck[3],gcxor[3]; 45 EXTERN XFontStruct *dfont[3]; 46 EXTERN int ggcards; 47 EXTERN Pixmap bck[3]; 48 EXTERN Pixmap symbs[3]; 49 EXTERN Pixmap cardpx[3][33]; 50 EXTERN Cursor cursor[3][2]; 51 EXTERN int actbtn[3]; 52 EXTERN int skatopen,stichopen,spitzeopen,backopen[3]; 53 EXTERN int ktrply,sptzmrk,schenkply; 54 EXTERN int revolsort,tauschcard,tauschdone,tauschply; 55 EXTERN long ticker; 56 EXTERN char *prog_name; 57 EXTERN char *disp_name[3]; 58 EXTERN char *font_name; 59 EXTERN char *title[3]; 60 EXTERN char *fg_col; 61 EXTERN char *bg_col; 62 EXTERN char *b3d_col; 63 EXTERN char *w3d_col; 64 EXTERN char *mk_col; 65 EXTERN char *bt_col; 66 EXTERN char *ccol[4]; 67 EXTERN int nopre; 68 EXTERN int bwcol; 69 EXTERN int downup; 70 EXTERN int altseq; 71 EXTERN int geom_f[3],geom_x[3],geom_y[3]; 72 EXTERN int colerr; 73 EXTERN XSizeHints szhints[3]; 74 EXTERN XWMHints wmhints; 75 EXTERN struct 76 { 77 int num,act; 78 struct { 79 int x1,y1,x2,y2,f; 80 } p[21]; 81 } selpos[3]; 82 EXTERN struct 83 { 84 int large; 85 int x,y,w,h; 86 int col,plan; 87 int com1x,com2x,com1y,com2y; 88 int playx,playy; 89 int skatx,skaty; 90 int stichx,stichy; 91 int cbox1x,cbox2x,cboxy; 92 int pboxx,pboxy; 93 int cardx,cardw,cardh; 94 int f,q; 95 } desk[3]; 96 EXTERN XColor color[3][256] 97 #ifdef XIO_C 98 = 99 {{ 100 {0,0xffff,0x0000,0x0000}, 101 {0,0xffff,0x0000,0x0000}, 102 {0,0x0000,0x0000,0x0000}, 103 {0,0x0000,0x0000,0x0000}, 104 {0,0xff00,0xb400,0x0000}, 105 {0,0x0000,0xb400,0x0000} 106 }} 107 #endif 108 ; 109 110 EXTERN int cnts[] 111 #ifdef XIO_C 112 = 113 { 114 0,2,22,26,30,34,52,68,82 115 } 116 #endif 117 ; 118 119 EXTERN int bigs[] 120 #ifdef XIO_C 121 = 122 { 123 33,60, 124 15,6, 51,6, 33,24, 15,43, 51,43, 15,77, 51,77, 33,93, 15,111, 51,111, 125 7,9, 60,107, 126 7,9, 60,107, 127 7,9, 60,107, 128 15,6, 51,6, 15,43, 51,43, 33,60, 15,77, 51,77, 15,111, 51,111, 129 15,6, 51,6, 33,33, 15,60, 51,60, 33,87, 15,111, 51,111, 130 15,6, 51,6, 33,33, 15,60, 51,60, 15,111, 51,111 131 } 132 #endif 133 ; 134 135 EXTERN int smls[] 136 #ifdef XIO_C 137 = 138 { 139 2,23, 77,23, 2,105, 77,105 140 } 141 #endif 142 ; 143 144 EXTERN int smlz[] 145 #ifdef XIO_C 146 = 147 { 148 4,16, 75,16, 4,112, 75,112 149 } 150 #endif 151 ; 152 153 EXTERN int smlc[] 154 #ifdef XIO_C 155 = 156 { 157 6,5, 78,5, 6,126, 78,126 158 } 159 #endif 160 ; 161 162 EXTERN int frm[2][9][2] 163 #ifdef XIO_C 164 = 165 { 166 { 167 {1,4},{1,3},{2,2}, 168 {3,1},{4,1},{0,0}, 169 {0,0},{0,0},{0,0} 170 }, 171 { 172 {1,7},{1,6},{1,5}, 173 {2,4},{3,3},{4,2}, 174 {5,1},{6,1},{7,1} 175 } 176 } 177 #endif 178 ; 179 180 EXTERN int ramp[4][6] 181 #ifdef XIO_C 182 = 183 { 184 {0, 70,100,150,180,255}, 185 {0, 70,150,180,255,255}, 186 {0, 70,180,255,255,255}, 187 {0,180,255,255,255,255} 188 } 189 #endif 190 ; 191 192 #endif /* XIO_H */ 193