ReactOS  0.4.12-dev-102-g4b7f1e0
solcreate.cpp File Reference
#include "solitaire.h"
Include dependency graph for solcreate.cpp:

Go to the source code of this file.

Functions

void CreateSol ()
 

Variables

CardRegionpDeck
 
CardRegionpPile
 
CardRegionpSuitStack [4]
 
CardRegionpRowStack [NUM_ROW_STACKS]
 
CardStack activepile
 
HBITMAP hbmBitmap
 
HDC hdcBitmap
 
int yRowStackCardOffset
 

Function Documentation

◆ CreateSol()

void CreateSol ( void  )

Definition at line 14 of file solcreate.cpp.

Referenced by WndProc().

15 {
16  int i;
17 
18 // hbmBitmap = (HBITMAP)LoadImage(0,"test.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
19 // SolWnd.SetBackImage(hbmBitmap);
20 
21  activepile.Clear();
22 
23  // Compute the value for yRowStackCardOffset based on the height of the card, so the card number isn't hidden on larger cards
25 
34 
42 
43  //
44  // Create the suit stacks
45  //
46  for(i = 0; i < 4; i++)
47  {
51 
55 
57  }
58 
59  //
60  // Create the row stacks
61  //
62  for(i = 0; i < NUM_ROW_STACKS; i++)
63  {
67 
69  (i - NUM_ROW_STACKS/2) * (__cardwidth + X_ROWSTACK_BORDER), 0);
70 
72 
77  }
78 }
bool CARDLIBPROC SuitStackDropProc(CardRegion &stackobj, CardStack &dragcards)
Definition: solgame.cpp:230
void CARDLIBPROC PileRemoveProc(CardRegion &stackobj, int iItems)
Definition: solgame.cpp:456
void SetFaceDirection(UINT uDirType, int nOption)
Definition: cardregion.cpp:258
void CARDLIBPROC SuitStackAddProc(CardRegion &stackobj, const CardStack &added)
Definition: solgame.cpp:338
CardStack activepile
Definition: solgame.cpp:12
#define X_BORDER
Definition: solitaire.h:49
#define SUIT_ID
Definition: solitaire.h:41
bool CARDLIBPROC RowStackDropProc(CardRegion &stackobj, CardStack &dragcards)
Definition: solgame.cpp:125
#define CS_DRAG_NONE
Definition: cardlib.h:28
#define CS_DRAG_CALLBACK
Definition: cardlib.h:31
#define CS_EI_SUNK
Definition: cardlib.h:19
void Clear()
Definition: cardstack.cpp:37
int yRowStackCardOffset
Definition: solcreate.cpp:12
void SetPlacement(UINT xJustify, UINT yJustify, int xAdjust, int yAdjust)
Definition: cardregion.cpp:250
CardRegion * pDeck
Definition: solcreate.cpp:3
CardRegion * pSuitStack[4]
Definition: solcreate.cpp:5
#define Y_ROWSTACK_BORDER
Definition: solitaire.h:55
void CARDLIBPROC SuitStackClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:269
void CARDLIBPROC RowStackClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:284
void SetDblClickProc(pClickProc proc)
Definition: cardregion.cpp:192
#define DECK_ID
Definition: solitaire.h:39
#define CS_EI_NONE
Definition: cardlib.h:18
#define ROW_ID
Definition: solitaire.h:42
void SetEmptyImage(UINT uImage)
Definition: cardregion.cpp:366
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define CS_EI_CIRC
Definition: cardlib.h:20
bool SetThreedCount(int count)
Definition: cardregion.cpp:215
#define Y_BORDERWITHFRAME
Definition: solitaire.h:54
#define X_ROWSTACK_BORDER
Definition: solitaire.h:51
bool SetDragRule(UINT uDragType, pCanDragProc proc=0)
Definition: cardregion.cpp:146
#define X_SUITSTACK_BORDER
Definition: solitaire.h:52
#define CS_XJUST_CENTER
Definition: cardlib.h:39
#define PILE_ID
Definition: solitaire.h:40
#define NUM_ROW_STACKS
Definition: solitaire.h:38
#define CS_FACE_DOWN
Definition: cardlib.h:52
void CARDLIBPROC DeckClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:482
void CARDLIBPROC RowStackDblClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:394
#define CS_DRAG_TOP
Definition: cardlib.h:29
#define CS_DEFXOFF
Definition: cardlib.h:23
#define CS_DROP_NONE
Definition: cardlib.h:33
void CARDLIBPROC PileClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:429
CardRegion * CreateRegion(int id, bool fVisible, int x, int y, int xoffset, int yoffset)
Definition: cardregion.cpp:104
void SetClickProc(pClickProc proc)
Definition: cardregion.cpp:182
int __cardwidth
Definition: cardlib.cpp:25
#define CS_DROP_CALLBACK
Definition: cardlib.h:35
#define CS_FACE_DOWNUP
Definition: cardlib.h:53
void CARDLIBPROC PileDblClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:443
#define X_PILE_BORDER
Definition: solitaire.h:50
void SetAddCardProc(pAddProc proc)
Definition: cardregion.cpp:197
void SetRemoveCardProc(pRemoveProc proc)
Definition: cardregion.cpp:202
bool SetDropRule(UINT uDropType, pCanDropProc proc=0)
Definition: cardregion.cpp:164
int __cardheight
Definition: cardlib.cpp:26
CardRegion * pRowStack[NUM_ROW_STACKS]
Definition: solcreate.cpp:6
bool CARDLIBPROC RowStackDragProc(CardRegion &stackobj, int iNumDragCards)
Definition: solgame.cpp:101
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29
CardWindow SolWnd
Definition: solitaire.cpp:32
CardRegion * pPile
Definition: solcreate.cpp:4

Variable Documentation

◆ activepile

CardStack activepile

Definition at line 12 of file solgame.cpp.

◆ hbmBitmap

HBITMAP hbmBitmap

Definition at line 10 of file solcreate.cpp.

◆ hdcBitmap

◆ pDeck

CardRegion* pDeck

Definition at line 3 of file solcreate.cpp.

Referenced by DeckClickProc(), and NewGame().

◆ pPile

CardRegion* pPile

Definition at line 4 of file solcreate.cpp.

Referenced by DeckClickProc(), and NewGame().

◆ pRowStack

Definition at line 6 of file solcreate.cpp.

Referenced by NewGame().

◆ pSuitStack

CardRegion* pSuitStack[4]

Definition at line 5 of file solcreate.cpp.

Referenced by FindSuitStackFromCard(), and SuitStackAddProc().

◆ yRowStackCardOffset

int yRowStackCardOffset

Definition at line 12 of file solcreate.cpp.

Referenced by CreateSol(), and WndProc().