Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

DirectDraw7 Question


VitinhooxD
 Share

Recommended Posts

Hello Eclipse.
Me and my friend were figuring out how to code a hotbar to EO , and we got stuck at trying to blt the images to a picture box.The code has no error tho it doesnt blt the icon.

```
Sub BltHotBar()
Dim rec As RECT, rec_pos As RECT
Dim i As Long
Dim iconnum As Long

If Not InGame Then Exit Sub

For i = 1 To 1

frmMainGame.picHotbar(i).Cls

With rec_pos
.Top = 0
.Bottom = 32
.Left = 0
.Right = 32
End With

  If Hotbar(MyIndex).SlotType(i) = 1 Then
      iconnum = Spell(Hotbar(MyIndex).Slot(i)).Icon
      frmMainGame.picHotbar(1).Picture = Nothing
        With rec
        .Top = 0
        .Bottom = 32
        .Left = 0
        .Right = 32
        End With
        If DDS_SpellIcon(i) Is Nothing Then
        Call InitDDSurf("spellicons\" & iconnum, DDSD_SpellIcon(i), DDS_SpellIcon(i))
        End If
        Engine_BltToDC DDS_SpellIcon(i), rec, rec_pos, frmMainGame.picHotbar(i), False

    End If

    If Hotbar(MyIndex).SlotType(i) = 2 Then
    iconnum = Item(Hotbar(MyIndex).Slot(i)).Pic
          frmMainGame.picHotbar(1).Picture = Nothing

            With rec
            .Top = 0
            .Left = 32
            .Bottom = 32
            .Right = 64
            End With
                    If DDS_SpellIcon(i) Is Nothing Then
        Call InitDDSurf("item\" & iconnum, DDSD_Item(i), DDS_Item(i))
        End If
        Engine_BltToDC DDS_Item(i), rec, rec_pos, frmMainGame.picHotbar(i), False
    End If
    frmMainGame.picHotbar(i).Refresh
Next

End Sub
```
Thanks ,
Vitin.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...