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 extern int VisiblePileCards;
58 
59 extern CardRegion *pDeck;
60 extern CardRegion *pPile;
61 extern CardRegion *pSuitStack[];
62 extern CardRegion *pRowStack[];
63 extern CardStack   activepile;
64 
65 extern void UpdateStatusBar(void);
66 extern void SetPlayTimer(void);
67 extern int GetScoreMode(void);
68 extern void SetUndoMenuState(bool enable);
69 
70 bool CARDLIBPROC RowStackDragProc(CardRegion &stackobj, int iNumCards);
71 bool CARDLIBPROC RowStackDropProc(CardRegion &stackobj,  CardStack &dragcards);
72 
73 bool CARDLIBPROC SuitStackDropProc(CardRegion &stackobj, CardStack &dragcards);
74 void CARDLIBPROC SuitStackAddProc(CardRegion &stackobj, const CardStack &added);
75 void CARDLIBPROC SuitStackClickProc(CardRegion &stackobj, int iNumClicked);
76 
77 void CARDLIBPROC RowStackClickProc(CardRegion &stackobj, int iNumClicked);
78 void CARDLIBPROC RowStackDblClickProc(CardRegion &stackobj, int iNumClicked);
79 
80 void CARDLIBPROC DeckClickProc(CardRegion &stackobj, int iNumClicked);
81 void CARDLIBPROC PileDblClickProc(CardRegion &stackobj, int iNumClicked);
82 void CARDLIBPROC PileClickProc(CardRegion &stackobj, int iNumClicked);
83 
84 void CARDLIBPROC PileRemoveProc(CardRegion &stackobj, int iRemoved);
85 
86 void SetUndo(int set_source_id, int set_destination_id, int set_number_of_cards, int set_prev_score, int set_prev_visible_pile_cards);
87 void ClearUndo(void);
88 void Undo(void);
89 
90 
91 #endif /* _SOL_PCH_ */
92