home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 4335
- ClientLeft = 2070
- ClientTop = 2085
- ClientWidth = 7080
- LinkTopic = "Form1"
- ScaleHeight = 4335
- ScaleWidth = 7080
- Begin VB.TextBox Text2
- Height = 285
- Left = 4320
- TabIndex = 2
- Text = "Text2"
- Top = 2040
- Width = 2655
- End
- Begin VB.ListBox List1
- Height = 1815
- Left = 4320
- TabIndex = 1
- Top = 120
- Width = 2655
- End
- Begin VB.PictureBox Picture1
- Height = 4095
- Left = 120
- ScaleHeight = 269
- ScaleMode = 3 'Pixel
- ScaleWidth = 269
- TabIndex = 0
- Top = 120
- Width = 4095
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Const Msg = "ION FORMAT VERSION: 1.0"
- Private Sub Form_Load()
- Call LoadStuff
- Call UpdateList
- List1.ListIndex = 0
- End Sub
- Sub LoadStuff()
- On Error GoTo Errr:
- Open "ObjectImprints.Dat" For Input As #1
- Line Input #1, a$
- Line Input #1, a$
- If a$ = "[ENDOFFILE]" Then Exit Do
- If a$ = "[OBJIMPRINT]" Then
- Currimp = Currimp + 1
- Line Input #1, a$
- Temps(Currimp).Name = a$
- For X = 1 To 10
- For Y = 1 To 10
- Line Input #1, a$
- Temps(Currimp).TemplateArray(X, Y) = Val(a$)
- Next Y
- Next X
- End If
- Errr:
- Close #1
- End Sub
- Sub SaveStuff()
- Open "ObjectImprints.Dat" For Output As #1
- Print #1, Msg
- For i = 1 To 80
- Print #1, "[OBJIMPRINT]"
- Print #1, Temps(i).Name
- For X = 1 To 10
- For Y = 1 To 10
- If Temps(i).TemplateArray(X, Y) = True Then
- Print #1, -1
- Else
- Print #1, 0
- End If
- Next Y
- Next X
- Print #1, "[ENDOBJIMPRINT]"
- Next i
- Print #1, "[ENDOFFILE]"
- Close #1
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Call SaveStuff
- End Sub
- Private Sub List1_Click()
- CurrentTemp = List1.ListIndex + 1
- Call DrawTemplate(CurrentTemp)
- Text2.Text = Temps(CurrentTemp).Name
- End Sub
- Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- On Error Resume Next
- X1 = Int((X / BSize) + 1)
- Y1 = Int((Y / BSize) + 1)
- If Button = 1 Then
- Temps(CurrentTemp).TemplateArray(X1, Y1) = True
- Call DrawTemplate(CurrentTemp)
- ElseIf Button = 2 Then
- Temps(CurrentTemp).TemplateArray(X1, Y1) = False
- Call DrawTemplate(CurrentTemp)
- End If
- End Sub
- Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- On Error Resume Next
- X1 = Int((X / BSize) + 0.5)
- Y1 = Int((Y / BSize) + 0.5)
- If Button = 1 Then
- Temps(CurrentTemp).TemplateArray(X1, Y1) = True
- Call DrawTemplate(CurrentTemp)
- ElseIf Button = 2 Then
- Temps(CurrentTemp).TemplateArray(X1, Y1) = False
- Call DrawTemplate(CurrentTemp)
- End If
- End Sub
- Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)
- Temps(CurrentTemp).Name = Text2.Text
- List1.List(CurrentTemp - 1) = Text2.Text
- End Sub
-