home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / q_cards / global.bas < prev    next >
BASIC Source File  |  1993-04-28  |  5KB  |  73 lines

  1. ' Some useful constants
  2. Global Const FALSE = 0
  3. Global Const TRUE = Not FALSE
  4. Global Const CARDWIDTH = 71
  5. Global Const CARDHEIGHT = 96
  6. Global Const OFFSET = 16
  7.  
  8. ' Required in Form Load to use dll
  9. Declare Function InitializeDeck Lib "qcard.dll" (ByVal hWnd As Integer) As Integer
  10. ' Reset all card values to defaults
  11. Declare Sub SetDefaultValues Lib "qcard.dll" ()
  12. ' Set the currently used card back design for cards 105 to 109
  13. Declare Sub SetCurrentBack Lib "qcard.dll" (ByVal nIndex as Integer)
  14.  
  15. ' Card drawing subs
  16. Declare Sub DrawSymbol Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nValue As Integer, ByVal x As Integer, ByVal y As Integer)
  17. Declare Sub DrawCard Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nCard As Integer, ByVal x As Integer, ByVal y As Integer)
  18. Declare Sub DrawBack Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nValue As Integer, ByVal x As Integer, ByVal y As Integer)
  19. Declare Sub DealCard Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nCard As Integer, ByVal x As Integer, ByVal y As Integer)
  20. Declare Sub RemoveCard Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nCard As Integer)
  21.  
  22. ' Get card information functions
  23. Declare Function GetCardColor Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  24. Declare Function GetCardSuit Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  25. Declare Function GetCardValue Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  26. Declare Function IsCardVisible Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  27. Declare Function GetCardBlocked Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  28. Declare Function IsCardDisabled Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  29. Declare Function GetCardX Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  30. Declare Function GetCardY Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  31. Declare Function GetUser1 Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  32. Declare Function GetUser2 Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  33. Declare Function GetUser3 Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  34. Declare Function GetUser4 Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  35.  
  36. ' Set card information subs
  37. Declare Sub SetCardVisible Lib "qcard.dll" (ByVal nCard As Integer, ByVal bValue As Integer)
  38. Declare Sub AdjustCardBlocked Lib "qcard.dll" (ByVal nCard As Integer, ByVal bValue As Integer)
  39. Declare Sub SetCardDisabled Lib "qcard.dll" (ByVal nCard As Integer, ByVal bValue As Integer)
  40. Declare Sub SetCardX Lib "qcard.dll" (ByVal nCard As Integer, ByVal x As Integer)
  41. Declare Sub SetCardY Lib "qcard.dll" (ByVal nCard As Integer, ByVal y As Integer)
  42. Declare Sub SetUser1 Lib "qcard.dll" (ByVal nCard As Integer, ByVal bValue As Integer)
  43. Declare Sub SetUser2 Lib "qcard.dll" (ByVal nCard As Integer, ByVal nValue As Integer)
  44. Declare Sub SetUser3 Lib "qcard.dll" (ByVal nCard As Integer, ByVal nValue As Integer)
  45. Declare Sub SetUser4 Lib "qcard.dll" (ByVal nCard As Integer, ByVal nValue As Integer)
  46.  
  47.  
  48. ' Dragging subs and functions
  49. Declare Function InitDrag Lib "qcard.dll" (ByVal hWnd As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
  50. Declare Sub AbortDrag Lib "qcard.dll" ()
  51. Declare Sub DoDrag Lib "qcard.dll" (ByVal hWnd As Integer, ByVal x As Integer, ByVal y As Integer)
  52. Declare Function EndDrag Lib "qcard.dll" (ByVal hWnd As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
  53. Declare Sub ReturnDrag Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nCard As Integer, ByVal nOldX As Integer, ByVal nOldY As Integer)
  54. Declare Sub BlockDrag Lib "qcard.dll" (ByVal hWnd As Integer, nFirst As Integer, ByVal nNumCards As Integer, ByVal x As Integer, ByVal y As Integer)
  55. Declare Function EndBlockDrag Lib "qcard.dll" (ByVal hWnd As Integer, nFirst As Integer, ByVal nNumCards As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
  56. Declare Sub ReturnBlockDrag Lib "qcard.dll" (ByVal hWnd As Integer, nFirst As Integer, ByVal nNumCards As Integer, ByVal x As Integer, ByVal y As Integer)
  57. Declare Function GetFreeDestination Lib "qcard.dll" (ByVal nSource As Integer) As Integer
  58.  
  59. ' Undocumented functions, generally not used
  60.  
  61. ' returns the number of any unblocked card which lies beneath the mouse coordinates x, y
  62. Declare Function PointInFreeCard Lib "qcard.dll" (ByVal x As Integer, ByVal y As Integer) As Integer
  63.  
  64. ' returns the number of any card whose top 16 pixels lie beneath the mouse coordinates x, y
  65. Declare Function PointInCardTop Lib "qcard.dll" (ByVal x As Integer, ByVal y As Integer) As Integer
  66.  
  67. ' manually sets the active drag card for a subsequent DoDrag or BlockDrag call
  68. Declare Sub SetActiveCard Lib "qcard.dll" (ByVal nCard As Integer)
  69.  
  70.  
  71.  
  72.  
  73.