home *** CD-ROM | disk | FTP | other *** search
/ CD Direkt: Spezial 1 / CDD_SPIELE_.ISO / wingames / pyramid / cardwin.h < prev    next >
C/C++ Source or Header  |  1993-08-18  |  3KB  |  100 lines

  1. //-------------------------------------------------------------------
  2. //  PROGRAM:            CARDWIN.H
  3. //
  4. //  DESCRIPTION:        Header file for CARDWIN.CPP              
  5. //
  6. //                      Copyright (c) 1993, CYSoft Inc.
  7. //
  8. //  NOTE:             The program design is kinda hacked because
  9. //                    this is my first attempt at creating a
  10. //                    fully functional Windows program using
  11. //                    OWL and C++.
  12. //
  13. //                    Any suggestions on making the program better,
  14. //                    specially the DealCards module which is
  15. //                    painfully slow, would be greatly appreciated.
  16. //
  17. //                    Compuserve ID 72672,1567
  18. //-------------------------------------------------------------------
  19.  
  20. #include <owl.h>
  21.  
  22. //--------------------------------
  23. //  Constants
  24. //--------------------------------
  25.  
  26. #define   INDECK                 1
  27. #define   INPLAY                 2
  28. #define   INWASTE                3
  29. #define   INDISCARD              4
  30. #define   INPYRAMID              5
  31.  
  32. #define   FACEDN                53
  33.  
  34. #define   CARDWIDTH             71
  35. #define   CARDHEIGHT            96
  36.  
  37. #define   DECK_X                34
  38. #define   DECK_Y               320
  39.  
  40. #define   PLAY_X               142
  41. #define   PLAY_Y               320
  42.  
  43. #define   WASTE_X              250
  44. #define   WASTE_Y              320
  45.  
  46. #define   DISCARD_X            495
  47. #define   DISCARD_Y            320
  48.  
  49.  
  50. //-------------------------------------------------------------------
  51. //  CLASS:              TCardWin
  52. //
  53. //  DESCRIPTION:        Class declaration
  54. //-------------------------------------------------------------------
  55.  
  56.  
  57. _CLASSDEF(TCardWin)
  58.  
  59. class TCardWin : public TWindow
  60. {
  61.     public:
  62.  
  63.         //------------------------
  64.         //  Variables
  65.         //------------------------
  66.  
  67.         int             xPos,
  68.                         yPos,
  69.                         where,
  70.                         bitNum,
  71.                         deckIndex,
  72.                         cardValue,
  73.                         dependentCard;
  74.  
  75.         BOOL            faceUp,
  76.                         nextCard,
  77.                         cardTagged;
  78.  
  79.         HINSTANCE       appInstance;
  80.  
  81.         PTWindowsObject myParent;
  82.  
  83.         //------------------------
  84.         //  Functions
  85.         //------------------------
  86.  
  87.         int  WhichDependent(int deckIdx);
  88.  
  89.         TCardWin(PTWindowsObject AParent, LPSTR ATitle, int Idx,
  90.             int X, int Y, HINSTANCE Instance);
  91.  
  92.         virtual void GetWindowClass(WNDCLASS& AWndClass);
  93.         virtual void Paint(HDC hDC, PAINTSTRUCT _FAR &);
  94.  
  95.         virtual void WMDestroy(RTMessage Msg)
  96.             = [WM_FIRST + WM_DESTROY];
  97.  
  98.         virtual void WMLButtonDown(RTMessage)
  99.             = [WM_FIRST + WM_LBUTTONDOWN];
  100. };