Mirage Source

Free ORPG making software.
It is currently Tue May 21, 2024 7:29 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Apr 06, 2009 6:10 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
This might be useful...not sure if it increases any speed (default sizes are 32x32 starting at 0,0 (useful for setting destination rects))

Code:
Public Function Get_RECT(Optional ByVal TopVal As Long = 0, Optional ByVal LeftVal As Long = 0, Optional ByVal Width As Long = SIZE_X, Optional ByVal Height As Long = SIZE_Y) As DXVBLib.RECT
    With Get_RECT
        .Top = TopVal
        .Bottom = .Top + Height
        .Left = LeftVal
        .Right = .Left + Width
    End With
End Function


Used:

Code:
Public Sub SpellEditorBltIcon()
Dim sRECT As DXVBLib.RECT
Dim dRECT As DXVBLib.RECT

    sRECT = Get_RECT(frmSpellEditor.scrlIcon.Value * SIZE_Y)
    dRECT = Get_RECT
   
    Engine_BltToDC DDS_SpellIcon, sRECT, dRECT, frmSpellEditor.picIcon

End Sub

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Mon Apr 06, 2009 6:54 pm 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
Nice. I prefer this method far more as opposed to the other one.


Top
 Profile  
 
PostPosted: Mon Apr 06, 2009 6:59 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
I've got my source fully converted to using this function and it works 100% ;)

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group