Print Page | Close Window

(Shann’s Version) Item Editor Fixes (Part

Printed From: Mirage Source
Category: Tutorials
Forum Name: Temporary Archive (Read Only)
Forum Discription: Temporary 3.0.3 archive tutorials, will be deleted when converted.
URL: http://ms.shannaracorp.com/backup-forums/forum_posts.asp?TID=209
Printed Date: 20 December 2006 at 5:53pm
Software Version: Web Wiz Forums 8.01 - http://www.webwizforums.com


Topic: (Shann’s Version) Item Editor Fixes (Part
Posted By: Sync
Subject: (Shann’s Version) Item Editor Fixes (Part
Date Posted: 11 February 2006 at 3:33pm
Ok, some of you have seen my other small tutorial. This one will help keep the memory footprint of the client "smaller", for those who edit items. (there will be more tutorials concerning this soon) ...

01. Open modGameLogic.bas
02. Find "Public Sub ItemEditorInit()"
03. Delete the following:

frmItemEditor.picItems.Picture = LoadPicture(App.Path & "\items.bmp")


04. Replace the following:

Public Sub ItemEditorBltItem()
Call BitBlt(frmItemEditor.picPic.hdc, 0, 0, PIC_X, PIC_Y, frmItemEditor.picItems.hdc, 0, frmItemEditor.scrlPic.Value * PIC_Y, SRCCOPY)
End Sub


With ....


Public Sub ItemEditorBltItem()
Dim sRECT As RECT
Dim dRECT As RECT
    
With dRECT
    .top = 0
    .Bottom = PIC_Y
    .Left = 0
    .Right = PIC_X
End With

If DD_ItemSurf Is Nothing Then
Else
    With sRECT
        If frmItemEditor.scrlPic.Value = 0 Then
             .top = 0
        Else
             .top = frmItemEditor.scrlPic.Value * PIC_Y
        End If
        .Left = 0
        .Right = PIC_X
        .Bottom = .top + PIC_Y
    End With
    Call DD_ItemSurf.BltToDC(frmItemEditor.picPic.hdc, sRECT, dRECT)
    frmItemEditor.picPic.Refresh
End If

End Sub



05. Add the following code into frmItemEditor so you will not have any scrolling limits when you change your MAX_ITEMS:

Private Sub Form_Load()
scrlPic.Max = MAX_ITEMS
End Sub




Print Page | Close Window

Bulletin Board Software by Web Wiz Forums version 8.01 - http://www.webwizforums.com
Copyright ©2001-2006 Web Wiz Guide - http://www.webwizguide.info