ReactOS 0.4.15-dev-7897-g78dc504
solitaire.h
Go to the documentation of this file.
1#ifndef _SOL_PCH_
2#define _SOL_PCH_
3
4#include <cardlib.h>
5
6extern CardWindow SolWnd;
7extern TCHAR szAppName[];
8extern 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
23extern DWORD dwOptions;
24
25extern DWORD dwTime;
26extern DWORD dwWasteCount;
28extern DWORD dwPrevMode;
29extern long lScore;
30extern HWND hwndMain;
31extern UINT_PTR PlayTimer;
32
33#define IDT_PLAYTIMER 1000
34
35void CreateSol(void);
36void 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
56extern int yRowStackCardOffset;
57extern int VisiblePileCards;
58
59extern CardRegion *pDeck;
60extern CardRegion *pPile;
61extern CardRegion *pSuitStack[];
62extern CardRegion *pRowStack[];
64
65extern void UpdateStatusBar(void);
66extern void SetPlayTimer(void);
67extern int GetScoreMode(void);
68extern void SetUndoMenuState(bool enable);
69
70bool CARDLIBPROC RowStackDragProc(CardRegion &stackobj, int iNumCards);
71bool CARDLIBPROC RowStackDropProc(CardRegion &stackobj, CardStack &dragcards);
72
73bool CARDLIBPROC SuitStackDropProc(CardRegion &stackobj, CardStack &dragcards);
74void CARDLIBPROC SuitStackAddProc(CardRegion &stackobj, const CardStack &added);
75void CARDLIBPROC SuitStackClickProc(CardRegion &stackobj, int iNumClicked);
76
77void CARDLIBPROC RowStackClickProc(CardRegion &stackobj, int iNumClicked);
78void CARDLIBPROC RowStackDblClickProc(CardRegion &stackobj, int iNumClicked);
79
80void CARDLIBPROC DeckClickProc(CardRegion &stackobj, int iNumClicked);
81void CARDLIBPROC PileDblClickProc(CardRegion &stackobj, int iNumClicked);
82void CARDLIBPROC PileClickProc(CardRegion &stackobj, int iNumClicked);
83
84void CARDLIBPROC PileRemoveProc(CardRegion &stackobj, int iRemoved);
85
86void SetUndo(int set_source_id, int set_destination_id, int set_number_of_cards, int set_prev_score, int set_prev_visible_pile_cards);
87void ClearUndo(void);
88void Undo(void);
89
90
91#endif /* _SOL_PCH_ */
#define CARDLIBPROC
Definition: cardlib.h:13
unsigned long DWORD
Definition: ntddk_ex.h:95
GLboolean enable
Definition: glext.h:11120
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
void CARDLIBPROC RowStackClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:291
bool CARDLIBPROC RowStackDragProc(CardRegion &stackobj, int iNumCards)
Definition: solgame.cpp:104
TCHAR szAppName[]
Definition: solitaire.cpp:18
CardRegion * pDeck
Definition: solcreate.cpp:3
DWORD dwWasteCount
Definition: solitaire.cpp:28
void CARDLIBPROC PileDblClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:452
int yRowStackCardOffset
Definition: solcreate.cpp:10
void CARDLIBPROC SuitStackClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:276
void NewGame(void)
Definition: solgame.cpp:18
DWORD dwWasteTreshold
Definition: solitaire.cpp:29
void SetPlayTimer(void)
Definition: solitaire.cpp:172
CardRegion * pPile
Definition: solcreate.cpp:4
bool CARDLIBPROC SuitStackDropProc(CardRegion &stackobj, CardStack &dragcards)
Definition: solgame.cpp:235
bool CARDLIBPROC RowStackDropProc(CardRegion &stackobj, CardStack &dragcards)
Definition: solgame.cpp:128
void CreateSol(void)
Definition: solcreate.cpp:12
void CARDLIBPROC SuitStackAddProc(CardRegion &stackobj, const CardStack &added)
Definition: solgame.cpp:346
HWND hwndMain
Definition: solitaire.cpp:13
DWORD dwOptions
Definition: solitaire.cpp:25
void UpdateStatusBar(void)
Definition: solitaire.cpp:150
int VisiblePileCards
Definition: solgame.cpp:13
void Undo(void)
Definition: solundo.cpp:53
CardRegion * pRowStack[]
Definition: solcreate.cpp:6
DWORD dwTime
Definition: solitaire.cpp:27
void SetUndoMenuState(bool enable)
Definition: solitaire.cpp:183
void CARDLIBPROC RowStackDblClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:403
DWORD dwPrevMode
Definition: solitaire.cpp:30
bool fGameStarted
Definition: solgame.cpp:15
CardStack activepile
Definition: solgame.cpp:12
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)
Definition: solundo.cpp:27
void CARDLIBPROC PileClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:438
void CARDLIBPROC DeckClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:504
void CARDLIBPROC PileRemoveProc(CardRegion &stackobj, int iRemoved)
Definition: solgame.cpp:481
int GetScoreMode(void)
Definition: solitaire.cpp:130
CardRegion * pSuitStack[]
Definition: solcreate.cpp:5
CardWindow SolWnd
Definition: solitaire.cpp:34
void ClearUndo(void)
Definition: solundo.cpp:45
long lScore
Definition: solitaire.cpp:31
UINT_PTR PlayTimer
Definition: solitaire.cpp:32
char TCHAR
Definition: xmlstorage.h:189