Move Tutor/TMHM Import Export

Added ability to import move tutor moves and tmhm moves using their respective editor windows.
This commit is contained in:
Dreuu 2018-08-05 00:56:36 -04:00
parent fef729191c
commit ae3e360e05
24 changed files with 497 additions and 76 deletions

Binary file not shown.

View File

@ -444,4 +444,27 @@ Module ExportDataFunctions
End Sub
Public Sub ExportTutorMoves(filename)
Dim moveTable As Integer = Int32.Parse((GetString(GetINIFileLocation(), header, "MoveTutorAttacks", "")), System.Globalization.NumberStyles.HexNumber)
Dim moveString As String = ""
Dim loopything As Integer = 0
While loopything < (Val(GetString(GetINIFileLocation(), header, "NumberOfMoveTutorAttacks", "")))
moveString = moveString & VB.Right("0000" & ReadHEX(LoadedROM, moveTable + (2 * loopything), 2), 4)
loopything = loopything + 1
End While
WriteString(filename, "TUTR", "TutorMoves", moveString)
End Sub
Public Sub ExportTMHMINI(INIFileName As String, ExportString As String)
WriteString(INIFileName, "TMHM", "TMHMData", ExportString)
End Sub
End Module

View File

@ -1216,4 +1216,74 @@ Module ImportDataFunctions
End Sub
Public Function GetLongString(ByVal strFilename As String, ByVal Section As String,
ByVal Key As String, ByVal [Default] As String) As String
GetLongString = ""
Dim intCharCount As Integer
Dim objResult As New System.Text.StringBuilder(1000)
intCharCount = GetPrivateProfileString(Section, Key,
[Default], objResult, objResult.Capacity, strFilename)
If intCharCount > 0 Then GetLongString =
Left(objResult.ToString, intCharCount)
'This should probably be commented out if used for another program!
If LoadedROM <> "" Then
If GetLongString = "" And GetINIFileLocation() = strFilename Then
OutPutError("Error! " & Key & " is missing for ROM " & Section & "!")
End If
End If
End Function
Private Declare Ansi Function GetPrivateProfileString _
Lib "kernel32.dll" Alias "GetPrivateProfileStringA" _
(ByVal lpApplicationName As String,
ByVal lpKeyName As String, ByVal lpDefault As String,
ByVal lpReturnedString As System.Text.StringBuilder,
ByVal nSize As Integer, ByVal lpFileName As String) _
As Integer
Public Sub ImportTutorMoves(filename)
Dim newMoves As String = GetLongString(filename, "TUTR", "TutorMoves", "")
Dim moveTable As Integer = Int32.Parse((GetString(GetINIFileLocation(), header, "MoveTutorAttacks", "")), System.Globalization.NumberStyles.HexNumber)
Dim looper As Integer = 0
Dim maxAtacks As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "NumberOfMoveTutorAttacks", "0"))
While newMoves.Length > looper * 4 And looper < maxAtacks
WriteHEX(LoadedROM, moveTable + (2 * looper), VB.Right("0000" & newMoves.Substring(looper * 4, 4), 4))
looper += 1
End While
End Sub
Public Sub ImportTMHMINI(Filepath As String)
Dim TMHMAttacks As Integer = Int32.Parse((GetString(GetINIFileLocation(), header, "TMData", "")), System.Globalization.NumberStyles.HexNumber)
WriteHEX(LoadedROM, TMHMAttacks, GetString(Filepath, "TMHM", "TMHMData", ""))
Dim TMList As String = GetLongString(Filepath, "TMHM", "TMHMData", "")
Dim LoopVar As Integer = 0
Dim LoopLength As Integer = 0
If TMHMEditor.CheckBox1.Checked Then
LoopLength = Int32.Parse((Val(GetString(GetINIFileLocation(), header, "TotalTMsPlusHMs", "")))) - 8
Else
LoopLength = Int32.Parse((Val(GetString(GetINIFileLocation(), header, "TotalTMsPlusHMs", ""))))
End If
While LoopVar < LoopLength And LoopVar + 4 < TMList.Length = True
If TMList.Length > (LoopVar * 4) Then
WriteHEX(LoadedROM, TMHMAttacks + LoopVar * 2, TMList.Substring(LoopVar * 4, 4))
Else
WriteHEX(LoadedROM, TMHMAttacks + LoopVar * 2, "0000")
End If
LoopVar += 1
End While
End Sub
End Module

View File

@ -126,6 +126,9 @@
<metadata name="OpenFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>428, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>66</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -49,8 +49,6 @@ Public Class Pokemonedit
MainFrm.Visible = True
End Sub
Private Sub Pokemonedit_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' ledrom = New ROM(LoadedROM)
@ -159,8 +157,6 @@ Public Class Pokemonedit
LoopVar = LoopVar + 1
End While
If header2 = "BPR" Or header2 = "BPG" Then
@ -171,7 +167,6 @@ Public Class Pokemonedit
ItmAnmtn.Text = ""
End If
If header2 = "AXP" Or header2 = "AXV" Then
Pointer2.Enabled = True
Description2.Enabled = True

View File

@ -28,31 +28,40 @@ Partial Class TMHMEditor
Me.Label2 = New System.Windows.Forms.Label()
Me.AttackList = New System.Windows.Forms.ComboBox()
Me.SvBttn = New System.Windows.Forms.Button()
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.SaveFileDialog = New System.Windows.Forms.SaveFileDialog()
Me.OpenFileDialog = New System.Windows.Forms.OpenFileDialog()
Me.SuspendLayout()
'
'TMHMList
'
Me.TMHMList.FormattingEnabled = True
Me.TMHMList.Location = New System.Drawing.Point(15, 38)
Me.TMHMList.ItemHeight = 20
Me.TMHMList.Location = New System.Drawing.Point(22, 58)
Me.TMHMList.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.TMHMList.Name = "TMHMList"
Me.TMHMList.Size = New System.Drawing.Size(237, 173)
Me.TMHMList.Size = New System.Drawing.Size(354, 264)
Me.TMHMList.TabIndex = 0
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(12, 22)
Me.Label1.Location = New System.Drawing.Point(18, 34)
Me.Label1.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(67, 13)
Me.Label1.Size = New System.Drawing.Size(93, 20)
Me.Label1.TabIndex = 1
Me.Label1.Text = "TM/HM List:"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(12, 224)
Me.Label2.Location = New System.Drawing.Point(18, 345)
Me.Label2.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(41, 13)
Me.Label2.Size = New System.Drawing.Size(59, 20)
Me.Label2.TabIndex = 2
Me.Label2.Text = "Attack:"
'
@ -60,25 +69,64 @@ Partial Class TMHMEditor
'
Me.AttackList.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.AttackList.FormattingEnabled = True
Me.AttackList.Location = New System.Drawing.Point(59, 221)
Me.AttackList.Location = New System.Drawing.Point(88, 340)
Me.AttackList.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.AttackList.Name = "AttackList"
Me.AttackList.Size = New System.Drawing.Size(121, 21)
Me.AttackList.Size = New System.Drawing.Size(180, 28)
Me.AttackList.TabIndex = 3
'
'SvBttn
'
Me.SvBttn.Location = New System.Drawing.Point(191, 219)
Me.SvBttn.Location = New System.Drawing.Point(286, 337)
Me.SvBttn.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.SvBttn.Name = "SvBttn"
Me.SvBttn.Size = New System.Drawing.Size(61, 23)
Me.SvBttn.Size = New System.Drawing.Size(92, 35)
Me.SvBttn.TabIndex = 4
Me.SvBttn.Text = "Save"
Me.SvBttn.UseVisualStyleBackColor = True
'
'CheckBox1
'
Me.CheckBox1.AutoSize = True
Me.CheckBox1.Location = New System.Drawing.Point(296, 19)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(103, 24)
Me.CheckBox1.TabIndex = 11
Me.CheckBox1.Text = "Skip HMs"
Me.CheckBox1.UseVisualStyleBackColor = True
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(206, 14)
Me.Button2.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(83, 35)
Me.Button2.TabIndex = 10
Me.Button2.Text = "Import"
Me.Button2.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(119, 13)
Me.Button1.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(79, 35)
Me.Button1.TabIndex = 9
Me.Button1.Text = "Export"
Me.Button1.UseVisualStyleBackColor = True
'
'OpenFileDialog
'
Me.OpenFileDialog.FileName = "OpenFileDialog1"
'
'TMHMEditor
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(274, 262)
Me.ClientSize = New System.Drawing.Size(411, 403)
Me.Controls.Add(Me.CheckBox1)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.SvBttn)
Me.Controls.Add(Me.AttackList)
Me.Controls.Add(Me.Label2)
@ -86,6 +134,7 @@ Partial Class TMHMEditor
Me.Controls.Add(Me.TMHMList)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.MaximizeBox = False
Me.Name = "TMHMEditor"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
@ -100,4 +149,9 @@ Partial Class TMHMEditor
Friend WithEvents Label2 As Label
Friend WithEvents AttackList As ComboBox
Friend WithEvents SvBttn As Button
Friend WithEvents CheckBox1 As CheckBox
Friend WithEvents Button2 As Button
Friend WithEvents Button1 As Button
Friend WithEvents SaveFileDialog As SaveFileDialog
Friend WithEvents OpenFileDialog As OpenFileDialog
End Class

View File

@ -117,6 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="SaveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="OpenFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>197, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -6,53 +6,10 @@ Imports System.Net
Imports VB = Microsoft.VisualBasic
Public Class TMHMEditor
Dim TMHMAttacks As Integer
Dim TMHMString As String
Private Sub TMHMEditor_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim LoopVar As Integer
TMHMAttacks = Int32.Parse((GetString(GetINIFileLocation(), header, "TMData", "")), System.Globalization.NumberStyles.HexNumber)
TMHMList.Items.Clear()
LoopVar = 0
While LoopVar < (Val(GetString(GetINIFileLocation(), header, "TotalTMsPlusHMs", ""))) = True
If LoopVar > ((Val(GetString(GetINIFileLocation(), header, "TotalTMs", ""))) - 1) Then
TMHMList.Items.Add("HM" & LoopVar - ((Val(GetString(GetINIFileLocation(), header, "TotalTMs", ""))) - 1) & " - " & GetAttackName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, TMHMAttacks + ((LoopVar) * 2), 2))), System.Globalization.NumberStyles.HexNumber)))
LoopVar = LoopVar + 1
ElseIf LoopVar < 9 Then
TMHMList.Items.Add("TM" & "0" & LoopVar + 1 & " - " & GetAttackName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, TMHMAttacks + ((LoopVar) * 2), 2))), System.Globalization.NumberStyles.HexNumber)))
LoopVar = LoopVar + 1
Else
TMHMList.Items.Add("TM" & LoopVar + 1 & " - " & GetAttackName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, TMHMAttacks + ((LoopVar) * 2), 2))), System.Globalization.NumberStyles.HexNumber)))
LoopVar = LoopVar + 1
End If
End While
AttackList.Items.Clear()
LoopVar = 0
While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfAttacks", "")) + 1 = True
AttackList.Items.Add(GetAttackName(LoopVar))
LoopVar = LoopVar + 1
End While
TMHMList.SelectedIndex = 0
FillTMHMData()
End Sub
@ -96,4 +53,164 @@ Public Class TMHMEditor
TMHMList.SelectedIndex = indexbuf
End Sub
Private Sub Export_Click(sender As Object, e As EventArgs) Handles Button1.Click
SaveFileDialog.FileName = ("TMHMs") & ".ini"
'SaveFileDialog.CheckFileExists = True
' Check to ensure that the selected path exists. Dialog box displays
' a warning otherwise.
SaveFileDialog.CheckPathExists = True
' Get or set default extension. Doesn't include the leading ".".
SaveFileDialog.DefaultExt = "ini"
' Return the file referenced by a link? If False, simply returns the selected link
' file. If True, returns the file linked to the LNK file.
SaveFileDialog.DereferenceLinks = True
' Just as in VB6, use a set of pairs of filters, separated with "|". Each
' pair consists of a description|file spec. Use a "|" between pairs. No need to put a
' trailing "|". You can set the FilterIndex property as well, to select the default
' filter. The first filter is numbered 1 (not 0). The default is 1.
SaveFileDialog.Filter =
"(*.ini)|*.ini*"
'SaveFileDialog.Multiselect = False
' Restore the original directory when done selecting
' a file? If False, the current directory changes
' to the directory in which you selected the file.
' Set this to True to put the current folder back
' where it was when you started.
' The default is False.
'.RestoreDirectory = False
' Show the Help button and Read-Only checkbox?
SaveFileDialog.ShowHelp = False
'SaveFileDialog.ShowReadOnly = False
' Start out with the read-only check box checked?
' This only make sense if ShowReadOnly is True.
'SaveFileDialog.ReadOnlyChecked = False
SaveFileDialog.Title = "Save as"
' Only accept valid Win32 file names?
SaveFileDialog.ValidateNames = True
If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
ExportTMHMINI(SaveFileDialog.FileName, TMHMString)
End If
End Sub
Private Sub Import_Click(sender As Object, e As EventArgs) Handles Button2.Click
OpenFileDialog.FileName = ""
OpenFileDialog.CheckFileExists = True
' Check to ensure that the selected path exists. Dialog box displays
' a warning otherwise.
OpenFileDialog.CheckPathExists = True
' Get or set default extension. Doesn't include the leading ".".
OpenFileDialog.DefaultExt = "ini"
' Return the file referenced by a link? If False, simply returns the selected link
' file. If True, returns the file linked to the LNK file.
OpenFileDialog.DereferenceLinks = True
' Just as in VB6, use a set of pairs of filters, separated with "|". Each
' pair consists of a description|file spec. Use a "|" between pairs. No need to put a
' trailing "|". You can set the FilterIndex property as well, to select the default
' filter. The first filter is numbered 1 (not 0). The default is 1.
OpenFileDialog.Filter =
"(*.ini)|*.ini*"
OpenFileDialog.Multiselect = False
' Restore the original directory when done selecting
' a file? If False, the current directory changes
' to the directory in which you selected the file.
' Set this to True to put the current folder back
' where it was when you started.
' The default is False.
'.RestoreDirectory = False
' Show the Help button and Read-Only checkbox?
OpenFileDialog.ShowHelp = False
OpenFileDialog.ShowReadOnly = False
' Start out with the read-only check box checked?
' This only make sense if ShowReadOnly is True.
OpenFileDialog.ReadOnlyChecked = False
OpenFileDialog.Title = "Select ini file to import"
' Only accept valid Win32 file names?
OpenFileDialog.ValidateNames = True
If OpenFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
ImportTMHMINI(OpenFileDialog.FileName)
FillTMHMData()
End If
End Sub
Private Sub FillTMHMData()
TMHMString = ""
Dim LoopVar As Integer
TMHMAttacks = Int32.Parse((GetString(GetINIFileLocation(), header, "TMData", "")), System.Globalization.NumberStyles.HexNumber)
TMHMList.Items.Clear()
LoopVar = 0
While LoopVar < (Val(GetString(GetINIFileLocation(), header, "TotalTMsPlusHMs", ""))) = True
If LoopVar > ((Val(GetString(GetINIFileLocation(), header, "TotalTMs", ""))) - 1) Then
TMHMList.Items.Add("HM" & LoopVar - ((Val(GetString(GetINIFileLocation(), header, "TotalTMs", ""))) - 1) & " - " & GetAttackName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, TMHMAttacks + ((LoopVar) * 2), 2))), System.Globalization.NumberStyles.HexNumber)))
ElseIf LoopVar < 9 Then
TMHMList.Items.Add("TM" & "0" & LoopVar + 1 & " - " & GetAttackName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, TMHMAttacks + ((LoopVar) * 2), 2))), System.Globalization.NumberStyles.HexNumber)))
Else
TMHMList.Items.Add("TM" & LoopVar + 1 & " - " & GetAttackName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, TMHMAttacks + ((LoopVar) * 2), 2))), System.Globalization.NumberStyles.HexNumber)))
End If
TMHMString = TMHMString & ReadHEX(LoadedROM, TMHMAttacks + ((LoopVar) * 2), 2)
LoopVar = LoopVar + 1
End While
AttackList.Items.Clear()
LoopVar = 0
While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfAttacks", "")) + 1 = True
AttackList.Items.Add(GetAttackName(LoopVar))
LoopVar = LoopVar + 1
End While
TMHMList.SelectedIndex = 0
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>Xed9LgXlJRxxKcPw0TDLG3UK87h9E13zaIYFpaJpKZU=</dsig:DigestValue>
<dsig:DigestValue>XYnKaHaDW9qepRR+KUkhb3WVwa2Pp1Y2fL8d6eySXj8=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2110464">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2115072">
<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>iTNlYBNPOG4n97YC4+tMsfUvc0ymM1bFYI3QT3Z/ZIU=</dsig:DigestValue>
<dsig:DigestValue>KWa0fyrMbrU1Lqq8NCJNhYB0Aeb0msF/wNcB8eDIRw8=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@ -26,13 +26,18 @@ Partial Class movetutor2
Me.Button2 = New System.Windows.Forms.Button()
Me.Combo1 = New System.Windows.Forms.ComboBox()
Me.ListBox1 = New System.Windows.Forms.ListBox()
Me.Button3 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.fileOpenDialog = New System.Windows.Forms.OpenFileDialog()
Me.SaveFileDialog = New System.Windows.Forms.SaveFileDialog()
Me.SuspendLayout()
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(55, 179)
Me.Button2.Location = New System.Drawing.Point(81, 275)
Me.Button2.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(121, 25)
Me.Button2.Size = New System.Drawing.Size(187, 38)
Me.Button2.TabIndex = 16
Me.Button2.Text = "Save"
Me.Button2.UseVisualStyleBackColor = True
@ -41,29 +46,57 @@ Partial Class movetutor2
'
Me.Combo1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.Combo1.FormattingEnabled = True
Me.Combo1.Location = New System.Drawing.Point(54, 152)
Me.Combo1.Location = New System.Drawing.Point(80, 234)
Me.Combo1.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.Combo1.Name = "Combo1"
Me.Combo1.Size = New System.Drawing.Size(121, 21)
Me.Combo1.Size = New System.Drawing.Size(188, 28)
Me.Combo1.TabIndex = 0
'
'ListBox1
'
Me.ListBox1.FormattingEnabled = True
Me.ListBox1.Location = New System.Drawing.Point(55, 12)
Me.ListBox1.ItemHeight = 20
Me.ListBox1.Location = New System.Drawing.Point(81, 18)
Me.ListBox1.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(120, 134)
Me.ListBox1.Size = New System.Drawing.Size(187, 204)
Me.ListBox1.TabIndex = 16
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(269, 58)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(75, 31)
Me.Button3.TabIndex = 20
Me.Button3.Text = "Export"
Me.Button3.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(4, 58)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 31)
Me.Button1.TabIndex = 19
Me.Button1.Text = "Import"
Me.Button1.UseVisualStyleBackColor = True
'
'fileOpenDialog
'
Me.fileOpenDialog.FileName = "OpenFileDialog1"
'
'movetutor2
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(232, 212)
Me.ClientSize = New System.Drawing.Size(348, 326)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.ListBox1)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Combo1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
Me.MaximizeBox = False
Me.Name = "movetutor2"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
@ -74,4 +107,8 @@ Partial Class movetutor2
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Combo1 As System.Windows.Forms.ComboBox
Friend WithEvents ListBox1 As ListBox
Friend WithEvents Button3 As Button
Friend WithEvents Button1 As Button
Friend WithEvents fileOpenDialog As OpenFileDialog
Friend WithEvents SaveFileDialog As SaveFileDialog
End Class

View File

@ -117,6 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="fileOpenDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="SaveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>201, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -95,4 +95,114 @@ Public Class movetutor2
Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
Combo1.SelectedIndex = ((Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, Offset + (2 * ListBox1.SelectedIndex), 2)))), System.Globalization.NumberStyles.HexNumber)))
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
fileOpenDialog.FileName = ""
fileOpenDialog.CheckFileExists = True
' Check to ensure that the selected path exists. Dialog box displays
' a warning otherwise.
fileOpenDialog.CheckPathExists = True
' Get or set default extension. Doesn't include the leading ".".
fileOpenDialog.DefaultExt = "ini"
' Return the file referenced by a link? If False, simply returns the selected link
' file. If True, returns the file linked to the LNK file.
fileOpenDialog.DereferenceLinks = True
' Just as in VB6, use a set of pairs of filters, separated with "|". Each
' pair consists of a description|file spec. Use a "|" between pairs. No need to put a
' trailing "|". You can set the FilterIndex property as well, to select the default
' filter. The first filter is numbered 1 (not 0). The default is 1.
fileOpenDialog.Filter =
"(*.ini)|*.ini*"
fileOpenDialog.Multiselect = False
' Restore the original directory when done selecting
' a file? If False, the current directory changes
' to the directory in which you selected the file.
' Set this to True to put the current folder back
' where it was when you started.
' The default is False.
'.RestoreDirectory = False
' Show the Help button and Read-Only checkbox?
fileOpenDialog.ShowHelp = False
fileOpenDialog.ShowReadOnly = False
' Start out with the read-only check box checked?
' This only make sense if ShowReadOnly is True.
fileOpenDialog.ReadOnlyChecked = False
fileOpenDialog.Title = "Select ini file to import"
' Only accept valid Win32 file names?
fileOpenDialog.ValidateNames = True
If fileOpenDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
ImportTutorMoves(fileOpenDialog.FileName)
movetutor2_Load(Me, EventArgs.Empty)
End If
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
SaveFileDialog.FileName = "TutorMoves.ini"
'SaveFileDialog.CheckFileExists = True
' Check to ensure that the selected path exists. Dialog box displays
' a warning otherwise.
SaveFileDialog.CheckPathExists = True
' Get or set default extension. Doesn't include the leading ".".
SaveFileDialog.DefaultExt = "ini"
' Return the file referenced by a link? If False, simply returns the selected link
' file. If True, returns the file linked to the LNK file.
SaveFileDialog.DereferenceLinks = True
' Just as in VB6, use a set of pairs of filters, separated with "|". Each
' pair consists of a description|file spec. Use a "|" between pairs. No need to put a
' trailing "|". You can set the FilterIndex property as well, to select the default
' filter. The first filter is numbered 1 (not 0). The default is 1.
SaveFileDialog.Filter =
"(*.ini)|*.ini*"
'SaveFileDialog.Multiselect = False
' Restore the original directory when done selecting
' a file? If False, the current directory changes
' to the directory in which you selected the file.
' Set this to True to put the current folder back
' where it was when you started.
' The default is False.
'.RestoreDirectory = False
' Show the Help button and Read-Only checkbox?
SaveFileDialog.ShowHelp = False
'SaveFileDialog.ShowReadOnly = False
' Start out with the read-only check box checked?
' This only make sense if ShowReadOnly is True.
'SaveFileDialog.ReadOnlyChecked = False
SaveFileDialog.Title = "Save as"
' Only accept valid Win32 file names?
SaveFileDialog.ValidateNames = True
If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
ExportTutorMoves(SaveFileDialog.FileName)
End If
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>Xed9LgXlJRxxKcPw0TDLG3UK87h9E13zaIYFpaJpKZU=</dsig:DigestValue>
<dsig:DigestValue>XYnKaHaDW9qepRR+KUkhb3WVwa2Pp1Y2fL8d6eySXj8=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2110464">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2115072">
<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>iTNlYBNPOG4n97YC4+tMsfUvc0ymM1bFYI3QT3Z/ZIU=</dsig:DigestValue>
<dsig:DigestValue>KWa0fyrMbrU1Lqq8NCJNhYB0Aeb0msF/wNcB8eDIRw8=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>