Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 371
  • Last Modified:

CARD GAMES

I am a young programmer with a problem: I am developing a card game (WIN95)  in which I want to achieve an effect similar to "Passing Left", etc.  in MS Hearts, where the user clicks on any card and it displays it above the other cards.  I am using the QCARDS32.DLL by Mike Stanley, which I downloaded off the internet as freeware.  Anyways, when I try to achieve this effect, there is a real video mess, as cards are chopped and cut up.  I need some input on how to achieve this effect (with this DLL or with another).  Thankyou.  
0
dbajwa
Asked:
dbajwa
1 Solution
 
twardCommented:
I would try the Microsoft DLL called CARDS32.DLL, here is the relevant information for it:

''*-----------------------------------------------------------------------------
'|    CARDS.BAS
'|
'|    VB Declares for CARDS32.DLL file
'|
'|  Copyright(c) 1996 Microsoft Corporation
'-----------------------------------------------------------------------------*'

Public RA As Integer '     '* Rank *'
Public SU As Integer '     '* Suit *'
Public cd As Integer '     '* Card *'

''*-----------------------------------------------------------------------------
'| cdtDraw and cdtDrawExt mode flags
'-----------------------------------------------------------------------------*'

Const mdFaceUp = 0           '* Draw card face up, card to draw specified by cd *'
Const mdFaceDown = 1         '* Draw card face down, back specified by cd (cdFaceDownFirst..cdFaceDownLast) *'
Const mdHilite = 2           '* Same as FaceUp except drawn with NOTSRCCOPY mode *'
Const mdGhost = 3            '* Draw a ghost card -- for ace piles *'
Const mdRemove = 4           '* draw background specified by rgbBgnd *'
Const mdInvisibleGhost = 5   '* ? *'
Const mdDeckX = 6            '* Draw X *'
Const mdDeckO = 7            '* Draw O *'

''*-----------------------------------------------------------------------------
'| Suit and card indices.  Orders of BOTH are important
'-----------------------------------------------------------------------------*'

Const suClub = 0
Const suDiamond = 1
Const suHeart = 2
Const suSpade = 3
Const suMax = 4
Const suFirst = suClub
Const raAce = 0
Const raTwo = 1
Const raThree = 2
Const raFour = 3
Const raFive = 4
Const raSix = 5
Const raSeven = 6
Const raEight = 7
Const raNine = 8
Const raTen = 9
Const raJack = 10
Const raQueen = 11
Const raKing = 12
Const raMax = 13
Const raNil = 15
Const raFirst = raAce

Const cdAClubs = 0
Const cd2Clubs = 4
Const cd3Clubs = 8
Const cd4Clubs = 12
Const cd5Clubs = 16
Const cd6Clubs = 20
Const cd7Clubs = 24
Const cd8Clubs = 28
Const cd9Clubs = 32
Const cdTClubs = 36
Const cdJClubs = 40
Const cdQClubs = 44
Const cdKClubs = 48
Const cdADiamonds = 1
Const cd2Diamonds = 5
Const cd3Diamonds = 9
Const cd4Diamonds = 13
Const cd5Diamonds = 17
Const cd6Diamonds = 21
Const cd7Diamonds = 25
Const cd8Diamonds = 29
Const cd9Diamonds = 33
Const cdTDiamonds = 37
Const cdJDiamonds = 41
Const cdQDiamonds = 45
Const cdKDiamonds = 49
Const cdAHearts = 2
Const cd2Hearts = 6
Const cd3Hearts = 10
Const cd4Hearts = 14
Const cd5Hearts = 18
Const cd6Hearts = 22
Const cd7Hearts = 26
Const cd8Hearts = 30
Const cd9Hearts = 34
Const cdTHearts = 38
Const cdJHearts = 42
Const cdQHearts = 46
Const cdKHearts = 50
Const cdASpades = 3
Const cd2Spades = 7
Const cd3Spades = 11
Const cd4Spades = 15
Const cd5Spades = 19
Const cd6Spades = 23
Const cd7Spades = 27
Const cd8Spades = 31
Const cd9Spades = 35
Const cdTSpades = 39
Const cdJSpades = 43
Const cdQSpades = 47
Const cdKSpades = 51

'/*-----------------------------------------------------------------------------
'| Face down cds
'-----------------------------------------------------------------------------*/

Const cdFaceDown1 = 53    ' Crosshatch
Const cdFaceDown2 = 54    ' Weave 1
Const cdFaceDown3 = 55    ' Weave 2
Const cdFaceDown4 = 56    ' Robot
Const cdFaceDown5 = 57    ' Flowers
Const cdFaceDown6 = 58    ' Vine 1
Const cdFaceDown7 = 59    ' Vine 2
Const cdFaceDown8 = 60    ' Fish 1
Const cdFaceDown9 = 61    ' Fish 2
Const cdFaceDown10 = 62   ' Shells
Const cdFaceDown11 = 63   ' Castle
Const cdFaceDown12 = 64   ' Island
Const cdFaceDown13 = 65   ' Cardhand
Const THE_X = 67          ' Pile out
Const THE_0 = 68          ' End of pile
Const cdFaceDownFirst = cdFaceDown1
Const cdFaceDownLast = cdFaceDown13

#If Win32 Then
Declare Function cdtInit Lib "Cards32.Dll" ( _
    dx As Long, dy As Long) As Long
Declare Function cdtDrawExt Lib "Cards32.Dll" (ByVal hdc As Long, _
    ByVal x As Long, ByVal y As Long, ByVal dx As Long, ByVal dy As Long, _
    ByVal ordCard As Long, ByVal iDraw As Long, ByVal clr As Long) As Long
Declare Function cdtDraw Lib "Cards32.Dll" (ByVal hdc As Long, _
    ByVal x As Long, ByVal y As Long, _
    ByVal iCard As Long, ByVal iDraw As Long, ByVal clr As Long) As Long
Declare Function cdtAnimate Lib "Cards32.Dll" (ByVal hdc As Long, _
    ByVal iCardBack As Long, ByVal x As Long, ByVal y As Long, _
    ByVal iState As Long) As Long
Declare Function cdtTerm Lib "Cards32.Dll" () As Long
#Else
Declare Function cdtInit Lib "Cards.Dll" (dx As Integer, dy As Integer) As Integer
Declare Function cdtDrawExt Lib "Cards.Dll" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal iCard As Integer, ByVal iDraw As Integer, ByVal clr As Long) As Integer
Declare Function cdtDraw Lib "Cards.Dll" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer, ByVal iCard As Integer, ByVal iDraw As Integer, ByVal clr As Long) As Integer
Declare Function cdtAnimate Lib "Cards.Dll" (ByVal hdc As Integer, ByVal iCardBack As Integer, ByVal x As Integer, ByVal y As Integer, ByVal iState As Integer) As Integer
Declare Function cdtTerm Lib "Cards.Dll" Alias "CdtTerm" () As Integer
#End If

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now