imported catch-22 sol clone with authors permission
[reactos.git] / rosapps / games / solitaire / cardlib / cardlib.h
1 #ifndef CARDLIB_INCLUDED
2 #define CARDLIB_INCLUDED
3
4 #define CARDLIBPROC __stdcall
5
6 void CardBlt(HDC hdc, int x, int y, int nCardNum);
7 void CardLib_SetZoomSpeed(int);
8
9 #define CS_EI_NONE 0
10 #define CS_EI_SUNK 1
11
12 #define CS_DEFXOFF 12 //x-offset
13 #define CS_DEFYOFF 18 //y-offset
14 #define CS_NO3D 1 //default 3d counts (recommened)
15 #define CS_DEF3D 10 //(best for decks)
16
17 //#define CS_EI_CIRC 2
18 //#define CS_EI_X 3
19
20 #define CS_DRAG_NONE 0
21 #define CS_DRAG_TOP 1
22 #define CS_DRAG_ALL 2
23 #define CS_DRAG_CALLBACK 3
24
25 #define CS_DROP_NONE 0
26 #define CS_DROP_ALL 1
27 #define CS_DROP_CALLBACK 2
28
29 #define CS_XJUST_NONE 0
30 #define CS_XJUST_RIGHT 1
31 #define CS_XJUST_CENTER 2
32
33 #define CS_YJUST_NONE 0
34 #define CS_YJUST_BOTTOM 1
35 #define CS_YJUST_CENTER 2
36
37 #define CB_STATIC 0 //static text label
38 #define CB_PUSHBUTTON 1 //normal button
39 #define CB_ALIGN_CENTER 0 //centered is default
40 #define CB_ALIGN_LEFT 2
41 #define CB_ALIGN_RIGHT 4
42
43 #define CS_FACE_UP 0 //all cards face-up
44 #define CS_FACE_DOWN 1 //all cards face-down
45 #define CS_FACE_DOWNUP 2 //bottom X cards down, top-most face-up
46 #define CS_FACE_UPDOWN 3 //bottom X cards up, top-most face-down
47 #define CS_FACE_ANY 4 //cards can be any orientation
48
49 #define CS_DROPZONE_NODROP -1
50
51 //
52 // Define the standard card-back indices
53 //
54 #define ecbCROSSHATCH 53
55 #define ecbWEAVE1 54
56 #define ecbWEAVE2 55
57 #define ecbROBOT 56
58 #define ecbFLOWERS 57
59 #define ecbVINE1 58
60 #define ecbVINE2 59
61 #define ecbFISH1 60
62 #define ecbFISH2 61
63 #define ecbSHELLS 62
64 #define ecbCASTLE 63
65 #define ecbISLAND 64
66 #define ecbCARDHAND 65
67 #define ecbUNUSED 66
68 #define ecbTHE_X 67
69 #define ecbTHE_O 68
70
71
72 class CardRegion;
73 class CardButton;
74 class CardStack;
75
76 typedef bool (CARDLIBPROC *pCanDragProc) (CardRegion &stackobj, int iNumDragging);
77 typedef bool (CARDLIBPROC *pCanDropProc) (CardRegion &stackobj, const CardStack &cards);
78 typedef void (CARDLIBPROC *pClickProc) (CardRegion &stackobj, int iNumCards);
79 typedef void (CARDLIBPROC *pAddProc) (CardRegion &stackobj, const CardStack &cards);
80 typedef void (CARDLIBPROC *pRemoveProc) (CardRegion &stackobj, int iNumRemoved);
81
82 typedef void (CARDLIBPROC *pResizeWndProc) (int width, int height);
83 typedef int (CARDLIBPROC *pDropZoneProc) (int dzid, const CardStack &cards);
84
85 typedef void (CARDLIBPROC *pButtonProc) (CardButton &pButton);
86
87
88 #include "card.h"
89 #include "cardbutton.h"
90 #include "cardstack.h"
91 #include "cardregion.h"
92 #include "cardcount.h"
93 #include "cardwindow.h"
94
95 #ifdef _DEBUG
96 typedef bool (CARDLIBPROC *pDebugClickProc) (CardRegion &stackobj);
97 void CardLib_SetStackClickProc(pDebugClickProc proc);
98 #endif
99
100
101 #endif