Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small Issue with Spells
#4
This is my sub:

Code:
Public Sub SpellEditorBltSpell()
Dim SpellNum As Long
Dim sRECT As DxVBLib.RECT
Dim dRECT As DxVBLib.RECT

    SpellNum = frmSpellEditor.scrlPic.Value

    If SpellNum < 1 Or SpellNum > NumSpells Then
        frmSpellEditor.picPic.Cls
        Exit Sub
    End If
    
    SpellTimer(SpellNum) = GetTickCount + SurfaceTimerMax

    If DDS_Spell(SpellNum) Is Nothing Then
        Call InitDDSurf("spells\" & SpellNum, DDSD_Spell(SpellNum), DDS_Spell(SpellNum))
    End If
    
    frmSpellEditor.scrlFrame.Max = (DDSD_Spell(SpellNum).lWidth \ SIZE_X) - 1
    
    sRECT.Top = 0
    sRECT.Bottom = SIZE_Y
    sRECT.Left = frmSpellEditor.scrlFrame.Value * SIZE_X
    sRECT.Right = sRECT.Left + SIZE_X
    
    dRECT.Top = 0
    dRECT.Bottom = SIZE_Y
    dRECT.Left = 0
    dRECT.Right = SIZE_X

    Call Engine_BltToDC(DDS_Spell(SpellNum), sRECT, dRECT, frmSpellEditor.picPic)

End Sub

Compare them.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)