Item Import/Export Range

Removed the vague 'Skip old items' checkbox for import/export and replaced it with two dropdown boxes. The import/export all buttons were changed to import/export the range of items specified by the new dropdowns.
This commit is contained in:
Dreuu
2018-09-25 01:00:38 -04:00
parent f692474faa
commit a01eb02097
18 changed files with 187 additions and 143 deletions

Binary file not shown.

View File

@@ -480,4 +480,79 @@ Module ExportDataFunctions
End Sub
Public Sub ExportItemINI(DataPath As String, ItemIndex As Integer, Optional Individual As Boolean = False)
Dim DataFolder As String = DataPath
Dim ItemBaseOff As Integer = Int32.Parse((GetString(GetINIFileLocation(), header, "ItemData", "")), System.Globalization.NumberStyles.HexNumber)
Dim ItemPicDataOff As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber)
If Not Individual Then
DataPath = DataPath & "\Items\" & ItemIndex & ".ini"
End If
Dim ItemName As String = GetItemName(ItemIndex)
Dim ItemID As String = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 14) + (ItemIndex * 44), 2))), System.Globalization.NumberStyles.HexNumber)
Dim Price As String = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 16) + (ItemIndex * 44), 2))), System.Globalization.NumberStyles.HexNumber)
Dim HoldEffect As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 18) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim Value As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 19) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim DescriptionPointer As String = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 20) + (ItemIndex * 44), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
Dim Mystery1 As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 24) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim Mystery2 As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 25) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim Pocket As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 26) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim ItemType As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 27) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim FieldUsagePointer As String = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 28) + (ItemIndex * 44), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
Dim BattleUsagePointer As String = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 36) + (ItemIndex * 44), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
Dim BUText As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 32) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim ExtraParam As String = ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 40) + (ItemIndex * 44), 4))
Dim ItemPicDataOffSpecific As String = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ItemPicDataOff + (ItemIndex * 8), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
Dim ItemPalDataOffSpecific As String = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ItemPicDataOff + (ItemIndex * 8) + 4, 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
Dim CurrentItemDescripLength As Integer
FileNum = FreeFile()
FileOpen(FileNum, LoadedROM, OpenMode.Binary)
Dim ItemDescp As String = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
If ItemIndex = 377 Then
ItemDescp = ""
Else
FileGet(FileNum, ItemDescp, Int32.Parse(((DescriptionPointer)), System.Globalization.NumberStyles.HexNumber) + 1, True)
ItemDescp = Sapp2Asc(ItemDescp)
ItemDescp = Mid$(ItemDescp, 1, InStr(1, ItemDescp, "\x"))
'ItemDescp = Replace(ItemDescp, "\n", vbCrLf)
'ItemDescp = Replace(RTrim$(ItemDescp), "\", "")
ItemDescp = ItemDescp & "x"
End If
CurrentItemDescripLength = Len(ItemDescp)
FileClose(FileNum)
If Not Individual Then
ExportItemPicture(DataFolder & "\Items\ItemPics\" & ItemIndex & ".png", ItemIndex)
End If
If System.IO.File.Exists(DataPath) Then
System.IO.File.Delete(DataPath)
End If
WriteString(DataPath, "Item", "ItemName", ItemName)
WriteString(DataPath, "Item", "Price", Price)
WriteString(DataPath, "Item", "HoldEffect", HoldEffect)
WriteString(DataPath, "Item", "Value", Value)
WriteString(DataPath, "Item", "ItemDescp", ItemDescp)
WriteString(DataPath, "Item", "Mystery1", Mystery1)
WriteString(DataPath, "Item", "Mystery2", Mystery2)
WriteString(DataPath, "Item", "Pocket", Pocket)
WriteString(DataPath, "Item", "ItemType", ItemType)
WriteString(DataPath, "Item", "FieldUsagePointer", FieldUsagePointer)
WriteString(DataPath, "Item", "BattleUsagePointer", BattleUsagePointer)
WriteString(DataPath, "Item", "BUText", BUText)
WriteString(DataPath, "Item", "ExtraParam", ExtraParam)
WriteString(DataPath, "Item", "ItemName", ItemName)
End Sub
End Module

View File

@@ -952,81 +952,6 @@ Module ImportDataFunctions
WriteHEX(LoadedROM, sOffset, ReverseHEX(Hex((ImgNewOffset) + &H8000000)))
End Sub
Public Sub ExportItemINI(DataPath As String, ItemIndex As Integer, Optional Individual As Boolean = False)
Dim DataFolder As String = DataPath
Dim ItemBaseOff As Integer = Int32.Parse((GetString(GetINIFileLocation(), header, "ItemData", "")), System.Globalization.NumberStyles.HexNumber)
Dim ItemPicDataOff As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber)
If Not Individual Then
DataPath = DataPath & "\Items\" & ItemIndex & ".ini"
End If
Dim ItemName As String = GetItemName(ItemIndex)
Dim ItemID As String = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 14) + (ItemIndex * 44), 2))), System.Globalization.NumberStyles.HexNumber)
Dim Price As String = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 16) + (ItemIndex * 44), 2))), System.Globalization.NumberStyles.HexNumber)
Dim HoldEffect As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 18) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim Value As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 19) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim DescriptionPointer As String = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 20) + (ItemIndex * 44), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
Dim Mystery1 As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 24) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim Mystery2 As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 25) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim Pocket As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 26) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim ItemType As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 27) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim FieldUsagePointer As String = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 28) + (ItemIndex * 44), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
Dim BattleUsagePointer As String = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 36) + (ItemIndex * 44), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
Dim BUText As String = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 32) + (ItemIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber)
Dim ExtraParam As String = ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 40) + (ItemIndex * 44), 4))
Dim ItemPicDataOffSpecific As String = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ItemPicDataOff + (ItemIndex * 8), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
Dim ItemPalDataOffSpecific As String = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ItemPicDataOff + (ItemIndex * 8) + 4, 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
Dim CurrentItemDescripLength As Integer
FileNum = FreeFile()
FileOpen(FileNum, LoadedROM, OpenMode.Binary)
Dim ItemDescp As String = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
If ItemIndex = 377 Then
ItemDescp = ""
Else
FileGet(FileNum, ItemDescp, Int32.Parse(((DescriptionPointer)), System.Globalization.NumberStyles.HexNumber) + 1, True)
ItemDescp = Sapp2Asc(ItemDescp)
ItemDescp = Mid$(ItemDescp, 1, InStr(1, ItemDescp, "\x"))
'ItemDescp = Replace(ItemDescp, "\n", vbCrLf)
'ItemDescp = Replace(RTrim$(ItemDescp), "\", "")
ItemDescp = ItemDescp & "x"
End If
CurrentItemDescripLength = Len(ItemDescp)
FileClose(FileNum)
If Not Individual Then
ExportItemPicture(DataFolder & "\Items\ItemPics\" & ItemIndex & ".png", ItemIndex)
End If
If System.IO.File.Exists(DataPath) Then
System.IO.File.Delete(DataPath)
End If
WriteString(DataPath, "Item", "ItemName", ItemName)
WriteString(DataPath, "Item", "Price", Price)
WriteString(DataPath, "Item", "HoldEffect", HoldEffect)
WriteString(DataPath, "Item", "Value", Value)
WriteString(DataPath, "Item", "ItemDescp", ItemDescp)
WriteString(DataPath, "Item", "Mystery1", Mystery1)
WriteString(DataPath, "Item", "Mystery2", Mystery2)
WriteString(DataPath, "Item", "Pocket", Pocket)
WriteString(DataPath, "Item", "ItemType", ItemType)
WriteString(DataPath, "Item", "FieldUsagePointer", FieldUsagePointer)
WriteString(DataPath, "Item", "BattleUsagePointer", BattleUsagePointer)
WriteString(DataPath, "Item", "BUText", BUText)
WriteString(DataPath, "Item", "ExtraParam", ExtraParam)
WriteString(DataPath, "Item", "ItemName", ItemName)
End Sub
Public Sub ImportItem(DataPath As String, ItemIndex As Integer, Optional Individual As Boolean = False)
Dim iniPath As String = ""

View File

@@ -65,7 +65,6 @@ Partial Class ItemEditor
Me.BUTextBox = New System.Windows.Forms.TextBox()
Me.Label15 = New System.Windows.Forms.Label()
Me.ExtParTxt = New System.Windows.Forms.TextBox()
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
Me.Button7 = New System.Windows.Forms.Button()
Me.Button5 = New System.Windows.Forms.Button()
Me.Button4 = New System.Windows.Forms.Button()
@@ -74,6 +73,8 @@ Partial Class ItemEditor
Me.Button1 = New System.Windows.Forms.Button()
Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
Me.ComboBox2 = New System.Windows.Forms.ComboBox()
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
Me.FolderBrowserDialog = New System.Windows.Forms.FolderBrowserDialog()
Me.SaveFileDialog = New System.Windows.Forms.SaveFileDialog()
Me.OpenFileDialog = New System.Windows.Forms.OpenFileDialog()
@@ -491,87 +492,77 @@ Partial Class ItemEditor
Me.ExtParTxt.Size = New System.Drawing.Size(123, 26)
Me.ExtParTxt.TabIndex = 52
'
'CheckBox1
'
Me.CheckBox1.AutoSize = True
Me.CheckBox1.Location = New System.Drawing.Point(280, 25)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(167, 24)
Me.CheckBox1.TabIndex = 67
Me.CheckBox1.Text = "Skip Original Items"
Me.CheckBox1.UseVisualStyleBackColor = True
'
'Button7
'
Me.Button7.Location = New System.Drawing.Point(135, 21)
Me.Button7.Location = New System.Drawing.Point(153, 25)
Me.Button7.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.Button7.Name = "Button7"
Me.Button7.Size = New System.Drawing.Size(125, 31)
Me.Button7.Size = New System.Drawing.Size(122, 34)
Me.Button7.TabIndex = 66
Me.Button7.Text = "Export Picture"
Me.Button7.Text = "Export Image"
Me.Button7.UseVisualStyleBackColor = True
'
'Button5
'
Me.Button5.Location = New System.Drawing.Point(466, 21)
Me.Button5.Location = New System.Drawing.Point(389, 25)
Me.Button5.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(125, 31)
Me.Button5.Size = New System.Drawing.Size(122, 34)
Me.Button5.TabIndex = 65
Me.Button5.Text = "Import Picture"
Me.Button5.Text = "Import Image"
Me.Button5.UseVisualStyleBackColor = True
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(5, 21)
Me.Button4.Location = New System.Drawing.Point(20, 25)
Me.Button4.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(125, 31)
Me.Button4.Size = New System.Drawing.Size(125, 34)
Me.Button4.TabIndex = 64
Me.Button4.Text = "Export Item"
Me.Button4.UseVisualStyleBackColor = True
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(598, 21)
Me.Button3.Location = New System.Drawing.Point(519, 25)
Me.Button3.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(125, 31)
Me.Button3.Size = New System.Drawing.Size(125, 34)
Me.Button3.TabIndex = 63
Me.Button3.Text = "Import Item"
Me.Button3.UseVisualStyleBackColor = True
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(598, 58)
Me.Button2.Location = New System.Drawing.Point(519, 66)
Me.Button2.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(125, 31)
Me.Button2.Size = New System.Drawing.Size(125, 34)
Me.Button2.TabIndex = 62
Me.Button2.Text = "Import All"
Me.Button2.Text = "Import Range"
Me.Button2.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(5, 58)
Me.Button1.Location = New System.Drawing.Point(20, 66)
Me.Button1.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(125, 31)
Me.Button1.Size = New System.Drawing.Size(125, 34)
Me.Button1.TabIndex = 60
Me.Button1.Text = "Export All"
Me.Button1.Text = "Export Range"
Me.Button1.UseVisualStyleBackColor = True
'
'ProgressBar1
'
Me.ProgressBar1.Location = New System.Drawing.Point(135, 58)
Me.ProgressBar1.Location = New System.Drawing.Point(19, 108)
Me.ProgressBar1.Name = "ProgressBar1"
Me.ProgressBar1.Size = New System.Drawing.Size(456, 30)
Me.ProgressBar1.Size = New System.Drawing.Size(624, 30)
Me.ProgressBar1.TabIndex = 61
Me.ProgressBar1.Visible = False
'
'GroupBox4
'
Me.GroupBox4.Controls.Add(Me.CheckBox1)
Me.GroupBox4.Controls.Add(Me.ComboBox2)
Me.GroupBox4.Controls.Add(Me.ComboBox1)
Me.GroupBox4.Controls.Add(Me.ProgressBar1)
Me.GroupBox4.Controls.Add(Me.Button7)
Me.GroupBox4.Controls.Add(Me.Button1)
@@ -579,13 +570,33 @@ Partial Class ItemEditor
Me.GroupBox4.Controls.Add(Me.Button2)
Me.GroupBox4.Controls.Add(Me.Button4)
Me.GroupBox4.Controls.Add(Me.Button3)
Me.GroupBox4.Location = New System.Drawing.Point(9, 471)
Me.GroupBox4.Location = New System.Drawing.Point(37, 469)
Me.GroupBox4.Name = "GroupBox4"
Me.GroupBox4.Size = New System.Drawing.Size(728, 100)
Me.GroupBox4.Size = New System.Drawing.Size(665, 150)
Me.GroupBox4.TabIndex = 68
Me.GroupBox4.TabStop = False
Me.GroupBox4.Text = "Import/Export"
'
'ComboBox2
'
Me.ComboBox2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.ComboBox2.FormattingEnabled = True
Me.ComboBox2.Location = New System.Drawing.Point(336, 68)
Me.ComboBox2.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.ComboBox2.Name = "ComboBox2"
Me.ComboBox2.Size = New System.Drawing.Size(175, 28)
Me.ComboBox2.TabIndex = 68
'
'ComboBox1
'
Me.ComboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.ComboBox1.FormattingEnabled = True
Me.ComboBox1.Location = New System.Drawing.Point(153, 68)
Me.ComboBox1.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(175, 28)
Me.ComboBox1.TabIndex = 2
'
'OpenFileDialog
'
Me.OpenFileDialog.FileName = "OpenFileDialog1"
@@ -594,7 +605,7 @@ Partial Class ItemEditor
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(744, 575)
Me.ClientSize = New System.Drawing.Size(744, 635)
Me.Controls.Add(Me.GroupBox4)
Me.Controls.Add(Me.ExtParTxt)
Me.Controls.Add(Me.Label15)
@@ -639,7 +650,6 @@ Partial Class ItemEditor
Me.GroupBox3.ResumeLayout(False)
Me.GroupBox3.PerformLayout()
Me.GroupBox4.ResumeLayout(False)
Me.GroupBox4.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -687,7 +697,6 @@ Partial Class ItemEditor
Friend WithEvents Button6 As Button
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents ExtParTxt As System.Windows.Forms.TextBox
Friend WithEvents CheckBox1 As CheckBox
Friend WithEvents Button7 As Button
Friend WithEvents Button5 As Button
Friend WithEvents Button4 As Button
@@ -699,4 +708,6 @@ Partial Class ItemEditor
Friend WithEvents FolderBrowserDialog As FolderBrowserDialog
Friend WithEvents SaveFileDialog As SaveFileDialog
Friend WithEvents OpenFileDialog As OpenFileDialog
Friend WithEvents ComboBox2 As ComboBox
Friend WithEvents ComboBox1 As ComboBox
End Class

View File

@@ -44,15 +44,21 @@ Public Class ItemEditor
LoopVar = 0
ItemListComboBox.Items.Clear()
ComboBox1.Items.Clear()
ComboBox2.Items.Clear()
While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfItems", "")) = True
ItemListComboBox.Items.Add(GetItemName(LoopVar))
ComboBox1.Items.Add(GetItemName(LoopVar))
ComboBox2.Items.Add(GetItemName(LoopVar))
LoopVar = LoopVar + 1
End While
ItemListComboBox.SelectedIndex = 0
ComboBox1.SelectedIndex = 1
ComboBox2.SelectedIndex = Int32.Parse(GetString(GetINIFileLocation(), header, "NumberOfItems", "")) - 1
itemDescs = New List(Of String)
itemDescOffsets = New List(Of String)
@@ -146,9 +152,13 @@ Public Class ItemEditor
LoopVar = 0
ItemListComboBox.Items.Clear()
ComboBox1.Items.Clear()
ComboBox2.Items.Clear()
While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfItems", "")) = True
ItemListComboBox.Items.Add(GetItemName(LoopVar))
ComboBox1.Items.Add(GetItemName(LoopVar))
ComboBox2.Items.Add(GetItemName(LoopVar))
LoopVar = LoopVar + 1
@@ -275,6 +285,16 @@ Public Class ItemEditor
FolderBrowserDialog.Description = "Select folder to export Items to:"
If FolderBrowserDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
If ComboBox1.SelectedIndex > ComboBox2.SelectedIndex Then
Dim tempBox1 As Integer = ComboBox1.SelectedIndex
ComboBox1.SelectedIndex = ComboBox2.SelectedIndex
ComboBox2.SelectedIndex = tempBox1
End If
Me.Text = "Please wait..."
Me.UseWaitCursor = True
@@ -288,29 +308,29 @@ Public Class ItemEditor
Dim LoopVar As Integer
LoopVar = 0
LoopVar = ComboBox1.SelectedIndex - 1
Me.Enabled = False
ProgressBar1.Value = 0
ProgressBar1.Visible = True
While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfItems", "")) - 2 = True
While LoopVar < ComboBox2.SelectedIndex = True
' PKMNaItemImportExportss.SelectedIndex = LoopVar
LoopVar = LoopVar + 1
ImportDataFunctions.ExportItemINI(FolderBrowserDialog.SelectedPath, LoopVar)
ExportItemINI(FolderBrowserDialog.SelectedPath, LoopVar)
ProgressBar1.Value = (LoopVar / (GetString(GetINIFileLocation(), header, "NumberOfItems", ""))) * 100
ProgressBar1.Value = ((LoopVar - ComboBox1.SelectedIndex) / (ComboBox2.SelectedIndex - ComboBox1.SelectedIndex)) * 100
ProgressBar1.Invalidate()
ProgressBar1.Update()
End While
ProgressBar1.Visible = False
Me.Enabled = True
Me.UseWaitCursor = False
ProgressBar1.Value = 0
Me.BringToFront()
End If
End Sub
@@ -321,25 +341,41 @@ Public Class ItemEditor
FolderBrowserDialog.Description = "Select ini file to import Items from:"
If FolderBrowserDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
If ComboBox1.SelectedIndex > ComboBox2.SelectedIndex Then
Dim tempBox1 As Integer = ComboBox1.SelectedIndex
ComboBox1.SelectedIndex = ComboBox2.SelectedIndex
ComboBox2.SelectedIndex = tempBox1
End If
Me.Text = "Please wait..."
Me.UseWaitCursor = True
ProgressBar1.Value = 0
ProgressBar1.Visible = True
Dim LoopVar As Integer
LoopVar = 0
If CheckBox1.Checked Then
LoopVar = 289
End If
LoopVar = ComboBox1.SelectedIndex - 1
Me.Enabled = False
While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfItems", "")) - 2 = True
While LoopVar < ComboBox2.SelectedIndex = True
'While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfItems", "")) - 2 = True
LoopVar = LoopVar + 1
If LoopVar = 377 Then
LoopVar = 378
If LoopVar < ComboBox2.SelectedIndex Then
Exit While
End If
End If
If System.IO.File.Exists(FolderBrowserDialog.SelectedPath & "\" & LoopVar & ".ini") Then
ImportItem(FolderBrowserDialog.SelectedPath, LoopVar)
ElseIf System.IO.File.Exists(FolderBrowserDialog.SelectedPath & "\" & VB.Right("000" & LoopVar, 3) & ".ini") And LoopVar < 1000 Then
@@ -352,13 +388,13 @@ Public Class ItemEditor
ImportItemPicture(FolderBrowserDialog.SelectedPath & "\ItemPics\" & VB.Right("000" & LoopVar, 3) & ".png", LoopVar)
End If
ProgressBar1.Value = (LoopVar / (GetString(GetINIFileLocation(), header, "NumberOfItems", ""))) * 100
ProgressBar1.Value = ((LoopVar - ComboBox1.SelectedIndex) / (ComboBox2.SelectedIndex - ComboBox1.SelectedIndex)) * 100
ProgressBar1.Invalidate()
ProgressBar1.Update()
If CheckBox1.Checked And LoopVar = 346 Then
LoopVar = 377
End If
'If CheckBox1.Checked And LoopVar = 346 Then
'LoopVar = 377
'End If
End While
@@ -367,6 +403,7 @@ Public Class ItemEditor
ItemListComboBox.SelectedIndex = 1
ItemListComboBox.SelectedIndex = 0
Me.UseWaitCursor = False
ProgressBar1.Value = 0
Me.BringToFront()
RefreshItems(listvar)
@@ -375,7 +412,6 @@ Public Class ItemEditor
Me.Text = "Item Editor"
Me.Enabled = True
ProgressBar1.Visible = False
Me.BringToFront()
End Sub
@@ -431,7 +467,6 @@ Public Class ItemEditor
ExportItemINI(SaveFileDialog.FileName, listvar, True)
Me.UseWaitCursor = False
Me.Enabled = True
Me.ProgressBar1.Visible = False
End If
RefreshItems(listvar)
@@ -441,9 +476,13 @@ Public Class ItemEditor
Dim LoopVar As Integer = 0
ItemListComboBox.Items.Clear()
ComboBox1.Items.Clear()
ComboBox2.Items.Clear()
While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfItems", "") - 1) = True
ItemListComboBox.Items.Add(GetItemName(LoopVar))
ComboBox1.Items.Add(GetItemName(LoopVar))
ComboBox2.Items.Add(GetItemName(LoopVar))
LoopVar = LoopVar + 1
@@ -504,16 +543,11 @@ Public Class ItemEditor
ExportItemPicture(SaveFileDialog.FileName, listvar)
Me.UseWaitCursor = False
Me.Enabled = True
Me.ProgressBar1.Visible = False
End If
RefreshItems(listvar)
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
End Sub
Private Sub ImportSinglePicture(sender As Object, e As EventArgs) Handles Button5.Click
Dim listvar As Integer = ItemListComboBox.SelectedIndex
OpenFileDialog.Title = "Select Image to import"
@@ -531,7 +565,6 @@ Public Class ItemEditor
ImportItemPicture(OpenFileDialog.FileName, listvar, True)
Me.UseWaitCursor = False
Me.Enabled = True
Me.ProgressBar1.Visible = False
End If
RefreshItems(listvar)
@@ -551,9 +584,9 @@ Public Class ItemEditor
ImportItem(OpenFileDialog.FileName, listvar, True)
Me.UseWaitCursor = False
Me.Enabled = True
Me.ProgressBar1.Visible = False
End If
RefreshItems(listvar)
End Sub
End Class

View File

@@ -16,7 +16,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>JZ/yNR9sYljS/IhYA4Ww/XxO8tNvKsGCVsFKp+fcc7s=</dsig:DigestValue>
<dsig:DigestValue>zBGXXsmSy1GHCXYBDl5hB8FgtCUg7wA2+uokrrNJWEc=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2116608">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2117120">
<assemblyIdentity name="PokemonGameEditor" version="3.8.1.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>/LAGoYEv+gEfNNZtPg7UNZdlsVRXqCe03eNP6vNItTk=</dsig:DigestValue>
<dsig:DigestValue>5CtwCk2VMdWIfz/HDRItLPt8ziUMJFTYFcwqsKXXyYo=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@@ -16,7 +16,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>JZ/yNR9sYljS/IhYA4Ww/XxO8tNvKsGCVsFKp+fcc7s=</dsig:DigestValue>
<dsig:DigestValue>zBGXXsmSy1GHCXYBDl5hB8FgtCUg7wA2+uokrrNJWEc=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2116608">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2117120">
<assemblyIdentity name="PokemonGameEditor" version="3.8.1.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>/LAGoYEv+gEfNNZtPg7UNZdlsVRXqCe03eNP6vNItTk=</dsig:DigestValue>
<dsig:DigestValue>5CtwCk2VMdWIfz/HDRItLPt8ziUMJFTYFcwqsKXXyYo=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>