

WindowTitle "Cards_.bi - Card object test"ĭraw String (x, y), "Press a key to continue", RGB(255, 255, 255) ' ini file requirements (RC is Row,Col of the graphic) ) As Integerĭim As Integer DeckL, SuitL, CardL, ArrPos 'loop varsĭim As Integer SuitMult(1 To 4) = ĭim As Integer TotCards = NumSuits * NumCardsPerSuitĭeck(ArrPos) = Pips(CardL) + SuitMult(SuitL) * 13 'AllCardsGr = Cast(fb.Image Ptr, LoadRGBAFile(RootPath + LoadDeck)) 'use FBImageįunction Card.CreatePlayDeck(NumDecks As Integer, UseJokers As Integer=0, DeckName As String="Standard") As Integerįunction Card.CreateNSPlayDeck Cdecl (NumDecks As Integer, NumSuits As Integer, NumCardsPerSuit As Integer, UseJokers As Integer. 'DataFlag = non zero - Row/Col is actual location in graphic (no calculation needed) 'DataFlag = 0 or not given - calculated position of card 'can be relative with no beginning slash "Graphics/Myster圜ards.bmp" 'If statement here, just in case some quirk in opening of file Open RootPath + DeckName + ".ini" For Input As #ff 'not going to check for file existance, programmer should know that it is there.

LoadDeck = "cards.bmp" 'change to what is needed to testĪllCardsGr = LoadRGBAFile(RootPath + LoadDeck) 'use FBImage 'Open RootPath + DeckName + ".ini" For Input As #ff 'ScreenInfo ]]]]ĭim As String RootPath = ExePath + "/" 'using common path delimiter 'width and height of card "label" (upper left and bottom right corner)Īs RowCol Deck52(51) 'there is always 52 cards in standard deckĪs Integer Jokers 'non-zero if Jokers are in graphicsĪs Integer NumBacks 'number of backs available >0Īs Integer CurBackGr 'Back in use *zero based index of Backs* ) As Integer 'DeckName can be specified as last paramĭeclare Sub Load_Normal(DeckName As String) 'left in to show how it is actually loadedĭeclare Sub Load(DeckName As String) 'test just for this 'Declare Function SameColor(C As Integer,C2 As Integer) As Integerĭeclare Function CreatePlayDeck(NumDecks As Integer, UseJokers As Integer=0, DeckName As String="Standard") As Integerĭeclare Function CreateNSPlayDeck Cdecl (NumDecks As Integer, NumSuits As Integer, NumCardsPerSuit As Integer, UseJokers As Integer. 'Declare Function SameSuit(C As Integer,C2 As Integer) As Integer 'Declare Function SameVal(C As Integer,C2 As Integer) As Integer 'return values of these are only valid for "non jokers" 'Declare Function FullStr(C As Integer) As String

'Declare Function SuitStr(C As Integer) As String 'Declare Function Suit(C As Integer) As Integer 'Declare Function FaceStr(C As Integer) As String 'Declare Function Face(C As Integer) As Integer 'Declare Sub DrawImg(ByVal XLoc As Integer, ByVal YLoc As Integer, GetCard As RowCol, Selected As Integer, Rot As Single=0) 'Rot not active 'Declare Sub DrawImg(ByVal XLoc As Integer, ByVal YLoc As Integer, GetCard As Integer, Selected As Integer, Rot As Single=0) 'Rot not active 'Declare Sub GetCardGraphic(GetCard As RowCol, tp As Any Ptr) 'Declare Sub DrawPlace(ByVal x As Integer, ByVal y As Integer, border As UInteger = rgbWhite, backg As UInteger = rgbGray) 'Declare Property LabelHeight() As Integerĭeclare Sub ClearCards() 'allow new graphic, or executed on destruction 'Declare Property LabelWidth() As Integer 'Declare Property CardHeight() As Integer ReDim Shared As Integer Deck(0) 'redim upon CreatePlayDeck or CreateNSPlayDeckĭim Shared As Integer ScrX, ScrY 'display info (set when 'Dim as Card CardObj') * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF
#Liberty basic software wrapper license#
* the above copyright notice and this license appear in all source copies. * documentation for any purpose is hereby granted without fee, provided that * Permission to use, copy, modify, distribute and sell this software and its * defining the card numbers, suits and values. * Description: The card object handles all the displaying of the cards as well Code: Select all /' based on rdc's "cardobj"
