24-03-2009, 04:18 PM
This is my sub:
Compare them.
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.