mirror of
https://github.com/Gamer2020/PokemonGameEditor.git
synced 2026-05-27 19:08:05 -05:00
Ability descriptions editable!
Made it so you can edit the ability descriptions.
This commit is contained in:
parent
e9c9349005
commit
42d3c45e76
Binary file not shown.
50
GBAPokemonGameEditor/AbilityEdit.Designer.vb
generated
50
GBAPokemonGameEditor/AbilityEdit.Designer.vb
generated
|
|
@ -24,6 +24,7 @@ Partial Class AbilityEdit
|
|||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AbilityEdit))
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.AbilityList = New System.Windows.Forms.ComboBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.AbilityIndexTextBox = New System.Windows.Forms.TextBox()
|
||||
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
|
||||
|
|
@ -33,7 +34,8 @@ 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.Label21 = New System.Windows.Forms.Label()
|
||||
Me.Button6 = New System.Windows.Forms.Button()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
Me.GroupBox3.SuspendLayout()
|
||||
|
|
@ -51,6 +53,16 @@ Partial Class AbilityEdit
|
|||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "Ability Selection"
|
||||
'
|
||||
'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
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
|
|
@ -74,7 +86,7 @@ Partial Class AbilityEdit
|
|||
Me.GroupBox2.Controls.Add(Me.TextBox1)
|
||||
Me.GroupBox2.Location = New System.Drawing.Point(12, 108)
|
||||
Me.GroupBox2.Name = "GroupBox2"
|
||||
Me.GroupBox2.Size = New System.Drawing.Size(134, 83)
|
||||
Me.GroupBox2.Size = New System.Drawing.Size(134, 113)
|
||||
Me.GroupBox2.TabIndex = 3
|
||||
Me.GroupBox2.TabStop = False
|
||||
Me.GroupBox2.Text = "Name"
|
||||
|
|
@ -97,12 +109,14 @@ Partial Class AbilityEdit
|
|||
'
|
||||
'GroupBox3
|
||||
'
|
||||
Me.GroupBox3.Controls.Add(Me.Label21)
|
||||
Me.GroupBox3.Controls.Add(Me.Button6)
|
||||
Me.GroupBox3.Controls.Add(Me.TextBox3)
|
||||
Me.GroupBox3.Controls.Add(Me.Button2)
|
||||
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, 178)
|
||||
Me.GroupBox3.Size = New System.Drawing.Size(210, 208)
|
||||
Me.GroupBox3.TabIndex = 4
|
||||
Me.GroupBox3.TabStop = False
|
||||
Me.GroupBox3.Text = "Description"
|
||||
|
|
@ -112,7 +126,6 @@ Partial Class AbilityEdit
|
|||
Me.TextBox3.Location = New System.Drawing.Point(12, 57)
|
||||
Me.TextBox3.Multiline = True
|
||||
Me.TextBox3.Name = "TextBox3"
|
||||
Me.TextBox3.ReadOnly = True
|
||||
Me.TextBox3.ScrollBars = System.Windows.Forms.ScrollBars.Both
|
||||
Me.TextBox3.Size = New System.Drawing.Size(174, 96)
|
||||
Me.TextBox3.TabIndex = 2
|
||||
|
|
@ -133,21 +146,30 @@ Partial Class AbilityEdit
|
|||
Me.TextBox2.Size = New System.Drawing.Size(90, 20)
|
||||
Me.TextBox2.TabIndex = 0
|
||||
'
|
||||
'AbilityList
|
||||
'Label21
|
||||
'
|
||||
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
|
||||
Me.Label21.AutoSize = True
|
||||
Me.Label21.ForeColor = System.Drawing.SystemColors.ControlText
|
||||
Me.Label21.Location = New System.Drawing.Point(9, 156)
|
||||
Me.Label21.Name = "Label21"
|
||||
Me.Label21.Size = New System.Drawing.Size(43, 13)
|
||||
Me.Label21.TabIndex = 31
|
||||
Me.Label21.Text = "Length:"
|
||||
'
|
||||
'Button6
|
||||
'
|
||||
Me.Button6.Location = New System.Drawing.Point(119, 172)
|
||||
Me.Button6.Name = "Button6"
|
||||
Me.Button6.Size = New System.Drawing.Size(67, 20)
|
||||
Me.Button6.TabIndex = 30
|
||||
Me.Button6.Text = "Save"
|
||||
Me.Button6.UseVisualStyleBackColor = True
|
||||
'
|
||||
'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, 198)
|
||||
Me.ClientSize = New System.Drawing.Size(385, 227)
|
||||
Me.Controls.Add(Me.GroupBox3)
|
||||
Me.Controls.Add(Me.GroupBox2)
|
||||
Me.Controls.Add(Me.GroupBox1)
|
||||
|
|
@ -177,4 +199,6 @@ Partial Class AbilityEdit
|
|||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents AbilityIndexTextBox As TextBox
|
||||
Friend WithEvents AbilityList As ComboBox
|
||||
Friend WithEvents Label21 As Label
|
||||
Friend WithEvents Button6 As Button
|
||||
End Class
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
Public Class AbilityEdit
|
||||
Dim AbilityDesc As Integer
|
||||
Dim CurrentAbilityDescripLength As Integer
|
||||
|
||||
Private Sub AbilityEdit_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
|
||||
MainFrm.Visible = True
|
||||
|
|
@ -83,9 +84,90 @@
|
|||
DexDescp = Mid$(DexDescp, 1, InStr(1, DexDescp, "\x"))
|
||||
DexDescp = Replace(DexDescp, "\n", vbCrLf)
|
||||
DexDescp = Replace(RTrim$(DexDescp), "\", "")
|
||||
CurrentAbilityDescripLength = Len(DexDescp)
|
||||
TextBox3.Text = DexDescp
|
||||
TextBox3.MaxLength = Len(DexDescp)
|
||||
|
||||
FileClose(FileNum)
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged
|
||||
Label21.Text = "Length: " & Len(TextBox3.Text) & "/" & CurrentAbilityDescripLength
|
||||
Label21.ForeColor = Color.Black
|
||||
|
||||
If Len(TextBox3.Text) > CurrentAbilityDescripLength Then
|
||||
Label21.Text = Label21.Text & " Requires repoint!"
|
||||
|
||||
Label21.ForeColor = Color.Red
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
|
||||
Dim curdespoff As String
|
||||
|
||||
Dim destowrite As String
|
||||
|
||||
curdespoff = Hex(Val("&H" & ReverseHEX(ReadHEX(LoadedROM, (AbilityDesc) + (AbilityList.SelectedIndex * 4), 4))) - &H8000000)
|
||||
|
||||
destowrite = Asc2Sapp(Replace(TextBox3.Text, vbCrLf, "\n") & "\x")
|
||||
|
||||
|
||||
|
||||
If Len(TextBox3.Text) > CurrentAbilityDescripLength Then
|
||||
|
||||
|
||||
Dim result As DialogResult = MessageBox.Show("The text will be written to free space and the pointer will be repointed. Would you like to do that?",
|
||||
"Repoint?",
|
||||
MessageBoxButtons.YesNo)
|
||||
|
||||
If (result = DialogResult.Yes) Then
|
||||
|
||||
Dim newtextoff As String
|
||||
|
||||
newtextoff = SearchFreeSpaceFourAligned(LoadedROM, &HFF, (Len(destowrite & " ")), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000"))
|
||||
|
||||
FileNum = FreeFile()
|
||||
|
||||
FileOpen(FileNum, LoadedROM, OpenMode.Binary)
|
||||
|
||||
FilePut(FileNum, destowrite & " ", ("&H" & Hex(newtextoff)) + 1, False)
|
||||
|
||||
FileClose(FileNum)
|
||||
|
||||
TextBox2.Text = Hex(newtextoff)
|
||||
|
||||
Button2.PerformClick()
|
||||
|
||||
Label21.Text = "Length: " & Len(TextBox3.Text) & "/" & CurrentAbilityDescripLength
|
||||
Label21.ForeColor = Color.Black
|
||||
|
||||
If Len(TextBox3.Text) > CurrentAbilityDescripLength Then
|
||||
Label21.Text = Label21.Text & " Requires repoint!"
|
||||
|
||||
Label21.ForeColor = Color.Red
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
|
||||
FileNum = FreeFile()
|
||||
|
||||
FileOpen(FileNum, LoadedROM, OpenMode.Binary)
|
||||
|
||||
FilePut(FileNum, destowrite, ("&H" & curdespoff) + 1, False)
|
||||
|
||||
FileClose(FileNum)
|
||||
|
||||
TextBox2.Text = curdespoff
|
||||
|
||||
End If
|
||||
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>PoPChwn6Uv+GQRKkvz4LdV//0BM=</dsig:DigestValue>
|
||||
<dsig:DigestValue>QXbsJUSt7zEqcwyu4f9qTclSKLk=</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="1476608">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1478144">
|
||||
<assemblyIdentity name="PokemonGameEditor" version="3.3.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>T45A1rQN60iD0gCcqkGA9V79nhU=</dsig:DigestValue>
|
||||
<dsig:DigestValue>4g4MnS03k1DDsta0wOovUeCbvEU=</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>PoPChwn6Uv+GQRKkvz4LdV//0BM=</dsig:DigestValue>
|
||||
<dsig:DigestValue>QXbsJUSt7zEqcwyu4f9qTclSKLk=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
|
|
@ -43,14 +43,14 @@
|
|||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1476608">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1478144">
|
||||
<assemblyIdentity name="PokemonGameEditor" version="3.3.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>T45A1rQN60iD0gCcqkGA9V79nhU=</dsig:DigestValue>
|
||||
<dsig:DigestValue>4g4MnS03k1DDsta0wOovUeCbvEU=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
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>PoPChwn6Uv+GQRKkvz4LdV//0BM=</dsig:DigestValue>
|
||||
<dsig:DigestValue>QXbsJUSt7zEqcwyu4f9qTclSKLk=</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="1476608">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1478144">
|
||||
<assemblyIdentity name="PokemonGameEditor" version="3.3.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>T45A1rQN60iD0gCcqkGA9V79nhU=</dsig:DigestValue>
|
||||
<dsig:DigestValue>4g4MnS03k1DDsta0wOovUeCbvEU=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue
Block a user