Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Practicing DirectX
#1
Code:
Sub DisplaySpellIcons()
' Icons
        Dim M As Long
        Dim Mm As Long
        Dim TI As Long
        Dim sDc As Long
              
        If GetTickCount > TI + 500 Then
            For M = 0 To MAX_PLAYER_SPELLS - 1
                Mm = Player(MyIndex).Spell(M + 1)
    With rec
        .top = Spell(Mm).Pic * PIC_Y
        .Bottom = .top + PIC_Y
        .Left = 0
        .Right = .Left + PIC_X
    End With
  
    With rec_pos
        .top = 0
        .Bottom = PIC_Y
        .Left = 0
        .Right = PIC_X
    End With

    DD_SpellIconSurf.BltToDC frmMirage.picSpell(M).hDC, rec, rec_pos
    frmMirage.picSpell(M).Refresh
    'Call BitBlt(frmMirage.picSpell(M).hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picSpellIcons.hDC, (Spell(Mm).Pic - Int(Spell(Mm).Pic / 6) * 6) * PIC_X, Int(Spell(Mm).Pic / 6) * PIC_Y, SRCCOPY)
            Next M
        End If
End Sub

It originally used BitBlt, and Im making it use BltToDc instead because I heard it was better, and I successfully did it with something else, but with this I am getting an RTE 9 on this line..

Code:
.top = Spell(Mm).Pic * PIC_Y

Any ideas?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)