diff --git a/.vs/GBAPokemonGameEditor/v14/.suo b/.vs/GBAPokemonGameEditor/v14/.suo index 4a45b94..4a366ab 100644 Binary files a/.vs/GBAPokemonGameEditor/v14/.suo and b/.vs/GBAPokemonGameEditor/v14/.suo differ diff --git a/GBAPokemonGameEditor/AbilityEdit.Designer.vb b/GBAPokemonGameEditor/AbilityEdit.Designer.vb index 0d612e2..88c96a6 100644 --- a/GBAPokemonGameEditor/AbilityEdit.Designer.vb +++ b/GBAPokemonGameEditor/AbilityEdit.Designer.vb @@ -26,7 +26,6 @@ Partial Class AbilityEdit Me.GroupBox1 = New System.Windows.Forms.GroupBox() Me.Label1 = New System.Windows.Forms.Label() Me.AbilityIndexTextBox = New System.Windows.Forms.TextBox() - Me.ListBox1 = New System.Windows.Forms.ListBox() Me.GroupBox2 = New System.Windows.Forms.GroupBox() Me.Button1 = New System.Windows.Forms.Button() Me.TextBox1 = New System.Windows.Forms.TextBox() @@ -34,6 +33,7 @@ Partial Class AbilityEdit Me.TextBox3 = New System.Windows.Forms.TextBox() Me.Button2 = New System.Windows.Forms.Button() Me.TextBox2 = New System.Windows.Forms.TextBox() + Me.AbilityList = New System.Windows.Forms.ComboBox() Me.GroupBox1.SuspendLayout() Me.GroupBox2.SuspendLayout() Me.GroupBox3.SuspendLayout() @@ -41,12 +41,12 @@ Partial Class AbilityEdit ' 'GroupBox1 ' + Me.GroupBox1.Controls.Add(Me.AbilityList) Me.GroupBox1.Controls.Add(Me.Label1) Me.GroupBox1.Controls.Add(Me.AbilityIndexTextBox) - Me.GroupBox1.Controls.Add(Me.ListBox1) Me.GroupBox1.Location = New System.Drawing.Point(12, 13) Me.GroupBox1.Name = "GroupBox1" - Me.GroupBox1.Size = New System.Drawing.Size(145, 277) + Me.GroupBox1.Size = New System.Drawing.Size(134, 89) Me.GroupBox1.TabIndex = 2 Me.GroupBox1.TabStop = False Me.GroupBox1.Text = "Ability Selection" @@ -54,7 +54,7 @@ Partial Class AbilityEdit 'Label1 ' Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(52, 240) + Me.Label1.Location = New System.Drawing.Point(6, 60) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(36, 13) Me.Label1.TabIndex = 3 @@ -62,34 +62,26 @@ Partial Class AbilityEdit ' 'AbilityIndexTextBox ' - Me.AbilityIndexTextBox.Location = New System.Drawing.Point(94, 237) + Me.AbilityIndexTextBox.Location = New System.Drawing.Point(48, 57) Me.AbilityIndexTextBox.Name = "AbilityIndexTextBox" Me.AbilityIndexTextBox.ReadOnly = True Me.AbilityIndexTextBox.Size = New System.Drawing.Size(42, 20) Me.AbilityIndexTextBox.TabIndex = 2 ' - 'ListBox1 - ' - Me.ListBox1.FormattingEnabled = True - Me.ListBox1.Location = New System.Drawing.Point(6, 19) - Me.ListBox1.Name = "ListBox1" - Me.ListBox1.Size = New System.Drawing.Size(130, 212) - Me.ListBox1.TabIndex = 1 - ' 'GroupBox2 ' Me.GroupBox2.Controls.Add(Me.Button1) Me.GroupBox2.Controls.Add(Me.TextBox1) - Me.GroupBox2.Location = New System.Drawing.Point(163, 189) + Me.GroupBox2.Location = New System.Drawing.Point(12, 108) Me.GroupBox2.Name = "GroupBox2" - Me.GroupBox2.Size = New System.Drawing.Size(210, 56) + Me.GroupBox2.Size = New System.Drawing.Size(134, 83) Me.GroupBox2.TabIndex = 3 Me.GroupBox2.TabStop = False Me.GroupBox2.Text = "Name" ' 'Button1 ' - Me.Button1.Location = New System.Drawing.Point(115, 19) + Me.Button1.Location = New System.Drawing.Point(9, 47) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(71, 22) Me.Button1.TabIndex = 2 @@ -110,7 +102,7 @@ Partial Class AbilityEdit Me.GroupBox3.Controls.Add(Me.TextBox2) Me.GroupBox3.Location = New System.Drawing.Point(163, 13) Me.GroupBox3.Name = "GroupBox3" - Me.GroupBox3.Size = New System.Drawing.Size(210, 170) + Me.GroupBox3.Size = New System.Drawing.Size(210, 178) Me.GroupBox3.TabIndex = 4 Me.GroupBox3.TabStop = False Me.GroupBox3.Text = "Description" @@ -141,11 +133,21 @@ Partial Class AbilityEdit Me.TextBox2.Size = New System.Drawing.Size(90, 20) Me.TextBox2.TabIndex = 0 ' + 'AbilityList + ' + Me.AbilityList.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend + Me.AbilityList.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems + Me.AbilityList.FormattingEnabled = True + Me.AbilityList.Location = New System.Drawing.Point(6, 22) + Me.AbilityList.Name = "AbilityList" + Me.AbilityList.Size = New System.Drawing.Size(121, 21) + Me.AbilityList.TabIndex = 0 + ' 'AbilityEdit ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(385, 302) + Me.ClientSize = New System.Drawing.Size(385, 198) Me.Controls.Add(Me.GroupBox3) Me.Controls.Add(Me.GroupBox2) Me.Controls.Add(Me.GroupBox1) @@ -165,7 +167,6 @@ Partial Class AbilityEdit End Sub Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox - Friend WithEvents ListBox1 As System.Windows.Forms.ListBox Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents TextBox1 As System.Windows.Forms.TextBox @@ -175,4 +176,5 @@ Partial Class AbilityEdit Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents Label1 As Label Friend WithEvents AbilityIndexTextBox As TextBox + Friend WithEvents AbilityList As ComboBox End Class diff --git a/GBAPokemonGameEditor/AbilityEdit.vb b/GBAPokemonGameEditor/AbilityEdit.vb index 3d77594..d2a42e1 100644 --- a/GBAPokemonGameEditor/AbilityEdit.vb +++ b/GBAPokemonGameEditor/AbilityEdit.vb @@ -10,11 +10,11 @@ loopvar = 0 - ListBox1.Items.Clear() + AbilityList.Items.Clear() While loopvar < (GetString(GetINIFileLocation(), header, "NumberOfAbilities", "")) = True - ListBox1.Items.Add(GetAbilityName(loopvar)) + AbilityList.Items.Add(GetAbilityName(loopvar)) loopvar = loopvar + 1 @@ -23,17 +23,32 @@ End While - ListBox1.SelectedIndex = 0 + AbilityList.SelectedIndex = 0 End Sub - Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged - AbilityIndexTextBox.Text = ListBox1.SelectedIndex + Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click + ChangeAbilityName(AbilityList.SelectedIndex, TextBox1.Text) - AbilityDesc = Int32.Parse((GetString(GetINIFileLocation(), header, "AbilityDescriptionTable", "")), System.Globalization.NumberStyles.HexNumber) + Dim loopvar As Integer - TextBox1.Text = GetAbilityName(ListBox1.SelectedIndex) + loopvar = 0 - TextBox2.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (AbilityDesc) + (ListBox1.SelectedIndex * 4), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000) + AbilityList.Items.Clear() + + While loopvar < (GetString(GetINIFileLocation(), header, "NumberOfAbilities", "")) = True + + AbilityList.Items.Add(GetAbilityName(loopvar)) + + + loopvar = loopvar + 1 + + + + End While + End Sub + + Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click + WriteHEX(LoadedROM, (AbilityDesc) + (AbilityList.SelectedIndex * 4), ReverseHEX(Hex(Val("&H" & (TextBox2.Text)) + &H8000000))) FileNum = FreeFile() FileOpen(FileNum, LoadedROM, OpenMode.Binary) @@ -48,32 +63,16 @@ TextBox3.MaxLength = Len(DexDescp) FileClose(FileNum) - End Sub - Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click - ChangeAbilityName(ListBox1.SelectedIndex, TextBox1.Text) + Private Sub AbilityList_SelectedIndexChanged(sender As Object, e As EventArgs) Handles AbilityList.SelectedIndexChanged + AbilityIndexTextBox.Text = AbilityList.SelectedIndex - Dim loopvar As Integer + AbilityDesc = Int32.Parse((GetString(GetINIFileLocation(), header, "AbilityDescriptionTable", "")), System.Globalization.NumberStyles.HexNumber) - loopvar = 0 + TextBox1.Text = GetAbilityName(AbilityList.SelectedIndex) - ListBox1.Items.Clear() - - While loopvar < (GetString(GetINIFileLocation(), header, "NumberOfAbilities", "")) = True - - ListBox1.Items.Add(GetAbilityName(loopvar)) - - - loopvar = loopvar + 1 - - - - End While - End Sub - - Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click - WriteHEX(LoadedROM, (AbilityDesc) + (ListBox1.SelectedIndex * 4), ReverseHEX(Hex(Val("&H" & (TextBox2.Text)) + &H8000000))) + TextBox2.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (AbilityDesc) + (AbilityList.SelectedIndex * 4), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000) FileNum = FreeFile() FileOpen(FileNum, LoadedROM, OpenMode.Binary) diff --git a/GBAPokemonGameEditor/AttackEditor.Designer.vb b/GBAPokemonGameEditor/AttackEditor.Designer.vb index b64abef..52725a0 100644 --- a/GBAPokemonGameEditor/AttackEditor.Designer.vb +++ b/GBAPokemonGameEditor/AttackEditor.Designer.vb @@ -692,7 +692,7 @@ Partial Class AttackEditor ' Me.ComboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.ComboBox4.FormattingEnabled = True - Me.ComboBox4.Items.AddRange(New Object() {"A highly appealing move.", "After this move, the user is more easily startled.", "Makes a great appeal, but allows no more to the end.", "Can be repeatedly used without boring the JUDGE.", "Can avoid being startled by others once.", "Can avoid being startled by others.", "Can avoid being startled by others a little.", "After this move, the user is less likely to be startled.", "Slightly startles the POKeMON in front.", "Slightly startles those that have made appeals.", "Startles the POKeMON that appealed before the user.", "Startles all POKeMON that have done their appeals.", "Badly startles the POKeMON in front.", "Badly startles those that have made appeals.", "Startles the POKeMON that appealed before the user.", "Startles all POKeMON that have done their appeals.", "Shifts the JUDGE's attention from others.", "Startles the POKeMON that has the JUDGE's attention.", "Jams the others, and misses one turn of appeals.", "Startles POKeMON that made a same-type appeal.", "Badly startles POKeMON that made COOL appeals.", "Badly startles POKeMON that made BEAUTY appeals.", "Badly startles POKeMON that made CUTE appeals.", "Badly startles POKeMON that made SMART appeals.", "Badly startles POKeMON that made TOUGH appeals.", "Makes one POKeMON after the user nervous. ", "Makes all POKeMON after the user nervous. ", "Worsens the condition of those that made appeals.", "Badly startles POKeMON in.good condition.", "The appeal works great if performed first.", "The appeal works great if performed last.", "Makes the appeal as good as those before it.", "Makes the appeal as good as the one before it. ", "The appeal works better the later it is performed.", "The appeal's quality varies depending on its timing.", "Works well if it's the same type as the one before.", "Works well if different in type than the one before.", "Affected by how well the.appeal in front goes.", "Ups the user's condition.", "Helps prevent nervousness.", "The appeal works well if the user's condition is good.", "The next appeal can be made earlier next turn.", "The next appeal can be made later next turn.", "Makes the next turn's order more easily scrambled.", "Scrambles the order of appeals on the next turn.", "An appeal that excites the audience in any CONTEST.", "Badly startles all POKeMON that made good appeals.", "The appeal works best the more the crowd is excited.", "Temporarily stops the crowd from growing excited."}) + Me.ComboBox4.Items.AddRange(New Object() {"A highly appealing move.", "After this move, the user is more easily startled.", "Makes a great appeal, but allows no more to the end.", "Can be repeatedly used without boring the JUDGE.", "Can avoid being startled by others once.", "Can avoid being startled by others.", "Can avoid being startled by others a little.", "After this move, the user is less likely to be startled.", "Slightly startles the POKéMON in front.", "Slightly startles those that have made appeals.", "Startles the POKéMON that appealed before the user.", "Startles all POKéMON that have done their appeals.", "Badly startles the POKéMON in front.", "Badly startles those that have made appeals.", "Startles the POKéMON that appealed before the user.", "Startles all POKéMON that have done their appeals.", "Shifts the JUDGE's attention from others.", "Startles the POKéMON that has the JUDGE's attention.", "Jams the others, and misses one turn of appeals.", "Startles POKéMON that made a same-type appeal.", "Badly startles POKéMON that made COOL appeals.", "Badly startles POKéMON that made BEAUTY appeals.", "Badly startles POKéMON that made CUTE appeals.", "Badly startles POKéMON that made SMART appeals.", "Badly startles POKéMON that made TOUGH appeals.", "Makes one POKéMON after the user nervous.", "Makes all POKéMON after the user nervous.", "Worsens the condition of those that made appeals.", "Badly startles POKéMON in good condition.", "The appeal works great if performed first.", "The appeal works great if performed last.", "Makes the appeal as good as those before it.", "Makes the appeal as good as the one before it.", "The appeal works better the later it is performed.", "The appeal's quality varies depending on its timing.", "Works well if it's the same type as the one before.", "Works well if different in type than the one before.", "Affected by how well the appeal in front goes.", "Ups the user's condition. Helps prevent nervousness.", "The appeal works well if the user's condition is good.", "The next appeal can be made earlier next turn.", "The next appeal can be made later next turn.", "Makes the next turn's order more easily scrambled.", "Scrambles the order of appeals on the next turn.", "An appeal that excites the audience in any CONTEST.", "Badly startles all POKéMON that made good appeals.", "The appeal works best the more the crowd is excited.", "Temporarily stops the crowd from growing excited."}) Me.ComboBox4.Location = New System.Drawing.Point(109, 15) Me.ComboBox4.Name = "ComboBox4" Me.ComboBox4.Size = New System.Drawing.Size(323, 21) diff --git a/GBAPokemonGameEditor/AttackEditor.vb b/GBAPokemonGameEditor/AttackEditor.vb index 7b79135..7450bcc 100644 --- a/GBAPokemonGameEditor/AttackEditor.vb +++ b/GBAPokemonGameEditor/AttackEditor.vb @@ -231,12 +231,12 @@ WriteHEX(LoadedROM, ((AttackData) + 12 + 9) + (ComboBox3.SelectedIndex * 12), Hex(ComboBox7.SelectedIndex)) WriteHEX(LoadedROM, ((AttackData) + 12 + 10) + (ComboBox3.SelectedIndex * 12), Hex(ComboBox8.SelectedIndex)) - Dim bita As String - Dim bitb As String - Dim bitc As String - Dim bitd As String - Dim bite As String - Dim bitf As String + Dim bita As String = "" + Dim bitb As String = "" + Dim bitc As String = "" + Dim bitd As String = "" + Dim bite As String = "" + Dim bitf As String = "" Dim thingtowrite As String If CheckBox1.Checked = False Then @@ -321,14 +321,14 @@ ComboBox6.SelectedIndex = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, ((ContestMoveEffectData) + 0) + (ComboBox4.SelectedIndex * 4), 1)))), System.Globalization.NumberStyles.HexNumber) TextBox11.Text = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, ((ContestMoveEffectData) + 1) + (ComboBox4.SelectedIndex * 4), 1)))), System.Globalization.NumberStyles.HexNumber) TextBox10.Text = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, ((ContestMoveEffectData) + 2) + (ComboBox4.SelectedIndex * 4), 1)))), System.Globalization.NumberStyles.HexNumber) + End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click - 'WriteHEX(LoadedROM, ((ContestMoveEffectData) + 0) + (ComboBox4.SelectedIndex * 4), Hex(ComboBox6.SelectedIndex)) - ' WriteHEX(LoadedROM, ((ContestMoveEffectData) + 1) + (ComboBox4.SelectedIndex * 4), Hex(TextBox11.Text)) - 'WriteHEX(LoadedROM, ((ContestMoveEffectData) + 2) + (ComboBox4.SelectedIndex * 4), Hex(TextBox10.Text)) - MsgBox("disabled till I double check it works") - End Sub + WriteHEX(LoadedROM, ((ContestMoveEffectData) + 0) + (ComboBox4.SelectedIndex * 4), Hex(ComboBox6.SelectedIndex)) + WriteHEX(LoadedROM, ((ContestMoveEffectData) + 1) + (ComboBox4.SelectedIndex * 4), Hex(TextBox11.Text)) + WriteHEX(LoadedROM, ((ContestMoveEffectData) + 2) + (ComboBox4.SelectedIndex * 4), Hex(TextBox10.Text)) + End Sub Private Sub TextBox7_TextChanged(sender As Object, e As EventArgs) Handles TextBox7.TextChanged Label21.Text = "Length: " & Len(TextBox7.Text) & "/" & CurrentAttackDescripLength @@ -409,4 +409,6 @@ End Sub + Private Sub ComboBox6_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox6.SelectedIndexChanged + End Sub End Class \ No newline at end of file diff --git a/GBAPokemonGameEditor/AttackExpander.Designer.vb b/GBAPokemonGameEditor/AttackExpander.Designer.vb index a540a90..c563811 100644 --- a/GBAPokemonGameEditor/AttackExpander.Designer.vb +++ b/GBAPokemonGameEditor/AttackExpander.Designer.vb @@ -32,9 +32,16 @@ Partial Class AttackExpander Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.TabPage2 = New System.Windows.Forms.TabPage() + Me.CheckBox3 = New System.Windows.Forms.CheckBox() + Me.CheckBox4 = New System.Windows.Forms.CheckBox() + Me.Button2 = New System.Windows.Forms.Button() + Me.TextBox2 = New System.Windows.Forms.TextBox() + Me.Label3 = New System.Windows.Forms.Label() + Me.Label4 = New System.Windows.Forms.Label() Me.LinkLabel1 = New System.Windows.Forms.LinkLabel() Me.TabControl1.SuspendLayout() Me.TabPage1.SuspendLayout() + Me.TabPage2.SuspendLayout() Me.SuspendLayout() ' 'TabControl1 @@ -120,6 +127,12 @@ Partial Class AttackExpander ' 'TabPage2 ' + Me.TabPage2.Controls.Add(Me.CheckBox3) + Me.TabPage2.Controls.Add(Me.CheckBox4) + Me.TabPage2.Controls.Add(Me.Button2) + Me.TabPage2.Controls.Add(Me.TextBox2) + Me.TabPage2.Controls.Add(Me.Label3) + Me.TabPage2.Controls.Add(Me.Label4) Me.TabPage2.Location = New System.Drawing.Point(4, 22) Me.TabPage2.Name = "TabPage2" Me.TabPage2.Padding = New System.Windows.Forms.Padding(3) @@ -128,6 +141,61 @@ Partial Class AttackExpander Me.TabPage2.Text = "Emerald" Me.TabPage2.UseVisualStyleBackColor = True ' + 'CheckBox3 + ' + Me.CheckBox3.AutoSize = True + Me.CheckBox3.Location = New System.Drawing.Point(20, 96) + Me.CheckBox3.Name = "CheckBox3" + Me.CheckBox3.Size = New System.Drawing.Size(100, 17) + Me.CheckBox3.TabIndex = 11 + Me.CheckBox3.Text = "Delete Old data" + Me.CheckBox3.UseVisualStyleBackColor = True + ' + 'CheckBox4 + ' + Me.CheckBox4.AutoSize = True + Me.CheckBox4.Location = New System.Drawing.Point(20, 73) + Me.CheckBox4.Name = "CheckBox4" + Me.CheckBox4.Size = New System.Drawing.Size(141, 17) + Me.CheckBox4.TabIndex = 10 + Me.CheckBox4.Text = "Apply Move Table Hack" + Me.CheckBox4.UseVisualStyleBackColor = True + ' + 'Button2 + ' + Me.Button2.Location = New System.Drawing.Point(347, 226) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(75, 23) + Me.Button2.TabIndex = 9 + Me.Button2.Text = "Expand" + Me.Button2.UseVisualStyleBackColor = True + ' + 'TextBox2 + ' + Me.TextBox2.Location = New System.Drawing.Point(154, 47) + Me.TextBox2.Name = "TextBox2" + Me.TextBox2.Size = New System.Drawing.Size(46, 20) + Me.TextBox2.TabIndex = 8 + Me.TextBox2.Text = "100" + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.Location = New System.Drawing.Point(17, 50) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(131, 13) + Me.Label3.TabIndex = 7 + Me.Label3.Text = "Number of Attacks to add:" + ' + 'Label4 + ' + Me.Label4.AutoSize = True + Me.Label4.Location = New System.Drawing.Point(17, 26) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(136, 13) + Me.Label4.TabIndex = 6 + Me.Label4.Text = "Number of attacks in ROM:" + ' 'LinkLabel1 ' Me.LinkLabel1.Location = New System.Drawing.Point(46, 326) @@ -153,6 +221,8 @@ Partial Class AttackExpander Me.TabControl1.ResumeLayout(False) Me.TabPage1.ResumeLayout(False) Me.TabPage1.PerformLayout() + Me.TabPage2.ResumeLayout(False) + Me.TabPage2.PerformLayout() Me.ResumeLayout(False) End Sub @@ -167,4 +237,10 @@ Partial Class AttackExpander Friend WithEvents Button1 As Button Friend WithEvents CheckBox1 As CheckBox Friend WithEvents CheckBox2 As CheckBox + Friend WithEvents CheckBox3 As CheckBox + Friend WithEvents CheckBox4 As CheckBox + Friend WithEvents Button2 As Button + Friend WithEvents TextBox2 As TextBox + Friend WithEvents Label3 As Label + Friend WithEvents Label4 As Label End Class diff --git a/GBAPokemonGameEditor/AttackExpander.vb b/GBAPokemonGameEditor/AttackExpander.vb index 47d53fa..287ab25 100644 --- a/GBAPokemonGameEditor/AttackExpander.vb +++ b/GBAPokemonGameEditor/AttackExpander.vb @@ -515,4 +515,5 @@ Public Class AttackExpander MsgBox("Attacks expanded successfully!") End Sub + End Class \ No newline at end of file diff --git a/GBAPokemonGameEditor/BattleFrontierEditor.vb b/GBAPokemonGameEditor/BattleFrontierEditor.vb index b3b3144..7ca970b 100644 --- a/GBAPokemonGameEditor/BattleFrontierEditor.vb +++ b/GBAPokemonGameEditor/BattleFrontierEditor.vb @@ -515,13 +515,13 @@ Public Class BattleFrontierEditor WriteHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 12), Hex(ComboBox9.SelectedIndex)) - Dim hpbit As String - Dim attackbit As String - Dim defensebit As String - Dim speedbit As String - Dim specialattackbit As String - Dim specialdefensebit As String - Dim evspreadwritevar As String + Dim hpbit As String = "" + Dim attackbit As String = "" + Dim defensebit As String = "" + Dim speedbit As String = "" + Dim specialattackbit As String = "" + Dim specialdefensebit As String = "" + Dim evspreadwritevar As String = "" If CheckedListBox1.GetItemCheckState(0) = CheckState.Unchecked Then @@ -1246,13 +1246,13 @@ Public Class BattleFrontierEditor WriteHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "SlateportBattleTentPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox4.SelectedIndex * 16) + 12), Hex(ComboBox10.SelectedIndex)) - Dim hpbit As String - Dim attackbit As String - Dim defensebit As String - Dim speedbit As String - Dim specialattackbit As String - Dim specialdefensebit As String - Dim evspreadwritevar As String + Dim hpbit As String = "" + Dim attackbit As String = "" + Dim defensebit As String = "" + Dim speedbit As String = "" + Dim specialattackbit As String = "" + Dim specialdefensebit As String = "" + Dim evspreadwritevar As String = "" If CheckedListBox2.GetItemCheckState(0) = CheckState.Unchecked Then @@ -1380,13 +1380,13 @@ Public Class BattleFrontierEditor WriteHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "VerdanturfBattleTentPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox7.SelectedIndex * 16) + 12), Hex(ComboBox19.SelectedIndex)) - Dim hpbit As String - Dim attackbit As String - Dim defensebit As String - Dim speedbit As String - Dim specialattackbit As String - Dim specialdefensebit As String - Dim evspreadwritevar As String + Dim hpbit As String = "" + Dim attackbit As String = "" + Dim defensebit As String = "" + Dim speedbit As String = "" + Dim specialattackbit As String = "" + Dim specialdefensebit As String = "" + Dim evspreadwritevar As String = "" If CheckedListBox3.GetItemCheckState(0) = CheckState.Unchecked Then @@ -1514,13 +1514,13 @@ Public Class BattleFrontierEditor WriteHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "FallarborBattleTentPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox10.SelectedIndex * 16) + 12), Hex(ComboBox28.SelectedIndex)) - Dim hpbit As String - Dim attackbit As String - Dim defensebit As String - Dim speedbit As String - Dim specialattackbit As String - Dim specialdefensebit As String - Dim evspreadwritevar As String + Dim hpbit As String = "" + Dim attackbit As String = "" + Dim defensebit As String = "" + Dim speedbit As String = "" + Dim specialattackbit As String = "" + Dim specialdefensebit As String = "" + Dim evspreadwritevar As String = "" If CheckedListBox4.GetItemCheckState(0) = CheckState.Unchecked Then diff --git a/GBAPokemonGameEditor/GetNameFunctions.vb b/GBAPokemonGameEditor/GetNameFunctions.vb index 744d7fc..150fa09 100644 --- a/GBAPokemonGameEditor/GetNameFunctions.vb +++ b/GBAPokemonGameEditor/GetNameFunctions.vb @@ -5,6 +5,7 @@ Module GetNameFunctions Public Function GetAbilityName(ByVal Index As Integer) Dim offvar As Integer + Dim b As String = "" offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "AbilityNames", "")), System.Globalization.NumberStyles.HexNumber) @@ -16,19 +17,19 @@ Module GetNameFunctions FileOpen(FileNum, LoadedROM, OpenMode.Binary) Dim AbilityName As String = "xxxxxxxxxxxxxx" FileGet(FileNum, AbilityName, offvar + 1 + (13 * Index)) - b$ = Sapp2Asc(AbilityName, False) - While InStr(1, b$, "\x") : b$ = LSet(b$, Len(b$) - 1) : End While - b$ = LSet(b$, Len(b$) - 1) + b = Sapp2Asc(AbilityName, False) + While InStr(1, b, "\x") : b = LSet(b, Len(b) - 1) : End While + b = LSet(b, Len(b) - 1) End If FileClose(FileNum) - GetAbilityName = b$ + GetAbilityName = b End Function Public Function GetItemName(ByVal Index As Integer) Dim offvar As Integer - + Dim b As String = "" offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "ItemData", "")), System.Globalization.NumberStyles.HexNumber) If header3 = "J" Then @@ -39,14 +40,14 @@ Module GetNameFunctions FileOpen(FileNum, LoadedROM, OpenMode.Binary) Dim ItemName As String = "xxxxxxxxxxxxxx" FileGet(FileNum, ItemName, offvar + 1 + (44 * Index)) - b$ = Sapp2Asc(ItemName, False) - While InStr(1, b$, "\x") : b$ = LSet(b$, Len(b$) - 1) : End While - b$ = LSet(b$, Len(b$) - 1) + b = Sapp2Asc(ItemName, False) + While InStr(1, b, "\x") : b = LSet(b, Len(b) - 1) : End While + b = LSet(b, Len(b) - 1) End If FileClose(FileNum) - GetItemName = b$ + GetItemName = b End Function Public Function GetPokemonName(ByVal Index As Integer) @@ -118,6 +119,7 @@ Module GetNameFunctions Public Function GetAttackName(ByVal Index As Integer) Dim offvar As Integer + Dim b As String = "" offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "AttackNames", "")), System.Globalization.NumberStyles.HexNumber) @@ -129,19 +131,19 @@ Module GetNameFunctions FileOpen(FileNum, LoadedROM, OpenMode.Binary) Dim AttackName As String = "xxxxxxxxxxxxx" FileGet(FileNum, AttackName, offvar + 1 + (13 * Index)) - b$ = Sapp2Asc(AttackName, False) - While InStr(1, b$, "\x") : b$ = LSet(b$, Len(b$) - 1) : End While - b$ = LSet(b$, Len(b$) - 1) + b = Sapp2Asc(AttackName, False) + While InStr(1, b, "\x") : b = LSet(b, Len(b) - 1) : End While + b = LSet(b, Len(b) - 1) End If FileClose(FileNum) - GetAttackName = b$ + GetAttackName = b End Function Public Function GetBattleFrontierTrainerName(ByVal Index As Integer) As String Dim offvar As Integer - Dim stringvar As String + Dim stringvar As String = "" offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) If header2 = "BPE" Then @@ -174,7 +176,7 @@ Module GetNameFunctions Public Function GetSlateportBattleTentTrainerName(ByVal Index As Integer) As String Dim offvar As Integer - Dim stringvar As String + Dim stringvar As String = "" offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "SlateportBattleTentTrainers", "")), System.Globalization.NumberStyles.HexNumber) If header2 = "BPE" Then @@ -207,7 +209,7 @@ Module GetNameFunctions Public Function GetVerdanturfBattleTentTrainerName(ByVal Index As Integer) As String Dim offvar As Integer - Dim stringvar As String + Dim stringvar As String = "" offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "VerdanturfBattleTentTrainers", "")), System.Globalization.NumberStyles.HexNumber) If header2 = "BPE" Then @@ -240,7 +242,7 @@ Module GetNameFunctions Public Function GetFallarborBattleTentTrainerName(ByVal Index As Integer) As String Dim offvar As Integer - Dim stringvar As String + Dim stringvar As String = "" offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "FallarborBattleTentTrainers", "")), System.Globalization.NumberStyles.HexNumber) If header2 = "BPE" Then @@ -273,6 +275,7 @@ Module GetNameFunctions Public Function GetTrainerClass(ByVal Index As Integer) Dim offvar As Integer + Dim b As String = "" offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "TrainerClasses", "")), System.Globalization.NumberStyles.HexNumber) @@ -284,18 +287,19 @@ Module GetNameFunctions FileOpen(FileNum, LoadedROM, OpenMode.Binary) Dim Name As String = "xxxxxxxxxxxxx" FileGet(FileNum, Name, offvar + 1 + (13 * Index)) - b$ = Sapp2Asc(Name, False) - While InStr(1, b$, "\x") : b$ = LSet(b$, Len(b$) - 1) : End While - b$ = LSet(b$, Len(b$) - 1) + b = Sapp2Asc(Name, False) + While InStr(1, b, "\x") : b = LSet(b, Len(b) - 1) : End While + b = LSet(b, Len(b) - 1) End If FileClose(FileNum) - GetTrainerClass = b$ + GetTrainerClass = b End Function Public Function GetPokedexTypeName(ByVal Index As Integer) Dim offvar As Integer + Dim b As String = "" offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber) @@ -329,13 +333,13 @@ Module GetNameFunctions FileOpen(FileNum, LoadedROM, OpenMode.Binary) Dim PokeType As String = "xxxxxxxxxxxx" FileGet(FileNum, PokeType, offvar + 1 + (SkipVar * Index)) - b$ = Sapp2Asc(PokeType, False) - While InStr(1, b$, "\x") : b$ = LSet(b$, Len(b$) - 1) : End While - b$ = LSet(b$, Len(b$) - 1) + b = Sapp2Asc(PokeType, False) + While InStr(1, b, "\x") : b = LSet(b, Len(b) - 1) : End While + b = LSet(b, Len(b) - 1) End If FileClose(FileNum) - GetPokedexTypeName = b$ + GetPokedexTypeName = b End Function End Module diff --git a/GBAPokemonGameEditor/HexFunctions.vb b/GBAPokemonGameEditor/HexFunctions.vb index 6aa9517..c7beb61 100644 --- a/GBAPokemonGameEditor/HexFunctions.vb +++ b/GBAPokemonGameEditor/HexFunctions.vb @@ -30,7 +30,7 @@ Module HexFunctions Public Function ReverseHEX(ByRef HEXData As String) As String Dim iNum As Integer - Dim HEXHolder As String + Dim HEXHolder As String = "" If Len(HEXData) / 2 <> Int(Len(HEXData) / 2) Then HEXData = "0" & HEXData For iNum = 0 To Len(HEXData) + 1 diff --git a/GBAPokemonGameEditor/INI.vb b/GBAPokemonGameEditor/INI.vb index b603cbb..295c64f 100644 --- a/GBAPokemonGameEditor/INI.vb +++ b/GBAPokemonGameEditor/INI.vb @@ -28,14 +28,16 @@ Dim objResult As New System.Text.StringBuilder(256) intCharCount = GetPrivateProfileString(Section, Key, _ [Default], objResult, objResult.Capacity, strFilename) - If intCharCount > 0 Then GetString = _ + If intCharCount > 0 Then GetString = Left(objResult.ToString, intCharCount) + End Function Public Function WriteString(ByVal strFilename As String, ByVal Section As String, _ ByVal Key As String, ByVal Value As String) WritePrivateProfileString(Section, Key, Value, strFilename) Flush(strFilename) + WriteString = "" End Function Private Sub Flush(ByVal thing As String) diff --git a/GBAPokemonGameEditor/ItemEditor.Designer.vb b/GBAPokemonGameEditor/ItemEditor.Designer.vb index 59774fc..1e6c74d 100644 --- a/GBAPokemonGameEditor/ItemEditor.Designer.vb +++ b/GBAPokemonGameEditor/ItemEditor.Designer.vb @@ -88,7 +88,8 @@ Partial Class ItemEditor ' 'ItemListComboBox ' - Me.ItemListComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.ItemListComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend + Me.ItemListComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems Me.ItemListComboBox.FormattingEnabled = True Me.ItemListComboBox.Location = New System.Drawing.Point(18, 19) Me.ItemListComboBox.Name = "ItemListComboBox" diff --git a/GBAPokemonGameEditor/Pokemonedit.Designer.vb b/GBAPokemonGameEditor/Pokemonedit.Designer.vb index 59b3dc6..1dff2ae 100644 --- a/GBAPokemonGameEditor/Pokemonedit.Designer.vb +++ b/GBAPokemonGameEditor/Pokemonedit.Designer.vb @@ -1574,8 +1574,8 @@ Partial Class Pokemonedit ' 'PKMNames ' + Me.PKMNames.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend Me.PKMNames.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems - Me.PKMNames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.PKMNames.FormattingEnabled = True Me.PKMNames.Location = New System.Drawing.Point(6, 28) Me.PKMNames.Name = "PKMNames" diff --git a/GBAPokemonGameEditor/Pokemonedit.vb b/GBAPokemonGameEditor/Pokemonedit.vb index 4905809..bff481f 100644 --- a/GBAPokemonGameEditor/Pokemonedit.vb +++ b/GBAPokemonGameEditor/Pokemonedit.vb @@ -1906,11 +1906,11 @@ Public Class Pokemonedit Dim binarytowrite As String Dim bytetowrite As String - Dim LoopVar As Integer - Dim binarythebitch As String + ' Dim LoopVar As Integer + ' Dim binarythebitch As String Dim emloop As Integer - Dim blah As Integer - Dim curchar As String + 'Dim blah As Integer + 'Dim curchar As String If header2 = "BPE" Then For emloop = 0 To 1 @@ -2007,7 +2007,7 @@ Public Class Pokemonedit Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click 'Start of new function. - Dim holder As String + Dim holder As String = "" Dim bytetowrite As String Dim at As String Dim lvl As String diff --git a/GBAPokemonGameEditor/TMHMEditor.Designer.vb b/GBAPokemonGameEditor/TMHMEditor.Designer.vb index e6a6eff..2724312 100644 --- a/GBAPokemonGameEditor/TMHMEditor.Designer.vb +++ b/GBAPokemonGameEditor/TMHMEditor.Designer.vb @@ -58,7 +58,8 @@ Partial Class TMHMEditor ' 'AttackList ' - Me.AttackList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.AttackList.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend + Me.AttackList.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems Me.AttackList.FormattingEnabled = True Me.AttackList.Location = New System.Drawing.Point(59, 221) Me.AttackList.Name = "AttackList" diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application index 821d863..ba73643 100644 --- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application +++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application @@ -16,7 +16,7 @@ - n9vg2q2Nsi4oaQ4fg95axiAWzb4= + Kr83qDHsu3VmmcWovx+7dOdqzzo= diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe index d5dd051..ab0a1d1 100644 Binary files a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe and b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe differ diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe.manifest b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe.manifest index ca4f5dd..acd4e43 100644 --- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe.manifest +++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe.manifest @@ -43,14 +43,14 @@ - + - Hr6jcLc9HIIT0uJX+ANQCBqk4Xk= + zUcu/CLiWpJyp2kTZzIVlNOv+7g= diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.pdb b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.pdb index 1e3c820..4e2f39b 100644 Binary files a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.pdb and b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.pdb differ diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application index 821d863..ba73643 100644 --- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application +++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application @@ -16,7 +16,7 @@ - n9vg2q2Nsi4oaQ4fg95axiAWzb4= + Kr83qDHsu3VmmcWovx+7dOdqzzo= diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest index ca4f5dd..acd4e43 100644 --- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest +++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest @@ -43,14 +43,14 @@ - + - Hr6jcLc9HIIT0uJX+ANQCBqk4Xk= + zUcu/CLiWpJyp2kTZzIVlNOv+7g= diff --git a/GBAPokemonGameEditor/bin/Debug/app.publish/GBAPokemonGameEditor.exe b/GBAPokemonGameEditor/bin/Debug/app.publish/GBAPokemonGameEditor.exe index d5dd051..ab0a1d1 100644 Binary files a/GBAPokemonGameEditor/bin/Debug/app.publish/GBAPokemonGameEditor.exe and b/GBAPokemonGameEditor/bin/Debug/app.publish/GBAPokemonGameEditor.exe differ diff --git a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.application b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.application index 821d863..ba73643 100644 --- a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.application +++ b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.application @@ -16,7 +16,7 @@ - n9vg2q2Nsi4oaQ4fg95axiAWzb4= + Kr83qDHsu3VmmcWovx+7dOdqzzo= diff --git a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe index d5dd051..ab0a1d1 100644 Binary files a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe and b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe differ diff --git a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe.manifest b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe.manifest index ca4f5dd..acd4e43 100644 --- a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe.manifest +++ b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe.manifest @@ -43,14 +43,14 @@ - + - Hr6jcLc9HIIT0uJX+ANQCBqk4Xk= + zUcu/CLiWpJyp2kTZzIVlNOv+7g= diff --git a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.pdb b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.pdb index 1e3c820..4e2f39b 100644 Binary files a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.pdb and b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.pdb differ diff --git a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.vbproj.GenerateResource.Cache b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.vbproj.GenerateResource.Cache index 30445e6..c28c216 100644 Binary files a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.vbproj.GenerateResource.Cache and b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.vbproj.GenerateResource.Cache differ