diff --git a/.vs/GBAPokemonGameEditor/v14/.suo b/.vs/GBAPokemonGameEditor/v14/.suo index d3849e8..4b91e7f 100644 Binary files a/.vs/GBAPokemonGameEditor/v14/.suo and b/.vs/GBAPokemonGameEditor/v14/.suo differ diff --git a/GBAPokemonGameEditor/AbilityAdder.Designer.vb b/GBAPokemonGameEditor/AbilityAdder.Designer.vb index cdcdb34..6b0a526 100644 --- a/GBAPokemonGameEditor/AbilityAdder.Designer.vb +++ b/GBAPokemonGameEditor/AbilityAdder.Designer.vb @@ -82,7 +82,7 @@ Partial Class AbilityAdder Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(180, 45) Me.Button1.TabIndex = 3 - Me.Button1.Text = "Expand" + Me.Button1.Text = "Add" Me.Button1.UseVisualStyleBackColor = True ' 'TextBox1 @@ -142,7 +142,7 @@ Partial Class AbilityAdder Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(180, 45) Me.Button2.TabIndex = 7 - Me.Button2.Text = "Expand" + Me.Button2.Text = "Add" Me.Button2.UseVisualStyleBackColor = True ' 'TextBox2 diff --git a/GBAPokemonGameEditor/AttackAdder.Designer.vb b/GBAPokemonGameEditor/AttackAdder.Designer.vb index 980c322..0812a67 100644 --- a/GBAPokemonGameEditor/AttackAdder.Designer.vb +++ b/GBAPokemonGameEditor/AttackAdder.Designer.vb @@ -96,7 +96,7 @@ Partial Class AttackAdder Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 23) Me.Button1.TabIndex = 3 - Me.Button1.Text = "Expand" + Me.Button1.Text = "Add" Me.Button1.UseVisualStyleBackColor = True ' 'TextBox1 @@ -168,7 +168,7 @@ Partial Class AttackAdder Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 23) Me.Button2.TabIndex = 9 - Me.Button2.Text = "Expand" + Me.Button2.Text = "Add" Me.Button2.UseVisualStyleBackColor = True ' 'TextBox2 diff --git a/GBAPokemonGameEditor/AttackAdder.resx b/GBAPokemonGameEditor/AttackAdder.resx index e137de9..7f0b96e 100644 --- a/GBAPokemonGameEditor/AttackAdder.resx +++ b/GBAPokemonGameEditor/AttackAdder.resx @@ -118,7 +118,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - To remain consistent with what other people may have already done this tool uses the research from the folowing thread. http://www.pokecommunity.com/showthread.php?t=263479 Click to view the webpage. + To remain consistent with what other people may have already done this tool uses the research from the folowing thread: http://www.pokecommunity.com/showthread.php?t=263479 Click to view the webpage. diff --git a/GBAPokemonGameEditor/AttackAdder.vb b/GBAPokemonGameEditor/AttackAdder.vb index 66c7aef..7a5ccef 100644 --- a/GBAPokemonGameEditor/AttackAdder.vb +++ b/GBAPokemonGameEditor/AttackAdder.vb @@ -512,7 +512,7 @@ Public Class AttackAdder Cursor = Cursors.Arrow - MsgBox("Attacks expanded successfully!") + MsgBox("Attacks added successfully!") End Sub @@ -1073,7 +1073,7 @@ Public Class AttackAdder Cursor = Cursors.Arrow - MsgBox("Attacks expanded successfully!") + MsgBox("Attacks added successfully!") End Sub End Class \ No newline at end of file diff --git a/GBAPokemonGameEditor/PokemonAdder.Designer.vb b/GBAPokemonGameEditor/PokemonAdder.Designer.vb index aa1fcf8..4f195e2 100644 --- a/GBAPokemonGameEditor/PokemonAdder.Designer.vb +++ b/GBAPokemonGameEditor/PokemonAdder.Designer.vb @@ -26,7 +26,12 @@ Partial Class PokemonAdder Me.TabControl1 = New System.Windows.Forms.TabControl() Me.TabPage1 = New System.Windows.Forms.TabPage() Me.TabPage2 = New System.Windows.Forms.TabPage() + Me.CheckBox1 = New System.Windows.Forms.CheckBox() + Me.LinkLabel1 = New System.Windows.Forms.LinkLabel() + Me.Button1 = New System.Windows.Forms.Button() + Me.Label1 = New System.Windows.Forms.Label() Me.TabControl1.SuspendLayout() + Me.TabPage1.SuspendLayout() Me.SuspendLayout() ' 'TabControl1 @@ -36,15 +41,19 @@ Partial Class PokemonAdder Me.TabControl1.Location = New System.Drawing.Point(12, 21) Me.TabControl1.Name = "TabControl1" Me.TabControl1.SelectedIndex = 0 - Me.TabControl1.Size = New System.Drawing.Size(243, 149) + Me.TabControl1.Size = New System.Drawing.Size(302, 227) Me.TabControl1.TabIndex = 0 ' 'TabPage1 ' + Me.TabPage1.Controls.Add(Me.Label1) + Me.TabPage1.Controls.Add(Me.Button1) + Me.TabPage1.Controls.Add(Me.LinkLabel1) + Me.TabPage1.Controls.Add(Me.CheckBox1) Me.TabPage1.Location = New System.Drawing.Point(4, 22) Me.TabPage1.Name = "TabPage1" Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) - Me.TabPage1.Size = New System.Drawing.Size(235, 123) + Me.TabPage1.Size = New System.Drawing.Size(294, 201) Me.TabPage1.TabIndex = 0 Me.TabPage1.Text = "Fire Red" Me.TabPage1.UseVisualStyleBackColor = True @@ -59,11 +68,52 @@ Partial Class PokemonAdder Me.TabPage2.Text = "Emerald" Me.TabPage2.UseVisualStyleBackColor = True ' + 'CheckBox1 + ' + Me.CheckBox1.AutoSize = True + Me.CheckBox1.Checked = True + Me.CheckBox1.CheckState = System.Windows.Forms.CheckState.Checked + Me.CheckBox1.Location = New System.Drawing.Point(14, 41) + Me.CheckBox1.Name = "CheckBox1" + Me.CheckBox1.Size = New System.Drawing.Size(185, 17) + Me.CheckBox1.TabIndex = 0 + Me.CheckBox1.Text = "Install JPAN's " & Global.Microsoft.VisualBasic.ChrW(9) & "save block recycle" + Me.CheckBox1.UseVisualStyleBackColor = True + ' + 'LinkLabel1 + ' + Me.LinkLabel1.Location = New System.Drawing.Point(11, 118) + Me.LinkLabel1.Name = "LinkLabel1" + Me.LinkLabel1.Size = New System.Drawing.Size(265, 69) + Me.LinkLabel1.TabIndex = 1 + Me.LinkLabel1.TabStop = True + Me.LinkLabel1.Text = "To remain consistent with what other people may have already done this tool uses " & + "the research from the folowing thread: http://www.pokecommunity.com/showthread.p" & + "hp?t=318569" + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(201, 81) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.TabIndex = 2 + Me.Button1.Text = "Add" + Me.Button1.UseVisualStyleBackColor = True + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(11, 15) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(146, 13) + Me.Label1.TabIndex = 3 + Me.Label1.Text = "Number of Pokemon in ROM:" + ' 'PokemonAdder ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(267, 182) + Me.ClientSize = New System.Drawing.Size(326, 251) Me.Controls.Add(Me.TabControl1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) @@ -72,6 +122,8 @@ Partial Class PokemonAdder Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Pokemon Adder" Me.TabControl1.ResumeLayout(False) + Me.TabPage1.ResumeLayout(False) + Me.TabPage1.PerformLayout() Me.ResumeLayout(False) End Sub @@ -79,4 +131,8 @@ Partial Class PokemonAdder Friend WithEvents TabControl1 As TabControl Friend WithEvents TabPage1 As TabPage Friend WithEvents TabPage2 As TabPage + Friend WithEvents CheckBox1 As CheckBox + Friend WithEvents LinkLabel1 As LinkLabel + Friend WithEvents Button1 As Button + Friend WithEvents Label1 As Label End Class diff --git a/GBAPokemonGameEditor/PokemonAdder.vb b/GBAPokemonGameEditor/PokemonAdder.vb index ea3f984..4dad6dc 100644 --- a/GBAPokemonGameEditor/PokemonAdder.vb +++ b/GBAPokemonGameEditor/PokemonAdder.vb @@ -1,4 +1,6 @@ -Public Class PokemonAdder +Imports System.IO + +Public Class PokemonAdder Private Sub PokemonAdder_Load(sender As Object, e As EventArgs) Handles MyBase.Load If header = "BPEE" Then @@ -16,6 +18,9 @@ TabControl1.TabPages(1).Enabled = False TabControl1.SelectedIndex = 0 + Label1.Text = "Number of Pokemon in ROM: " & (GetString(GetINIFileLocation(), header, "NumberOfPokemon", "")) - 1 + + Else TabControl1.TabPages(0).Enabled = False @@ -27,4 +32,58 @@ End If End Sub + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + + + If System.IO.File.Exists((LoadedROM).Substring(0, LoadedROM.Length - 4) & ".ini") = True Then + + MsgBox("An INI for this ROM has been detected! Values will be updated as needed.") + + Else + + MsgBox("INI not found! One will now be created for this ROM in the same location as the ROM. Keep the ini with the ROM so that PGE can know the location of the data.") + + File.Copy(AppPath & "ini\roms.ini", (LoadedROM).Substring(0, LoadedROM.Length - 4) & ".ini", True) + + + End If + + 'Install's JPAN's save hack. + + If CheckBox1.Checked And GetString(GetINIFileLocation(), header, "JPANSaveHack", "False") = "False" Then + + Dim SaveRoutine As String = "2168FF231B015B189888002809D004280AD00D280CD00D2D1CDD012008BC9846F0BDCC21084A06E096218900074A02E0BA210901064A043B18681060043A04390029F8D1E7E70000C8C0030220C30302C0CE030200480047719E0D08FFFFFFFFFF273F01CF19F880BE88002E08D0042E09D00D2E0BD000000048004723990D08CC23084A06E096239B00074A02E0BA231B01064A043F10683860043A043B002BF8D1E9E7C8C0030220C30302C0CE03020000240F0000F00FF00FF00FE01FF00FD02F980D0000F00FF00FF00FE01FF00FD02FF00FC03FF00FB04FF00FA05FF00F906FF00F807F5004" + Dim SaveTable As String = "0000240F0000F00FF00FF00FE01FF00FD02F980D0000F00FF00FF00FE01FF00FD02FF00FC03FF00FB04FF00FA05FF00F906FF00F807F5004" + Dim SaveRoutineOffset As String = "" + + SaveRoutineOffset = SearchFreeSpaceFourAligned(LoadedROM, &HFF, ((Len(SaveRoutine) / 2)), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000")) + + WriteHEX(LoadedROM, SaveRoutineOffset, SaveRoutine) + WriteHEX(LoadedROM, &H3FEC94, SaveTable) + + WriteHEX(LoadedROM, &HD9EDC, "00480047" & ReverseHEX(Hex((SaveRoutineOffset) + &H8000001))) + WriteHEX(LoadedROM, &HD991E, "3847") + WriteHEX(LoadedROM, &HD995C, ReverseHEX(Hex((SaveRoutineOffset) + &H8000061))) + + + 'Enable the hack in the ini file. + WriteString(GetINIFileLocation(), header, "JPANSaveHack", "True") + + End If + + + Cursor = Cursors.WaitCursor + + Cursor = Cursors.Arrow + + Label1.Text = "Number of Pokemon in ROM: " & (GetString(GetINIFileLocation(), header, "NumberOfPokemon", "")) - 1 + + MsgBox("Pokemon added successfully!") + + End Sub + + Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked + Process.Start("http://www.pokecommunity.com/showthread.php?t=318569") + End Sub End Class \ No newline at end of file diff --git a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.application b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.application index d79fdaf..8e663ff 100644 --- a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.application +++ b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.application @@ -16,7 +16,7 @@ - jfvbGn7LcT1N29gC0NsjDrx1oPk= + qa7/81UVObr1rERo72+ag6Q7WW0= diff --git a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe index f184e27..1263a39 100644 Binary files a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe and b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe differ diff --git a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe.manifest b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe.manifest index 73c5fad..19b0d40 100644 --- a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe.manifest +++ b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe.manifest @@ -43,14 +43,14 @@ - + - ri3YxIELwBAEYc1I5uvNojJRNQM= + 0kSPIazLRLd9i/PTEY8j91yD4pA= diff --git a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.pdb b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.pdb index fa31ee2..aa4ff86 100644 Binary files a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.pdb and b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.pdb differ diff --git a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.vshost.application b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.vshost.application index d79fdaf..8e663ff 100644 --- a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.vshost.application +++ b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.vshost.application @@ -16,7 +16,7 @@ - jfvbGn7LcT1N29gC0NsjDrx1oPk= + qa7/81UVObr1rERo72+ag6Q7WW0= diff --git a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.vshost.exe.manifest b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.vshost.exe.manifest index 73c5fad..19b0d40 100644 --- a/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.vshost.exe.manifest +++ b/GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.vshost.exe.manifest @@ -43,14 +43,14 @@ - + - ri3YxIELwBAEYc1I5uvNojJRNQM= + 0kSPIazLRLd9i/PTEY8j91yD4pA= diff --git a/GBAPokemonGameEditor/bin/Debug/app.publish/PokemonGameEditor.exe b/GBAPokemonGameEditor/bin/Debug/app.publish/PokemonGameEditor.exe index f184e27..1263a39 100644 Binary files a/GBAPokemonGameEditor/bin/Debug/app.publish/PokemonGameEditor.exe and b/GBAPokemonGameEditor/bin/Debug/app.publish/PokemonGameEditor.exe differ diff --git a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.vbproj.GenerateResource.Cache b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.vbproj.GenerateResource.Cache index a16d152..004965d 100644 Binary files a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.vbproj.GenerateResource.Cache and b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.vbproj.GenerateResource.Cache differ diff --git a/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.AttackAdder.resources b/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.AttackAdder.resources index becaf63..8c9c6fd 100644 Binary files a/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.AttackAdder.resources and b/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.AttackAdder.resources differ diff --git a/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.application b/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.application index d79fdaf..8e663ff 100644 --- a/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.application +++ b/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.application @@ -16,7 +16,7 @@ - jfvbGn7LcT1N29gC0NsjDrx1oPk= + qa7/81UVObr1rERo72+ag6Q7WW0= diff --git a/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.exe b/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.exe index f184e27..1263a39 100644 Binary files a/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.exe and b/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.exe differ diff --git a/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.exe.manifest b/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.exe.manifest index 73c5fad..19b0d40 100644 --- a/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.exe.manifest +++ b/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.exe.manifest @@ -43,14 +43,14 @@ - + - ri3YxIELwBAEYc1I5uvNojJRNQM= + 0kSPIazLRLd9i/PTEY8j91yD4pA= diff --git a/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.pdb b/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.pdb index fa31ee2..aa4ff86 100644 Binary files a/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.pdb and b/GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.pdb differ