📄 form1.frm
字号:
End
Begin VB.Label Label47
AutoSize = -1 'True
Caption = "地图编号:"
Height = 180
Left = 1800
TabIndex = 69
Top = 1200
Width = 810
End
End
End
Begin VB.Frame Frame8
Caption = "图像显示"
Height = 2775
Left = 3960
TabIndex = 13
Top = 120
Width = 2895
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H00000000&
BorderStyle = 0 'None
ClipControls = 0 'False
ForeColor = &H00000000&
Height = 2415
Left = 120
ScaleHeight = 161
ScaleMode = 3 'Pixel
ScaleWidth = 177
TabIndex = 14
Top = 240
Width = 2655
End
End
Begin VB.Frame Frame1
Caption = "基本信息"
Height = 3615
Left = 4320
TabIndex = 0
Top = 3840
Width = 2535
Begin VB.CheckBox Check1
Caption = "补丁"
Enabled = 0 'False
Height = 255
Left = 1680
TabIndex = 112
Top = 800
Width = 735
End
Begin VB.CommandButton Command9
Caption = "追加资源"
Enabled = 0 'False
Height = 255
Left = 120
TabIndex = 110
Top = 3240
Width = 1095
End
Begin VB.CommandButton Command8
Caption = "重做资源"
Enabled = 0 'False
Height = 255
Left = 1320
TabIndex = 109
Top = 3240
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "制作补丁"
Enabled = 0 'False
Height = 255
Left = 1320
TabIndex = 108
Top = 3000
Width = 1095
End
Begin VB.CommandButton Command4
Caption = "保存数据"
Enabled = 0 'False
Height = 255
Left = 120
TabIndex = 107
Top = 3000
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "读取"
Height = 255
Left = 1320
TabIndex = 1
Top = 480
Width = 855
End
Begin VB.CommandButton Command2
Caption = "路径"
Height = 255
Left = 240
TabIndex = 94
Top = 480
Width = 855
End
Begin VB.TextBox Text1
BackColor = &H8000000F&
BorderStyle = 0 'None
Height = 270
Left = 120
TabIndex = 2
Text = "E:\石器工具包\石器补丁工具\data"
Top = 240
Width = 2175
End
Begin VB.Label Label19
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 1320
TabIndex = 102
Top = 2760
Width = 90
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "Spr 容量:"
Height = 180
Index = 1
Left = 120
TabIndex = 101
Top = 2760
Width = 1170
End
Begin VB.Label Label16
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 1320
TabIndex = 100
Top = 2520
Width = 90
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 1320
TabIndex = 99
Top = 2280
Width = 90
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 1320
TabIndex = 98
Top = 2040
Width = 90
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "SprAdrn 容量:"
Height = 180
Index = 0
Left = 120
TabIndex = 97
Top = 2520
Width = 1170
End
Begin VB.Label Label56
AutoSize = -1 'True
Caption = "Real 容量:"
Height = 180
Index = 1
Left = 120
TabIndex = 96
Top = 2280
Width = 1170
End
Begin VB.Label Label55
AutoSize = -1 'True
Caption = "Adrn 容量:"
Height = 180
Index = 2
Left = 120
TabIndex = 95
Top = 2040
Width = 1170
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 1800
TabIndex = 16
Top = 1080
Width = 90
End
Begin VB.Label Label81
AutoSize = -1 'True
Caption = "动画:"
Height = 180
Index = 1
Left = 1320
TabIndex = 15
Top = 1080
Width = 450
End
Begin VB.Label Label81
AutoSize = -1 'True
Caption = "图片:"
Height = 180
Index = 0
Left = 120
TabIndex = 12
Top = 1080
Width = 450
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 600
TabIndex = 11
Top = 1080
Width = 90
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "准备!"
Height = 180
Left = 600
TabIndex = 10
Top = 840
Width = 450
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 1320
TabIndex = 9
Top = 1320
Width = 90
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 1320
TabIndex = 8
Top = 1560
Width = 90
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 1320
TabIndex = 7
Top = 1800
Width = 90
End
Begin VB.Label Label55
AutoSize = -1 'True
Caption = "图片最大编号:"
Height = 180
Index = 0
Left = 120
TabIndex = 6
Top = 1320
Width = 1170
End
Begin VB.Label Label56
AutoSize = -1 'True
Caption = "动画最大编号:"
Height = 180
Index = 0
Left = 120
TabIndex = 5
Top = 1560
Width = 1170
End
Begin VB.Label Label62
AutoSize = -1 'True
Caption = "地图最大编号:"
Height = 180
Left = 120
TabIndex = 4
Top = 1800
Width = 1170
End
Begin VB.Label Label73
AutoSize = -1 'True
Caption = "状态:"
Height = 180
Left = 120
TabIndex = 3
Top = 840
Width = 450
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim AdrnFileSize As Long
Dim RealFileSize As Long
Dim SrpAdrnFileSize As Long
Dim SrpFileSize As Long
Dim ShowPic As Boolean
Private Sub Command1_Click()
On Error Resume Next
Dim FileName As String
Dim TempStr As String
Dim Buffer() As Byte
Dim NewAddr As Long
Dim TempAdrn As Long
Dim AdrnIndexNum As Long
Dim SpradrnIndexNum As Long
ReDim AdrnIndex(0) As adrn
ReDim SpradrnIndex(0) As Spradrn
ReDim MapIndex(0) As Long
Dim AdrnNumMax As Long
Dim SpradrnNumMax As Long
Dim MapIndexMax As Long
List1.Clear
List2.Clear
AdrnIndexNum = 0
SpradrnIndexNum = 0
'=======================读Adrn数据头文件=========================================
AdrnFileSize = FileLen(Text1.Text & "\adrn.bin")
If AdrnFileSize = 0 Then
MsgBox "找不到文件!"
Exit Sub
End If
If AdrnFileSize \ LenB(AdrnIndex(0)) > 10000 Then
MsgBox "补丁图片已超过10000张,不再提供显示动画图片功能"
ShowPic = False
Else
ShowPic = True
End If
ReDim AdrnIndex(AdrnFileSize \ LenB(AdrnIndex(0)) - 1) As adrn
'打开文件
Open Text1.Text & "\adrn.bin" For Binary Access Read As #1
AdrnIndexNum = 0
AdrnLine = 0
ReDim Buffer(1 To 80) As Byte
'读文件
Label1.Caption = "读adrn"
DoEvents
Dim AdrnAddr As Long
Do While Not EOF(1)
Get #1, , Buffer
If Not EOF(1) Then
'取得图片编号
CopyMemory AdrnIndexNum, Buffer(1), 4
'保存Adrn数据结构
CopyMemory AdrnIndex(AdrnLine), Buffer(1), 80
If AdrnIndex(AdrnLine).Num < 0 Then
AdrnIndex(AdrnLine).Num = AdrnIndex(AdrnLine).Num Xor &HFFFFFFFF
AdrnIndex(AdrnLine).Addr = AdrnIndex(AdrnLine).Addr Xor &HFFFFFFFF
AdrnIndex(AdrnLine).datalen = AdrnIndex(AdrnLine).datalen Xor &HFFFFFFFF
AdrnIndex(AdrnLine).X = AdrnIndex(AdrnLine).X Xor &HFFFFFFFF
AdrnIndex(AdrnLine).Y = AdrnIndex(AdrnLine).Y Xor &HFFFFFFFF
AdrnIndex(AdrnLine).width = AdrnIndex(AdrnLine).width Xor &HFFFFFFFF
AdrnIndex(AdrnLine).height = AdrnIndex(AdrnLine).height Xor &HFFFFFFFF
AdrnIndex(AdrnLine).EastCover = AdrnIndex(AdrnLine).EastCover Xor &HFFFFFFFF
AdrnIndex(AdrnLine).SouthCover = AdrnIndex(AdrnLine).SouthCover Xor &HFFFFFFFF
If AdrnLine > 6 Then
AdrnIndex(AdrnLine).Addr = AdrnIndex(AdrnLine).Addr + 9
AdrnIndex(AdrnLine).datalen = AdrnIndex(AdrnLine).datalen - 9
End If
Check1.Value = 1
End If
If MapIndexMax < AdrnIndex(AdrnLine).MapNum Then MapIndexMax = AdrnIndex(AdrnLine).MapNum
If AdrnIndex(AdrnLine).MapNum > UBound(MapIndex) Then ReDim Preserve MapIndex(AdrnIndex(AdrnLine).MapNum) As Long
MapIndex(AdrnIndex(AdrnLine).MapNum) = AdrnIndexNum
If AdrnNumMax < AdrnIndexNum Then AdrnNumMax = AdrnIndexNum
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -