Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How do you add more tilesets to chose from?


kenny92316
 Share

Recommended Posts

I would like to know the section of code to change and if any additional code needs changed, if anyone would like to tell me that is.

Edit: I think i found it, all i need to do is chage the variables to add more sets?

Private Sub mnuType_Click(Index As Integer)
Dim BMU As BitmapUtils
Dim strfilename As String
Dim i As Byte

    mnuType(Index).Checked = True
    If Index = 1 Then
        If mnuType(1).Checked = True Then
            frmAttributes.fraLayers.Visible = True
            frmAttributes.fraAttribs.Visible = False
            mnuTileSheet.Enabled = True
            frmAttributes.Visible = True
        End If
    ElseIf Index = 2 Then
        If mnuType(2).Checked = True Then
            frmAttributes.fraLayers.Visible = False
            frmAttributes.fraAttribs.Visible = True
            shpSelected.Width = 32
            shpSelected.Height = 32
            mnuTileSheet.Enabled = True
            frmAttributes.Visible = True
        End If
    Else
        If mnuType(3).Checked = True Then
            frmAttributes.fraLayers.Visible = False
            frmAttributes.fraAttribs.Visible = False
            mnuSet(10).Checked = True

            For i = 0 To ExtraSheets
                If i <> 10 Then frmMapEditor.mnuSet(i).Checked = False
            Next i

            If ENCRYPT_TYPE = "BMP" Then
                    frmMapEditor.picBackSelect.Picture = LoadPicture(App.Path & "\GFX\Tiles" & 10 & ".bmp")
                    Else
                    Set BMU = New BitmapUtils
                    strfilename = App.Path & "/gfx/" & "tiles" & 10 & "." & Trim$(ENCRYPT_TYPE)
                    BMU.LoadByteData (strfilename)
                    BMU.DecryptByteData (Trim$(ENCRYPT_PASS))
                    BMU.DecompressByteData_ZLib
                    frmMapEditor.picBackSelect.Cls
                    frmMapEditor.picBackSelect.Width = BMU.ImageWidth
                    frmMapEditor.picBackSelect.Height = BMU.ImageHeight
                    Call BMU.Blt(frmMapEditor.picBackSelect.hDC)
                    End If

            EditorSet = 10

            scrlPicture.Max = ((picBackSelect.Height - picBack.Height) / PIC_Y)
            picBack.Width = picBackSelect.Width
            If frmMapEditor.Width > picBack.Width + scrlPicture.Width Then frmMapEditor.Width = (picBack.Width + scrlPicture.Width + 8) * Screen.TwipsPerPixelX
            If frmMapEditor.Height > (picBackSelect.Height * Screen.TwipsPerPixelX) + 800 Then frmMapEditor.Height = (picBackSelect.Height * Screen.TwipsPerPixelX) + 800
            mnuTileSheet.Enabled = False
            frmAttributes.Visible = False
        End If
    End If

    For i = 1 To 3
        If i <> Index Then mnuType(i).Checked = False
    Next i
End Sub
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...