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

Blitting custom image to hotbar?


damian666
 Share

Recommended Posts

```
Select Case Hotbar(I).sType
            Case 1 ' inventory
                If Len(Item(Hotbar(I).Slot).Name) > 0 Then
                    If Item(Hotbar(I).Slot).Pic > 0 Then
                        If DDS_Item(Item(Hotbar(I).Slot).Pic) Is Nothing Then
                            Call InitDDSurf("Item\" & Item(Hotbar(I).Slot).Pic, DDSD_Item(Item(Hotbar(I).Slot).Pic), DDS_Item(Item(Hotbar(I).Slot).Pic))
                        End If
                        Engine_BltToDC DDS_Item(Item(Hotbar(I).Slot).Pic), sRECT, dRECT, frmMain.picHotbar, False
                    End If
                End If
            Case 2 ' spell

            Case 3 ' Pokemon
                For x = 1 To 6
                    If Len(Player(MyIndex).PokeRoster(x).Name) > 0 Then
                        If Player(MyIndex).PokeRoster(x).Dex > 0 Then
                            If DDS_Pokes(x) Is Nothing Then
                                Call InitDDSurf("icons\" & Player(MyIndex).PokeRoster(x).Dex, DDSD_Pokes(x), DDS_Pokes(x))
                            End If
                            Engine_BltToDC DDS_Pokes(x), sRECT, dRECT, frmMain.picHotbar, False
                        End If
                    End If
                Next

        End Select

```
as far as I know, this should load up just fine, I am noob with DX :)

also tried using "I" from the hotbar, and some other dodggy things…

any pointers?

Edit: No errors are thrown

Dami
Link to comment
Share on other sites

yes, its called allright, and seeying the letters are rendered, which also use the rect, those are fine too O.o

trying to add debug.print to output teh rect's

dami

edit:

       ```
Debug.Print dRECT.Bottom
        Debug.Print dRECT.Left
        Debug.Print dRECT.Right
        Debug.Print dRECT.top

        Debug.Print sRECT.Bottom
        Debug.Print sRECT.Left
        Debug.Print sRECT.Right
        Debug.Print sRECT.top

```
```
402
434
2
32

32
64
0
34

2
34
2
32

32
64
0
34

82
114
2
32

32
64
0
34

162
194
2
32

32
64
0
34

242
274
2
32

32
64
0
34

322
354
2
32

32
64
0
34

```
please note I modified hotbar to only show 6 spaces, further from eachother.

but that part works, because if I drop 6 items on it, it renders just fine…
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...