ok here is the file...
;=================================
; Cards.bb
; Include file Kingdom Cards.bb
;=================================
; Load all the card images
Global Card_Effect_Image
Global Card_Overlay_Image
Global Card_Enemy_Image
Global Card_Friend_Image
Global Card_Item_Image
Global Card_Magic_Image
Global Card_Rare_Image
Global Card_Weapon_Image
Global Card_Map01_Image
Global Card_Map02_Image
Global Card_Map03_Image
Global Card_Map04_Image
; Card Types
Type Card
Field Name$
Field Identity%
Field Back%
End Type
Global Card.Card
; Load the card images
Function LoadCardImages()
Card_Effect_Image = LoadAnimImage("Graphics\Cards_Effects.bmp", 28, 39, 0, 5): MaskImage Card_Effect_Image, 255, 0, 255
Card_Overlay_Image = LoadAnimImage("Graphics\Cards_Overlay.bmp", 28, 39, 0, 10): MaskImage Card_Overlay_Image, 255, 0, 255
Card_Enemy_Image = LoadAnimImage("Graphics\Cards_Enemy.bmp", 26, 28, 0, 49): MaskImage Card_Enemy_Image, 255, 0, 255
Card_Friend_Image = LoadAnimImage("Graphics\Cards_Friends.bmp", 26, 28, 0, 8): MaskImage Card_Friend_Image, 255, 0, 255
Card_Item_Image = LoadAnimImage("Graphics\Cards_Items.bmp", 26, 28, 0, 8): MaskImage Card_Item_Image, 255, 0, 255
Card_Magic_Image = LoadAnimImage("Graphics\Cards_Magic.bmp", 26, 28, 0, 14): MaskImage Card_Magic_Image, 255, 0, 255
Card_Rare_Image = LoadAnimImage("Graphics\Cards_Rare.bmp", 26, 28, 0, 16): MaskImage Card_Rare_Image, 255, 0, 255
Card_Weapon_Image = LoadAnimImage("Graphics\Cards_Weapons.bmp", 26, 28, 0, 18): MaskImage Card_Weapon_Image, 255, 0, 255
Card_Map01_Image = LoadAnimImage("Graphics\Cards_Map01.bmp", 26, 28, 0, 9): MaskImage Card_Map01_Image, 255, 0, 255
Card_Map02_Image = LoadAnimImage("Graphics\Cards_Map02.bmp", 26, 28, 0, 7): MaskImage Card_Map02_Image, 255, 0, 255
Card_Map03_Image = LoadAnimImage("Graphics\Cards_Map03.bmp", 26, 28, 0, 6): MaskImage Card_Map03_Image, 255, 0, 255
Card_Map04_Image = LoadAnimImage("Graphics\Cards_Map04.bmp", 26, 28, 0, 4): MaskImage Card_Map04_Image, 255, 0, 255
End Function
; Load the card data base
Function LoadCardDataBase()
For i = 0 To 48
Card = New Card
Card\Name = "???? (Enemey)"
Card\Identity = i
Card\Back = 0
Next
For i = 49 To 56
Card = New Card
Card\Name = "???? (Friend)"
Card\Identity = i - 49
Card\Back = 1
Next
For i = 57 To 64
Card = New Card
Card\Name = "???? (Item)"
Card\Identity = i - 57
Card\Back = 2
Next
For i = 65 To 78
Card = New Card
Card\Name = "???? (Magic)"
Card\Identity = i - 65
Card\Back = 3
Next
For i = 79 To 93
Card = New Card
Card\Name = "???? (Rare)"
Card\Identity = i - 78
Card\Back = 4
Next
For i = 94 To 111
Card = New Card
Card\Name = "???? (Weapon)"
Card\Identity = i - 94
Card\Back = 5
Next
For i = 112 To 120
Card = New Card
Card\Name = "???? (Map 01)"
Card\Identity = i - 112
Card\Back = 6
Next
For i = 121 To 127
Card = New Card
Card\Name = "???? (Map 02)"
Card\Identity = i - 121
Card\Back = 7
Next
For i = 128 To 133
Card = New Card
Card\Name = "???? (Map 03)"
Card\Identity = i - 128
Card\Back = 8
Next
For i = 133 To 136
Card = New Card
Card\Name = "???? (Map 04)"
Card\Identity = i - 133
Card\Back = 9
Next
End Function
; Draw a card
Function DrawCard(c.Card, X#, Y#)
Select Card\Back
Case 0: DrawImage(Card_Enemy_Image, X + 2, Y + 11, Card\Identity)
Case 1: DrawImage(Card_Friend_Image, X + 2, Y + 11, Card\Identity)
Case 2: DrawImage(Card_Item_Image, X + 2, Y + 11, Card\Identity)
Case 3: DrawImage(Card_Magic_Image, X + 2, Y + 11, Card\Identity)
Case 4: DrawImage(Card_Rare_Image, X + 2, Y + 11, Card\Identity)
Case 5: DrawImage(Card_Weapon_Image, X + 2, Y + 11, Card\Identity)
Case 6: DrawImage(Card_Map01_Image, X + 2, Y + 11, Card\Identity)
Case 7: DrawImage(Card_Map02_Image, X + 2, Y + 11, Card\Identity)
Case 8: DrawImage(Card_Map03_Image, X + 2, Y + 11, Card\Identity)
Case 9: DrawImage(Card_Map04_Image, X + 2, Y + 11, Card\Identity)
End Select
DrawImage(Card_Overlay_Image, X, Y, Card\Back)
End Function
; Draws all the cards (for checking ONLY)
Function DrawAllCards()
x = 0: y = 0: delmsg = True
For Card = Each Card
If x > 21 Then
x = 0
y = y + 1
EndIf
DrawCard(Card, x * 28, y * 39)
If ImagesCollide(Mouse_Image, MouseX(), MouseY(), 0, Card_Enemy_Image, x * 28, y * 39, 0) Then
DrawMsg("Card Name: " + Card\name, 320, 400, True, True)
delmsg = False
Else
If delmsg = True Then
For MsgBox = Each MsgBox
Delete MsgBox
Next
EndIf
EndIf
x = x + 1
Next
End Function
nothing fancy. If you choose continue from the menu it should draw all the cards.
I have another source file here. it is the most complete so far however it is 2d.
http://www.diablogames.133h.co.uk/htasimp.zipThis game allows you to explore your hard drive in a very different way. thier was going to be an anim to the game however as it stands thier isn't so you can make it up. the idea was that your PC would determain who the story evoles. at the mo it has a very basic upgrade system in place but its a start and can easily be updated. also the name and graphics could do with updateding too.