ReactOS  0.4.15-dev-3440-g915569a
spider.h File Reference
#include <cardlib.h>
#include "resource.h"
Include dependency graph for spider.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DIFFICULTY_ONE_COLOR   1
 
#define DIFFICULTY_TWO_COLORS   2
 
#define DIFFICULTY_FOUR_COLORS   3
 
#define CARDBACK_START   IDC_CARDBACK1
 
#define CARDBACK_END   IDC_CARDBACK12
 
#define NUM_CARDBACKS   (CARDBACK_END - CARDBACK_START + 1)
 
#define CARDBACK_RES_START   53
 
#define CARDBACK_OPTIONS_WIDTH   72
 
#define CARDBACK_OPTIONS_HEIGHT   112
 
#define X_BORDER   5
 
#define Y_BORDER   5
 
#define NUM_STACKS   10
 

Functions

void CreateSpider (void)
 
void NewGame (void)
 
bool CARDLIBPROC RowStackDragProc (CardRegion &stackobj, int iNumCards)
 
bool CARDLIBPROC RowStackDropProc (CardRegion &stackobj, const CardStack &dragcards)
 
void CARDLIBPROC RowStackClickProc (CardRegion &stackobj, int iNumClicked)
 
void CARDLIBPROC DeckClickProc (CardRegion &stackobj, int iNumClicked)
 
void CARDLIBPROC PileDblClickProc (CardRegion &stackobj, int iNumClicked)
 
void CARDLIBPROC PileRemoveProc (CardRegion &stackobj, int iRemoved)
 

Variables

HWND hwndMain
 
CardWindow SpiderWnd
 
TCHAR szAppName []
 
bool fGameStarted
 
int yRowStackCardOffset
 
DWORD dwDifficulty
 
TCHAR MsgDeal []
 
TCHAR MsgWin []
 

Macro Definition Documentation

◆ CARDBACK_END

#define CARDBACK_END   IDC_CARDBACK12

Definition at line 12 of file spider.h.

◆ CARDBACK_OPTIONS_HEIGHT

#define CARDBACK_OPTIONS_HEIGHT   112

Definition at line 16 of file spider.h.

◆ CARDBACK_OPTIONS_WIDTH

#define CARDBACK_OPTIONS_WIDTH   72

Definition at line 15 of file spider.h.

◆ CARDBACK_RES_START

#define CARDBACK_RES_START   53

Definition at line 14 of file spider.h.

◆ CARDBACK_START

#define CARDBACK_START   IDC_CARDBACK1

Definition at line 11 of file spider.h.

◆ DIFFICULTY_FOUR_COLORS

#define DIFFICULTY_FOUR_COLORS   3

Definition at line 10 of file spider.h.

◆ DIFFICULTY_ONE_COLOR

#define DIFFICULTY_ONE_COLOR   1

Definition at line 8 of file spider.h.

◆ DIFFICULTY_TWO_COLORS

#define DIFFICULTY_TWO_COLORS   2

Definition at line 9 of file spider.h.

◆ NUM_CARDBACKS

#define NUM_CARDBACKS   (CARDBACK_END - CARDBACK_START + 1)

Definition at line 13 of file spider.h.

◆ NUM_STACKS

#define NUM_STACKS   10

Definition at line 21 of file spider.h.

◆ X_BORDER

#define X_BORDER   5

Definition at line 18 of file spider.h.

◆ Y_BORDER

#define Y_BORDER   5

Definition at line 19 of file spider.h.

Function Documentation

◆ CreateSpider()

void CreateSpider ( void  )

Definition at line 279 of file spigame.cpp.

280 {
281  int i, pos;
282 
283  /* Compute the value for yRowStackCardOffset based on the height of the card, so the card number and suite isn't hidden on larger cards except Ace */
285 
286  pDeck = SpiderWnd.CreateRegion(0, true, 0, 0, -15, 0);
293 
294  /* Create the row stacks */
295  for (i = 0; i < NUM_STACKS; i++)
296  {
299  pos = i - NUM_STACKS/2;
301  pos * (__cardwidth + X_BORDER) + 6 * (X_BORDER + 1) + 3, 0);
306  }
307 }
#define Y_BORDER
Definition: solitaire.h:53
void SetFaceDirection(UINT uDirType, int nOption)
Definition: cardregion.cpp:258
CardRegion * pDeck
Definition: spigame.cpp:20
CardWindow SpiderWnd
Definition: spider.cpp:27
#define X_BORDER
Definition: solitaire.h:49
void SetClickReleaseProc(pClickProc proc)
Definition: cardregion.cpp:187
#define CS_XJUST_RIGHT
Definition: cardlib.h:38
#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 SetPlacement(UINT xJustify, UINT yJustify, int xAdjust, int yAdjust)
Definition: cardregion.cpp:250
void CARDLIBPROC StackAddProc(CardRegion &stackobj, const CardStack &added)
Definition: spigame.cpp:212
void SetEmptyImage(UINT uImage)
Definition: cardregion.cpp:366
#define CS_EI_CIRC
Definition: cardlib.h:20
bool CARDLIBPROC StackDragProc(CardRegion &stackobj, int numDragCards)
Definition: spigame.cpp:169
bool SetDragRule(UINT uDragType, pCanDragProc proc=0)
Definition: cardregion.cpp:146
#define CS_XJUST_CENTER
Definition: cardlib.h:39
void CARDLIBPROC DeckClickProc(CardRegion &stackobj, int NumDragCards)
Definition: spigame.cpp:126
#define CS_FACE_DOWN
Definition: cardlib.h:52
#define CS_DROP_NONE
Definition: cardlib.h:33
CardRegion * CreateRegion(int id, bool fVisible, int x, int y, int xoffset, int yoffset)
Definition: cardregion.cpp:104
bool CARDLIBPROC StackDropProc(CardRegion &stackobj, CardStack &dragcards)
Definition: spigame.cpp:221
int __cardwidth
Definition: cardlib.cpp:25
#define CS_DROP_CALLBACK
Definition: cardlib.h:35
#define CS_YJUST_BOTTOM
Definition: cardlib.h:42
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
int yRowStackCardOffset
Definition: spigame.cpp:23
CardRegion * pStack[NUM_STACKS]
Definition: spigame.cpp:21
void SetAddCardProc(pAddProc proc)
Definition: cardregion.cpp:197
bool SetDropRule(UINT uDropType, pCanDropProc proc=0)
Definition: cardregion.cpp:164
int __cardheight
Definition: cardlib.cpp:26
#define NUM_STACKS
Definition: spider.h:21
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by WndProc().

◆ DeckClickProc()

void CARDLIBPROC DeckClickProc ( CardRegion stackobj,
int  iNumClicked 
)

Definition at line 504 of file solgame.cpp.

505 {
506  TRACE("ENTER DeckClickProc()\n");
507 
508  SetPlayTimer();
509 
510  CardStack cardstack = stackobj.GetCardStack();
511  CardStack pile = pPile->GetCardStack();
512 
513  fGameStarted = true;
514  SetPlayTimer();
515 
516  //reset the face-up pile to represent 3 cards
519 
520  if(cardstack.NumCards() == 0)
521  {
522  if (GetScoreMode() == SCORE_VEGAS)
523  {
525  {
526  pile.Clear();
527 
529  cardstack.Push(activepile);
530  activepile.Clear();
532  VisiblePileCards = 0;
533  }
534  }
535  else if (GetScoreMode() == SCORE_STD)
536  {
538  if ((dwWasteCount >= dwWasteTreshold) && (activepile.NumCards() != 0))
539  {
541  lScore = lScore >= 20 ? lScore - 20 : 0;
542  else
543  lScore = lScore >= 100 ? lScore - 100 : 0;
544  }
545 
546  pile.Clear();
547 
549  cardstack.Push(activepile);
550  activepile.Clear();
551  VisiblePileCards = 0;
552 
553  UpdateStatusBar();
554  }
555  else
556  {
557  pile.Clear();
558 
560  cardstack.Push(activepile);
561  activepile.Clear();
563  VisiblePileCards = 0;
564  }
565 
566  dwWasteCount++;
567  }
568  else
569  {
570  int numcards = min((dwOptions & OPTION_THREE_CARDS) ? 3 : 1, cardstack.NumCards());
571 
573 
574  //make a "visible" copy of these cards
575  CardStack temp;
576  temp = cardstack.Pop(numcards);
577  temp.Reverse();
578 
580  pile.Clear();
581 
582  pile.Push(temp);
583 
584  //remove the top 3 from deck
586 
587  VisiblePileCards = numcards;
588  }
589 
590  activepile.Print();
591 
592  pDeck->SetCardStack(cardstack);
593  pPile->SetCardStack(pile);
594 
596 
597  SolWnd.Redraw();
598  TRACE("EXIT DeckClickProc()\n");
599 }
void Print()
Definition: cardstack.cpp:222
DWORD dwOptions
Definition: solitaire.cpp:24
long lScore
Definition: solitaire.cpp:30
const CardStack & GetCardStack()
Definition: cardregion.cpp:399
void Clear()
Definition: cardstack.cpp:37
void Push(const Card card)
Definition: cardstack.cpp:83
CardRegion * pDeck
Definition: solcreate.cpp:3
#define DECK_ID
Definition: solitaire.h:39
void Redraw(void)
Definition: cardwindow.cpp:553
int GetScoreMode(void)
Definition: solitaire.cpp:129
void Reverse()
Definition: cardstack.cpp:73
int VisiblePileCards
Definition: solgame.cpp:13
#define PILE_ID
Definition: solitaire.h:40
#define TRACE(s)
Definition: solgame.cpp:4
void SetPlayTimer(void)
Definition: solitaire.cpp:171
#define CS_DEFXOFF
Definition: cardlib.h:23
Card Pop()
Definition: cardstack.cpp:127
#define OPTION_THREE_CARDS
Definition: solitaire.h:11
CardStack activepile
Definition: solgame.cpp:12
void SetCardStack(const CardStack &cs)
Definition: cardregion.cpp:390
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 SetOffsets(int x, int y)
Definition: cardregion.cpp:228
bool fGameStarted
Definition: solgame.cpp:15
static calc_node_t temp
Definition: rpn_ieee.c:38
#define min(a, b)
Definition: monoChain.cc:55
VOID UpdateStatusBar(WCHAR wch)
Definition: charmap.c:311
DWORD dwWasteCount
Definition: solitaire.cpp:27
#define SCORE_STD
Definition: solitaire.h:45
#define SCORE_VEGAS
Definition: solitaire.h:46
void FixIfOneCardLeft(void)
Definition: solgame.cpp:465
int NumCards() const
Definition: cardstack.h:14
DWORD dwWasteTreshold
Definition: solitaire.cpp:28
CardWindow SolWnd
Definition: solitaire.cpp:33
CardRegion * pPile
Definition: solcreate.cpp:4

Referenced by CreateSol(), and CreateSpider().

◆ NewGame()

void NewGame ( void  )

Definition at line 18 of file solgame.cpp.

19 {
20  TRACE("ENTER NewGame()\n");
21  int i, j;
22 
23  if (GetScoreMode() == SCORE_VEGAS)
24  {
26  lScore = lScore - 52;
27  else
28  lScore = -52;
29 
31  dwWasteTreshold = 2;
32  else
33  dwWasteTreshold = 0;
34 
35  }
36  else
37  {
39  dwWasteTreshold = 3;
40  else
41  dwWasteTreshold = 0;
42 
43  lScore = 0;
44  }
45 
46  dwTime = 0;
47  dwWasteCount = 0;
48  LastId = 0;
49 
51 
52  //create a new card-stack
54  deck.NewDeck();
55  deck.Shuffle();
56  activepile.Clear();
57  VisiblePileCards = 0;
58 
59  //deal to each row stack..
60  for(i = 0; i < NUM_ROW_STACKS; i++)
61  {
63  temp.Clear();
64 
66 
67  for(j = 0; j <= i; j++)
68  {
69  temp.Push(deck.Pop());
70  }
71 
73  }
74 
75  //put the other cards onto the deck
77  pDeck->Update();
78 
79  // For the 1-card-mode, all cards need to be completely overlapped
81  pPile->SetOffsets(0, 0);
82 
83  SolWnd.Redraw();
84 
85  fGameStarted = false;
86 
88 
90  ClearUndo();
91 
92  TRACE("EXIT NewGame()\n");
93 
94 }
DWORD dwOptions
Definition: solitaire.cpp:24
#define OPTION_KEEP_SCORE
Definition: solitaire.h:13
void SetFaceDirection(UINT uDirType, int nOption)
Definition: cardregion.cpp:258
long lScore
Definition: solitaire.cpp:30
void EmptyStacks(void)
Definition: cardwindow.cpp:607
void Clear()
Definition: cardstack.cpp:37
CardRegion * pDeck
Definition: solcreate.cpp:3
void Redraw(void)
Definition: cardwindow.cpp:553
int GetScoreMode(void)
Definition: solitaire.cpp:129
void NewDeck()
Definition: cardstack.cpp:42
void Update()
Definition: cardregion.cpp:207
int VisiblePileCards
Definition: solgame.cpp:13
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
DWORD dwTime
Definition: solitaire.cpp:26
#define NUM_ROW_STACKS
Definition: solitaire.h:38
#define TRACE(s)
Definition: solgame.cpp:4
void Shuffle()
Definition: cardstack.cpp:50
void ClearUndo(void)
Definition: solundo.cpp:45
DWORD dwPrevMode
Definition: solitaire.cpp:29
Card Pop()
Definition: cardstack.cpp:127
#define OPTION_THREE_CARDS
Definition: solitaire.h:11
CardStack activepile
Definition: solgame.cpp:12
int LastId
Definition: solgame.cpp:14
void SetCardStack(const CardStack &cs)
Definition: cardregion.cpp:390
void SetOffsets(int x, int y)
Definition: cardregion.cpp:228
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
bool fGameStarted
Definition: solgame.cpp:15
static calc_node_t temp
Definition: rpn_ieee.c:38
#define CS_FACE_DOWNUP
Definition: cardlib.h:53
CardStack deck
Definition: spigame.cpp:18
VOID UpdateStatusBar(WCHAR wch)
Definition: charmap.c:311
DWORD dwWasteCount
Definition: solitaire.cpp:27
#define SCORE_VEGAS
Definition: solitaire.h:46
CardRegion * pRowStack[NUM_ROW_STACKS]
Definition: solcreate.cpp:6
DWORD dwWasteTreshold
Definition: solitaire.cpp:28
CardWindow SolWnd
Definition: solitaire.cpp:33
CardRegion * pPile
Definition: solcreate.cpp:4

Referenced by DifficultyDlgProc(), GameFinished(), ShowGameOptionsDlg(), SuitStackAddProc(), and WndProc().

◆ PileDblClickProc()

void CARDLIBPROC PileDblClickProc ( CardRegion stackobj,
int  iNumClicked 
)

Definition at line 452 of file solgame.cpp.

453 {
454  TRACE("ENTER PileDblClickProc()\n");
455 
456  SetPlayTimer();
457 
458  RowStackDblClickProc(stackobj, iNumClicked);
459  TRACE("EXIT PileDblClickProc()\n");
460 }
#define TRACE(s)
Definition: solgame.cpp:4
void CARDLIBPROC RowStackDblClickProc(CardRegion &stackobj, int iNumClicked)
Definition: solgame.cpp:403
void SetPlayTimer(void)
Definition: solitaire.cpp:171

Referenced by CreateSol().

◆ PileRemoveProc()

void CARDLIBPROC PileRemoveProc ( CardRegion stackobj,
int  iRemoved 
)

Definition at line 481 of file solgame.cpp.

482 {
483  TRACE("ENTER PileRemoveProc()\n");
484 
485  SetPlayTimer();
486 
487  //modify our "virtual" pile by removing the same card
488  //that was removed from the physical card stack
489  activepile.Pop(iItems);
491  {
493  }
494 
496 
497  TRACE("EXIT PileRemoveProc()\n");
498 }
DWORD dwOptions
Definition: solitaire.cpp:24
int VisiblePileCards
Definition: solgame.cpp:13
#define TRACE(s)
Definition: solgame.cpp:4
void SetPlayTimer(void)
Definition: solitaire.cpp:171
Card Pop()
Definition: cardstack.cpp:127
#define OPTION_THREE_CARDS
Definition: solitaire.h:11
CardStack activepile
Definition: solgame.cpp:12
void FixIfOneCardLeft(void)
Definition: solgame.cpp:465

Referenced by CreateSol().

◆ RowStackClickProc()

void CARDLIBPROC RowStackClickProc ( CardRegion stackobj,
int  iNumClicked 
)

Definition at line 291 of file solgame.cpp.

292 {
293  TRACE("ENTER RowStackClickProc()\n");
294  int numfacedown;
295 
296  stackobj.GetFaceDirection(&numfacedown);
297 
298  //if all face-down, then make top card face-up
299  if(stackobj.NumCards() == numfacedown)
300  {
301  if(numfacedown > 0) numfacedown--;
302  stackobj.SetFaceDirection(CS_FACE_DOWNUP, numfacedown);
303  stackobj.Redraw();
304 
305  if (GetScoreMode() == SCORE_STD)
306  {
307  lScore = lScore + 5;
308  UpdateStatusBar();
309  }
310  ClearUndo();
311  }
312 
313  LastId = stackobj.Id();
314 
315  fGameStarted = true;
316 
317  TRACE("EXIT RowStackClickProc()\n");
318 }
void SetFaceDirection(UINT uDirType, int nOption)
Definition: cardregion.cpp:258
long lScore
Definition: solitaire.cpp:30
void Redraw()
int GetScoreMode(void)
Definition: solitaire.cpp:129
#define TRACE(s)
Definition: solgame.cpp:4
void ClearUndo(void)
Definition: solundo.cpp:45
int NumCards() const
Definition: cardregion.cpp:544
int LastId
Definition: solgame.cpp:14
bool fGameStarted
Definition: solgame.cpp:15
#define CS_FACE_DOWNUP
Definition: cardlib.h:53
VOID UpdateStatusBar(WCHAR wch)
Definition: charmap.c:311
#define SCORE_STD
Definition: solitaire.h:45
UINT GetFaceDirection(int *pnOption)
Definition: cardregion.cpp:273

Referenced by CreateSol().

◆ RowStackDragProc()

bool CARDLIBPROC RowStackDragProc ( CardRegion stackobj,
int  iNumCards 
)

Definition at line 104 of file solgame.cpp.

105 {
106  TRACE("ENTER RowStackDragProc()\n");
107  int numfacedown;
108  int numcards;
109 
110  SetPlayTimer();
111 
112  stackobj.GetFaceDirection(&numfacedown);
113 
114  numcards = stackobj.NumCards();
115 
116  TRACE("EXIT RowStackDragProc()\n");
117  if(iNumDragCards <= numcards-numfacedown)
118  return true;
119  else
120  return false;
121 
122 }
#define TRACE(s)
Definition: solgame.cpp:4
void SetPlayTimer(void)
Definition: solitaire.cpp:171
int NumCards() const
Definition: cardregion.cpp:544
UINT GetFaceDirection(int *pnOption)
Definition: cardregion.cpp:273

Referenced by CreateSol().

◆ RowStackDropProc()

bool CARDLIBPROC RowStackDropProc ( CardRegion stackobj,
const CardStack dragcards 
)

Variable Documentation

◆ dwDifficulty

DWORD dwDifficulty

Definition at line 25 of file spider.cpp.

Referenced by CreatePlayDeck(), DifficultyDlgProc(), and WndProc().

◆ fGameStarted

◆ hwndMain

◆ MsgDeal

TCHAR MsgDeal[]

Definition at line 23 of file solitaire.cpp.

◆ MsgWin

TCHAR MsgWin[]

Definition at line 22 of file solitaire.cpp.

◆ SpiderWnd

CardWindow SpiderWnd

◆ szAppName

TCHAR szAppName[]

Definition at line 17 of file solitaire.cpp.

◆ yRowStackCardOffset

int yRowStackCardOffset

Definition at line 10 of file solcreate.cpp.

Referenced by CreateSol(), CreateSpider(), and WndProc().