ReactOS  0.4.12-dev-57-g7050ac4
solitaire.h
Go to the documentation of this file.
1 #ifndef _SOL_PCH_
2 #define _SOL_PCH_
3 
4 #include <cardlib.h>
5 
6 extern CardWindow SolWnd;
7 extern TCHAR szAppName[];
8 extern bool fGameStarted;
9 
10 #define OPTION_SHOW_STATUS 4
11 #define OPTION_THREE_CARDS 8
12 #define OPTION_SHOW_TIME 16
13 #define OPTION_KEEP_SCORE 32
14 #define OPTION_SCORE_STD 64
15 #define OPTION_SCORE_VEGAS 128
16 #define CARDBACK_START IDC_CARDBACK1
17 #define CARDBACK_END IDC_CARDBACK12
18 #define NUM_CARDBACKS (CARDBACK_END - CARDBACK_START + 1)
19 #define CARDBACK_RES_START 53
20 #define CARDBACK_OPTIONS_WIDTH 72
21 #define CARDBACK_OPTIONS_HEIGHT 112
22 
23 extern DWORD dwOptions;
24 
25 extern DWORD dwTime;
26 extern DWORD dwWasteCount;
27 extern DWORD dwWasteTreshold;
28 extern DWORD dwPrevMode;
29 extern long lScore;
30 extern HWND hwndMain;
31 extern UINT_PTR PlayTimer;
32 
33 #define IDT_PLAYTIMER 1000
34 
35 void CreateSol(void);
36 void NewGame(void);
37 
38 #define NUM_ROW_STACKS 7
39 #define DECK_ID 1
40 #define PILE_ID 2
41 #define SUIT_ID 4
42 #define ROW_ID 10
43 
44 #define SCORE_NONE 0
45 #define SCORE_STD 1
46 #define SCORE_VEGAS 2
47 
48 // Various metrics used for placing the objects and computing the minimum window size
49 #define X_BORDER 20
50 #define X_PILE_BORDER 18
51 #define X_ROWSTACK_BORDER 10
52 #define X_SUITSTACK_BORDER 10
53 #define Y_BORDER 30
54 #define Y_BORDERWITHFRAME 20
55 #define Y_ROWSTACK_BORDER 32
56 extern int yRowStackCardOffset;
57 
58 extern CardRegion *pDeck;
59 extern CardRegion *pPile;
60 extern CardRegion *pSuitStack[];
61 extern CardRegion *pRowStack[];
62 
63 extern void UpdateStatusBar(void);
64 extern void SetPlayTimer(void);
65 extern int GetScoreMode(void);
66 
67 bool CARDLIBPROC RowStackDragProc(CardRegion &stackobj, int iNumCards);
68 bool CARDLIBPROC RowStackDropProc(CardRegion &stackobj, CardStack &dragcards);
69 
70 bool CARDLIBPROC SuitStackDropProc(CardRegion &stackobj, CardStack &dragcards);
71 void CARDLIBPROC SuitStackAddProc(CardRegion &stackobj, const CardStack &added);
72 void CARDLIBPROC SuitStackClickProc(CardRegion &stackobj, int iNumClicked);
73 
74 void CARDLIBPROC RowStackClickProc(CardRegion &stackobj, int iNumClicked);
75 void CARDLIBPROC RowStackDblClickProc(CardRegion &stackobj, int iNumClicked);
76 
77 void CARDLIBPROC DeckClickProc(CardRegion &stackobj, int iNumClicked);
78 void CARDLIBPROC PileDblClickProc(CardRegion &stackobj, int iNumClicked);
79 void CARDLIBPROC PileClickProc(CardRegion &stackobj, int iNumClicked);
80 
81 void CARDLIBPROC PileRemoveProc(CardRegion &stackobj, int iRemoved);
82 
83 
84 #endif /* _SOL_PCH_ */
void CARDLIBPROC DeckClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:482
void CARDLIBPROC PileClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:429
void SetPlayTimer(void)
Definition: solitaire.cpp:170
void NewGame(void)
Definition: solgame.cpp:17
bool CARDLIBPROC SuitStackDropProc(CardRegion &stackobj, CardStack &dragcards)
Definition: solgame.cpp:230
DWORD dwOptions
Definition: solitaire.cpp:23
void CARDLIBPROC PileDblClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:443
DWORD dwWasteCount
Definition: solitaire.cpp:26
void CARDLIBPROC RowStackDblClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:394
CardWindow SolWnd
Definition: solitaire.cpp:32
int yRowStackCardOffset
Definition: solcreate.cpp:12
DWORD dwWasteTreshold
Definition: solitaire.cpp:27
bool CARDLIBPROC RowStackDragProc(CardRegion &stackobj, int iNumCards)
Definition: solgame.cpp:101
void CARDLIBPROC RowStackClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:284
CardRegion * pPile
Definition: solcreate.cpp:4
void CARDLIBPROC SuitStackAddProc(CardRegion &stackobj, const CardStack &added)
Definition: solgame.cpp:338
void CreateSol(void)
Definition: solcreate.cpp:14
char TCHAR
Definition: xmlstorage.h:189
CardRegion * pRowStack[]
Definition: solcreate.cpp:6
CardRegion * pDeck
Definition: solcreate.cpp:3
unsigned long DWORD
Definition: ntddk_ex.h:95
void CARDLIBPROC SuitStackClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:269
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
long lScore
Definition: solitaire.cpp:29
TCHAR szAppName[]
Definition: solitaire.cpp:16
UINT_PTR PlayTimer
Definition: solitaire.cpp:30
DWORD dwPrevMode
Definition: solitaire.cpp:28
HWND hwndMain
Definition: solitaire.cpp:12
bool CARDLIBPROC RowStackDropProc(CardRegion &stackobj, CardStack &dragcards)
Definition: solgame.cpp:125
void CARDLIBPROC PileRemoveProc(CardRegion &stackobj, int iRemoved)
Definition: solgame.cpp:456
CardRegion * pSuitStack[]
Definition: solcreate.cpp:5
int GetScoreMode(void)
Definition: solitaire.cpp:128
#define CARDLIBPROC
Definition: cardlib.h:13
void UpdateStatusBar(void)
Definition: solitaire.cpp:148
DWORD dwTime
Definition: solitaire.cpp:25
bool fGameStarted
Definition: solgame.cpp:14