mirror of
https://github.com/Gamer2020/PokemonGameEditor.git
synced 2026-07-19 08:52:50 -05:00
Pokemon Adder: JPAN Save hack added.
JPAN's save hack is now installed by the adder. Will start working on the rest tomorrow.
This commit is contained in:
parent
6c4cbb812e
commit
016c0df24e
Binary file not shown.
4
GBAPokemonGameEditor/AbilityAdder.Designer.vb
generated
4
GBAPokemonGameEditor/AbilityAdder.Designer.vb
generated
|
|
@ -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
|
||||
|
|
|
|||
4
GBAPokemonGameEditor/AttackAdder.Designer.vb
generated
4
GBAPokemonGameEditor/AttackAdder.Designer.vb
generated
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="LinkLabel1.Text" xml:space="preserve">
|
||||
<value>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.</value>
|
||||
<value>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.</value>
|
||||
</data>
|
||||
<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">
|
||||
|
|
|
|||
|
|
@ -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
|
||||
62
GBAPokemonGameEditor/PokemonAdder.Designer.vb
generated
62
GBAPokemonGameEditor/PokemonAdder.Designer.vb
generated
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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#sha1" />
|
||||
<dsig:DigestValue>jfvbGn7LcT1N29gC0NsjDrx1oPk=</dsig:DigestValue>
|
||||
<dsig:DigestValue>qa7/81UVObr1rERo72+ag6Q7WW0=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -43,14 +43,14 @@
|
|||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1691648">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1695744">
|
||||
<assemblyIdentity name="PokemonGameEditor" version="3.4.0.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#sha1" />
|
||||
<dsig:DigestValue>ri3YxIELwBAEYc1I5uvNojJRNQM=</dsig:DigestValue>
|
||||
<dsig:DigestValue>0kSPIazLRLd9i/PTEY8j91yD4pA=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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#sha1" />
|
||||
<dsig:DigestValue>jfvbGn7LcT1N29gC0NsjDrx1oPk=</dsig:DigestValue>
|
||||
<dsig:DigestValue>qa7/81UVObr1rERo72+ag6Q7WW0=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
|
|
@ -43,14 +43,14 @@
|
|||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1691648">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1695744">
|
||||
<assemblyIdentity name="PokemonGameEditor" version="3.4.0.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#sha1" />
|
||||
<dsig:DigestValue>ri3YxIELwBAEYc1I5uvNojJRNQM=</dsig:DigestValue>
|
||||
<dsig:DigestValue>0kSPIazLRLd9i/PTEY8j91yD4pA=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -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#sha1" />
|
||||
<dsig:DigestValue>jfvbGn7LcT1N29gC0NsjDrx1oPk=</dsig:DigestValue>
|
||||
<dsig:DigestValue>qa7/81UVObr1rERo72+ag6Q7WW0=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -43,14 +43,14 @@
|
|||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1691648">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1695744">
|
||||
<assemblyIdentity name="PokemonGameEditor" version="3.4.0.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#sha1" />
|
||||
<dsig:DigestValue>ri3YxIELwBAEYc1I5uvNojJRNQM=</dsig:DigestValue>
|
||||
<dsig:DigestValue>0kSPIazLRLd9i/PTEY8j91yD4pA=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue
Block a user