diff --git a/GBAPokemonGameEditor.v12.suo b/GBAPokemonGameEditor.v12.suo index c980cc7..4a218f8 100644 Binary files a/GBAPokemonGameEditor.v12.suo and b/GBAPokemonGameEditor.v12.suo differ diff --git a/GBAPokemonGameEditor/GBAPokemonGameEditor.vbproj b/GBAPokemonGameEditor/GBAPokemonGameEditor.vbproj index 309403d..416db13 100644 --- a/GBAPokemonGameEditor/GBAPokemonGameEditor.vbproj +++ b/GBAPokemonGameEditor/GBAPokemonGameEditor.vbproj @@ -199,6 +199,12 @@ True + + PokedexDataEditor.vb + + + Form + PokedexOrderEditor.vb @@ -253,6 +259,9 @@ My.Resources Designer + + PokedexDataEditor.vb + PokedexOrderEditor.vb diff --git a/GBAPokemonGameEditor/GetNameFunctions.vb b/GBAPokemonGameEditor/GetNameFunctions.vb index 441b118..2da5e38 100644 --- a/GBAPokemonGameEditor/GetNameFunctions.vb +++ b/GBAPokemonGameEditor/GetNameFunctions.vb @@ -95,13 +95,6 @@ Module GetNameFunctions If header3 = "J" Then - 'FileNum = FreeFile() - 'FileOpen(FileNum, LoadedROM, OpenMode.Binary) - 'Dim JapPokeName As String = "xxxxxx" - 'FileGet(FileNum, JapPokeName, offvar + 1 + (6 * Index)) - 'b$ = Sapp2Asc(JapPokeName, True) - 'While InStr(1, b$, "\x") : b$ = LSet(b$, Len(b$) - 1) : End While - 'b$ = LSet(b$, Len(b$) - 1) stringvar = "not supported" Else @@ -135,9 +128,7 @@ Module GetNameFunctions FileNum = FreeFile() FileOpen(FileNum, LoadedROM, OpenMode.Binary) Dim AbilityName As String = "xxxxxxxxxxxxx" - 'MsgBox("dim abilityname") FileGet(FileNum, AbilityName, offvar + 1 + (13 * Index)) - 'MsgBox("filget") b$ = Sapp2Asc(AbilityName, False) While InStr(1, b$, "\x") : b$ = LSet(b$, Len(b$) - 1) : End While b$ = LSet(b$, Len(b$) - 1) @@ -203,4 +194,49 @@ Module GetNameFunctions FileClose(FileNum) GetTrainerClass = b$ End Function + + Public Function GetPokedexTypeName(ByVal Index As Integer) + Dim offvar As Integer + + offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber) + + If header3 = "J" Then + + If header2 = "AXP" Or header2 = "AXV" Then + SkipVar = "36" + ElseIf header2 = "BPR" Or header2 = "BPG" Then + SkipVar = "36" + ElseIf header2 = "BPE" Then + SkipVar = "32" + End If + + Else + If header2 = "AXP" Or header2 = "AXV" Then + SkipVar = "36" + ElseIf header2 = "BPR" Or header2 = "BPG" Then + SkipVar = "36" + ElseIf header2 = "BPE" Then + SkipVar = "32" + End If + End If + + + + If header3 = "J" Then + + Else + + FileNum = FreeFile() + 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) + + + End If + FileClose(FileNum) + GetPokedexTypeName = b$ + End Function End Module diff --git a/GBAPokemonGameEditor/MainFrm.Designer.vb b/GBAPokemonGameEditor/MainFrm.Designer.vb index 9e44a6e..728f524 100644 --- a/GBAPokemonGameEditor/MainFrm.Designer.vb +++ b/GBAPokemonGameEditor/MainFrm.Designer.vb @@ -360,7 +360,7 @@ Partial Class MainFrm Me.Button34.Name = "Button34" Me.Button34.Size = New System.Drawing.Size(81, 55) Me.Button34.TabIndex = 44 - Me.Button34.Text = "Button34" + Me.Button34.Text = "Item Editor" Me.Button34.UseVisualStyleBackColor = True ' 'Button35 diff --git a/GBAPokemonGameEditor/MainFrm.vb b/GBAPokemonGameEditor/MainFrm.vb index 7ddd7dc..2253fad 100644 --- a/GBAPokemonGameEditor/MainFrm.vb +++ b/GBAPokemonGameEditor/MainFrm.vb @@ -584,8 +584,7 @@ Public Class MainFrm Private Sub Button32_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button32.Click 'Me.Visible = False Me.Cursor = Cursors.WaitCursor - ' ShadowPass.Show() - MsgBox("Not added yet!") + PokedexDataEditor.Show() Me.Cursor = Cursors.Arrow End Sub diff --git a/GBAPokemonGameEditor/PokedexDataEditor.Designer.vb b/GBAPokemonGameEditor/PokedexDataEditor.Designer.vb new file mode 100644 index 0000000..39175de --- /dev/null +++ b/GBAPokemonGameEditor/PokedexDataEditor.Designer.vb @@ -0,0 +1,466 @@ + _ +Partial Class PokedexDataEditor + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.ListBox1 = New System.Windows.Forms.ListBox() + Me.GroupBox6 = New System.Windows.Forms.GroupBox() + Me.Button4 = New System.Windows.Forms.Button() + Me.Description2 = New System.Windows.Forms.TextBox() + Me.Description1 = New System.Windows.Forms.TextBox() + Me.Button1 = New System.Windows.Forms.Button() + Me.Pointer2 = New System.Windows.Forms.TextBox() + Me.Pointer1 = New System.Windows.Forms.TextBox() + Me.Label6 = New System.Windows.Forms.Label() + Me.GroupBox3 = New System.Windows.Forms.GroupBox() + Me.Label11 = New System.Windows.Forms.Label() + Me.Label10 = New System.Windows.Forms.Label() + Me.Offset_2 = New System.Windows.Forms.TextBox() + Me.Label9 = New System.Windows.Forms.Label() + Me.Scale2 = New System.Windows.Forms.TextBox() + Me.Scale1 = New System.Windows.Forms.TextBox() + Me.Label8 = New System.Windows.Forms.Label() + Me.Label7 = New System.Windows.Forms.Label() + Me.GroupBox2 = New System.Windows.Forms.GroupBox() + Me.Label19 = New System.Windows.Forms.Label() + Me.Label18 = New System.Windows.Forms.Label() + Me.Label17 = New System.Windows.Forms.Label() + Me.Label16 = New System.Windows.Forms.Label() + Me.Label15 = New System.Windows.Forms.Label() + Me.Label14 = New System.Windows.Forms.Label() + Me.Label13 = New System.Windows.Forms.Label() + Me.Label12 = New System.Windows.Forms.Label() + Me.Wght = New System.Windows.Forms.TextBox() + Me.Hght = New System.Windows.Forms.TextBox() + Me.Label5 = New System.Windows.Forms.Label() + Me.Label4 = New System.Windows.Forms.Label() + Me.Type1 = New System.Windows.Forms.TextBox() + Me.Label3 = New System.Windows.Forms.Label() + Me.Button3 = New System.Windows.Forms.Button() + Me.Offset_1 = New System.Windows.Forms.TextBox() + Me.GroupBox1.SuspendLayout() + Me.GroupBox6.SuspendLayout() + Me.GroupBox3.SuspendLayout() + Me.GroupBox2.SuspendLayout() + Me.SuspendLayout() + ' + 'GroupBox1 + ' + Me.GroupBox1.Controls.Add(Me.ListBox1) + Me.GroupBox1.Controls.Add(Me.Type1) + Me.GroupBox1.Controls.Add(Me.Label3) + Me.GroupBox1.Location = New System.Drawing.Point(12, 12) + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.Size = New System.Drawing.Size(204, 216) + Me.GroupBox1.TabIndex = 0 + Me.GroupBox1.TabStop = False + Me.GroupBox1.Text = "Pokedex Slots" + ' + 'ListBox1 + ' + Me.ListBox1.FormattingEnabled = True + Me.ListBox1.Location = New System.Drawing.Point(20, 19) + Me.ListBox1.Name = "ListBox1" + Me.ListBox1.Size = New System.Drawing.Size(164, 147) + Me.ListBox1.TabIndex = 0 + ' + 'GroupBox6 + ' + Me.GroupBox6.Controls.Add(Me.Button4) + Me.GroupBox6.Controls.Add(Me.Description2) + Me.GroupBox6.Controls.Add(Me.Description1) + Me.GroupBox6.Controls.Add(Me.Button1) + Me.GroupBox6.Controls.Add(Me.Pointer2) + Me.GroupBox6.Controls.Add(Me.Pointer1) + Me.GroupBox6.Controls.Add(Me.Label6) + Me.GroupBox6.Location = New System.Drawing.Point(237, 170) + Me.GroupBox6.Name = "GroupBox6" + Me.GroupBox6.Size = New System.Drawing.Size(348, 157) + Me.GroupBox6.TabIndex = 17 + Me.GroupBox6.TabStop = False + ' + 'Button4 + ' + Me.Button4.Location = New System.Drawing.Point(9, 123) + Me.Button4.Name = "Button4" + Me.Button4.Size = New System.Drawing.Size(95, 24) + Me.Button4.TabIndex = 6 + Me.Button4.Text = "Save" + Me.Button4.UseVisualStyleBackColor = True + ' + 'Description2 + ' + Me.Description2.Location = New System.Drawing.Point(110, 86) + Me.Description2.Multiline = True + Me.Description2.Name = "Description2" + Me.Description2.ScrollBars = System.Windows.Forms.ScrollBars.Both + Me.Description2.Size = New System.Drawing.Size(217, 61) + Me.Description2.TabIndex = 5 + Me.Description2.WordWrap = False + ' + 'Description1 + ' + Me.Description1.Location = New System.Drawing.Point(110, 19) + Me.Description1.Multiline = True + Me.Description1.Name = "Description1" + Me.Description1.ScrollBars = System.Windows.Forms.ScrollBars.Both + Me.Description1.Size = New System.Drawing.Size(217, 61) + Me.Description1.TabIndex = 4 + Me.Description1.WordWrap = False + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(9, 93) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(95, 24) + Me.Button1.TabIndex = 3 + Me.Button1.Text = "Repoint" + Me.Button1.UseVisualStyleBackColor = True + ' + 'Pointer2 + ' + Me.Pointer2.Location = New System.Drawing.Point(11, 67) + Me.Pointer2.Name = "Pointer2" + Me.Pointer2.Size = New System.Drawing.Size(93, 20) + Me.Pointer2.TabIndex = 2 + ' + 'Pointer1 + ' + Me.Pointer1.Location = New System.Drawing.Point(11, 41) + Me.Pointer1.Name = "Pointer1" + Me.Pointer1.Size = New System.Drawing.Size(93, 20) + Me.Pointer1.TabIndex = 1 + ' + 'Label6 + ' + Me.Label6.AutoSize = True + Me.Label6.Location = New System.Drawing.Point(8, 19) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(48, 13) + Me.Label6.TabIndex = 0 + Me.Label6.Text = "Pointers:" + ' + 'GroupBox3 + ' + Me.GroupBox3.Controls.Add(Me.Offset_1) + Me.GroupBox3.Controls.Add(Me.Label11) + Me.GroupBox3.Controls.Add(Me.Label10) + Me.GroupBox3.Controls.Add(Me.Offset_2) + Me.GroupBox3.Controls.Add(Me.Label9) + Me.GroupBox3.Controls.Add(Me.Scale2) + Me.GroupBox3.Controls.Add(Me.Scale1) + Me.GroupBox3.Controls.Add(Me.Label8) + Me.GroupBox3.Controls.Add(Me.Label7) + Me.GroupBox3.Location = New System.Drawing.Point(421, 12) + Me.GroupBox3.Name = "GroupBox3" + Me.GroupBox3.Size = New System.Drawing.Size(164, 142) + Me.GroupBox3.TabIndex = 16 + Me.GroupBox3.TabStop = False + Me.GroupBox3.Text = "Size Comparison" + ' + 'Label11 + ' + Me.Label11.AutoSize = True + Me.Label11.Location = New System.Drawing.Point(4, 92) + Me.Label11.Name = "Label11" + Me.Label11.Size = New System.Drawing.Size(38, 13) + Me.Label11.TabIndex = 8 + Me.Label11.Text = "Offset:" + ' + 'Label10 + ' + Me.Label10.AutoSize = True + Me.Label10.Location = New System.Drawing.Point(4, 47) + Me.Label10.Name = "Label10" + Me.Label10.Size = New System.Drawing.Size(37, 13) + Me.Label10.TabIndex = 7 + Me.Label10.Text = "Scale:" + ' + 'Offset_2 + ' + Me.Offset_2.Location = New System.Drawing.Point(120, 92) + Me.Offset_2.Name = "Offset_2" + Me.Offset_2.Size = New System.Drawing.Size(38, 20) + Me.Offset_2.TabIndex = 6 + ' + 'Label9 + ' + Me.Label9.AutoSize = True + Me.Label9.Location = New System.Drawing.Point(85, 76) + Me.Label9.Name = "Label9" + Me.Label9.Size = New System.Drawing.Size(42, 13) + Me.Label9.TabIndex = 4 + Me.Label9.Text = "Against" + ' + 'Scale2 + ' + Me.Scale2.Location = New System.Drawing.Point(120, 47) + Me.Scale2.Name = "Scale2" + Me.Scale2.Size = New System.Drawing.Size(38, 20) + Me.Scale2.TabIndex = 3 + ' + 'Scale1 + ' + Me.Scale1.Location = New System.Drawing.Point(55, 45) + Me.Scale1.Name = "Scale1" + Me.Scale1.Size = New System.Drawing.Size(39, 20) + Me.Scale1.TabIndex = 2 + ' + 'Label8 + ' + Me.Label8.AutoSize = True + Me.Label8.Location = New System.Drawing.Point(117, 29) + Me.Label8.Name = "Label8" + Me.Label8.Size = New System.Drawing.Size(40, 13) + Me.Label8.TabIndex = 1 + Me.Label8.Text = "Trainer" + ' + 'Label7 + ' + Me.Label7.AutoSize = True + Me.Label7.Location = New System.Drawing.Point(52, 29) + Me.Label7.Name = "Label7" + Me.Label7.Size = New System.Drawing.Size(52, 13) + Me.Label7.TabIndex = 0 + Me.Label7.Text = "Pokémon" + ' + 'GroupBox2 + ' + Me.GroupBox2.Controls.Add(Me.Label19) + Me.GroupBox2.Controls.Add(Me.Label18) + Me.GroupBox2.Controls.Add(Me.Label17) + Me.GroupBox2.Controls.Add(Me.Label16) + Me.GroupBox2.Controls.Add(Me.Label15) + Me.GroupBox2.Controls.Add(Me.Label14) + Me.GroupBox2.Controls.Add(Me.Label13) + Me.GroupBox2.Controls.Add(Me.Label12) + Me.GroupBox2.Controls.Add(Me.Wght) + Me.GroupBox2.Controls.Add(Me.Hght) + Me.GroupBox2.Controls.Add(Me.Label5) + Me.GroupBox2.Controls.Add(Me.Label4) + Me.GroupBox2.Location = New System.Drawing.Point(237, 12) + Me.GroupBox2.Name = "GroupBox2" + Me.GroupBox2.Size = New System.Drawing.Size(164, 142) + Me.GroupBox2.TabIndex = 15 + Me.GroupBox2.TabStop = False + ' + 'Label19 + ' + Me.Label19.AutoSize = True + Me.Label19.Location = New System.Drawing.Point(77, 113) + Me.Label19.Name = "Label19" + Me.Label19.Size = New System.Drawing.Size(25, 13) + Me.Label19.TabIndex = 13 + Me.Label19.Text = " " + ' + 'Label18 + ' + Me.Label18.AutoSize = True + Me.Label18.Location = New System.Drawing.Point(77, 98) + Me.Label18.Name = "Label18" + Me.Label18.Size = New System.Drawing.Size(28, 13) + Me.Label18.TabIndex = 12 + Me.Label18.Text = " " + ' + 'Label17 + ' + Me.Label17.AutoSize = True + Me.Label17.Location = New System.Drawing.Point(77, 54) + Me.Label17.Name = "Label17" + Me.Label17.Size = New System.Drawing.Size(28, 13) + Me.Label17.TabIndex = 11 + Me.Label17.Text = " " + ' + 'Label16 + ' + Me.Label16.AutoSize = True + Me.Label16.Location = New System.Drawing.Point(77, 39) + Me.Label16.Name = "Label16" + Me.Label16.Size = New System.Drawing.Size(22, 13) + Me.Label16.TabIndex = 10 + Me.Label16.Text = " " + ' + 'Label15 + ' + Me.Label15.AutoSize = True + Me.Label15.Location = New System.Drawing.Point(13, 113) + Me.Label15.Name = "Label15" + Me.Label15.Size = New System.Drawing.Size(46, 13) + Me.Label15.TabIndex = 9 + Me.Label15.Text = "Pounds:" + ' + 'Label14 + ' + Me.Label14.AutoSize = True + Me.Label14.Location = New System.Drawing.Point(13, 99) + Me.Label14.Name = "Label14" + Me.Label14.Size = New System.Drawing.Size(55, 13) + Me.Label14.TabIndex = 8 + Me.Label14.Text = "Kilograms:" + ' + 'Label13 + ' + Me.Label13.AutoSize = True + Me.Label13.Location = New System.Drawing.Point(13, 54) + Me.Label13.Name = "Label13" + Me.Label13.Size = New System.Drawing.Size(31, 13) + Me.Label13.TabIndex = 7 + Me.Label13.Text = "Feet:" + ' + 'Label12 + ' + Me.Label12.AutoSize = True + Me.Label12.Location = New System.Drawing.Point(13, 39) + Me.Label12.Name = "Label12" + Me.Label12.Size = New System.Drawing.Size(42, 13) + Me.Label12.TabIndex = 6 + Me.Label12.Text = "Meters:" + ' + 'Wght + ' + Me.Wght.Location = New System.Drawing.Point(77, 75) + Me.Wght.Name = "Wght" + Me.Wght.Size = New System.Drawing.Size(42, 20) + Me.Wght.TabIndex = 5 + ' + 'Hght + ' + Me.Hght.Location = New System.Drawing.Point(77, 16) + Me.Hght.Name = "Hght" + Me.Hght.Size = New System.Drawing.Size(42, 20) + Me.Hght.TabIndex = 4 + ' + 'Label5 + ' + Me.Label5.AutoSize = True + Me.Label5.Location = New System.Drawing.Point(12, 78) + Me.Label5.Name = "Label5" + Me.Label5.Size = New System.Drawing.Size(44, 13) + Me.Label5.TabIndex = 2 + Me.Label5.Text = "Weight:" + ' + 'Label4 + ' + Me.Label4.AutoSize = True + Me.Label4.Location = New System.Drawing.Point(13, 16) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(41, 13) + Me.Label4.TabIndex = 1 + Me.Label4.Text = "Height:" + ' + 'Type1 + ' + Me.Type1.Location = New System.Drawing.Point(57, 180) + Me.Type1.MaxLength = 11 + Me.Type1.Name = "Type1" + Me.Type1.Size = New System.Drawing.Size(127, 20) + Me.Type1.TabIndex = 14 + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.Location = New System.Drawing.Point(17, 180) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(34, 13) + Me.Label3.TabIndex = 13 + Me.Label3.Text = "Type:" + ' + 'Button3 + ' + Me.Button3.Location = New System.Drawing.Point(12, 237) + Me.Button3.Name = "Button3" + Me.Button3.Size = New System.Drawing.Size(95, 33) + Me.Button3.TabIndex = 18 + Me.Button3.Text = "Save" + Me.Button3.UseVisualStyleBackColor = True + ' + 'Offset_1 + ' + Me.Offset_1.Location = New System.Drawing.Point(55, 92) + Me.Offset_1.Name = "Offset_1" + Me.Offset_1.Size = New System.Drawing.Size(38, 20) + Me.Offset_1.TabIndex = 9 + ' + 'PokedexDataEditor + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(597, 347) + Me.Controls.Add(Me.Button3) + Me.Controls.Add(Me.GroupBox6) + Me.Controls.Add(Me.GroupBox3) + Me.Controls.Add(Me.GroupBox2) + Me.Controls.Add(Me.GroupBox1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle + Me.MaximizeBox = False + Me.Name = "PokedexDataEditor" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Pokedex Data Editor" + Me.GroupBox1.ResumeLayout(False) + Me.GroupBox1.PerformLayout() + Me.GroupBox6.ResumeLayout(False) + Me.GroupBox6.PerformLayout() + Me.GroupBox3.ResumeLayout(False) + Me.GroupBox3.PerformLayout() + Me.GroupBox2.ResumeLayout(False) + Me.GroupBox2.PerformLayout() + Me.ResumeLayout(False) + + End Sub + Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox + Friend WithEvents ListBox1 As System.Windows.Forms.ListBox + Friend WithEvents Type1 As System.Windows.Forms.TextBox + Friend WithEvents Label3 As System.Windows.Forms.Label + Friend WithEvents GroupBox6 As System.Windows.Forms.GroupBox + Friend WithEvents Button4 As System.Windows.Forms.Button + Friend WithEvents Description2 As System.Windows.Forms.TextBox + Friend WithEvents Description1 As System.Windows.Forms.TextBox + Friend WithEvents Button1 As System.Windows.Forms.Button + Friend WithEvents Pointer2 As System.Windows.Forms.TextBox + Friend WithEvents Pointer1 As System.Windows.Forms.TextBox + Friend WithEvents Label6 As System.Windows.Forms.Label + Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox + Friend WithEvents Label11 As System.Windows.Forms.Label + Friend WithEvents Label10 As System.Windows.Forms.Label + Friend WithEvents Offset_2 As System.Windows.Forms.TextBox + Friend WithEvents Label9 As System.Windows.Forms.Label + Friend WithEvents Scale2 As System.Windows.Forms.TextBox + Friend WithEvents Scale1 As System.Windows.Forms.TextBox + Friend WithEvents Label8 As System.Windows.Forms.Label + Friend WithEvents Label7 As System.Windows.Forms.Label + Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox + Friend WithEvents Label19 As System.Windows.Forms.Label + Friend WithEvents Label18 As System.Windows.Forms.Label + Friend WithEvents Label17 As System.Windows.Forms.Label + Friend WithEvents Label16 As System.Windows.Forms.Label + Friend WithEvents Label15 As System.Windows.Forms.Label + Friend WithEvents Label14 As System.Windows.Forms.Label + Friend WithEvents Label13 As System.Windows.Forms.Label + Friend WithEvents Label12 As System.Windows.Forms.Label + Friend WithEvents Wght As System.Windows.Forms.TextBox + Friend WithEvents Hght As System.Windows.Forms.TextBox + Friend WithEvents Label5 As System.Windows.Forms.Label + Friend WithEvents Label4 As System.Windows.Forms.Label + Friend WithEvents Button3 As System.Windows.Forms.Button + Friend WithEvents Offset_1 As System.Windows.Forms.TextBox +End Class diff --git a/GBAPokemonGameEditor/PokedexDataEditor.resx b/GBAPokemonGameEditor/PokedexDataEditor.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/GBAPokemonGameEditor/PokedexDataEditor.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GBAPokemonGameEditor/PokedexDataEditor.vb b/GBAPokemonGameEditor/PokedexDataEditor.vb new file mode 100644 index 0000000..3c481a7 --- /dev/null +++ b/GBAPokemonGameEditor/PokedexDataEditor.vb @@ -0,0 +1,101 @@ +Option Strict Off +Option Explicit Off +Imports VB = Microsoft.VisualBasic +Public Class PokedexDataEditor + Dim offset1 As Integer + Private Sub PokedexDataEditor_Load(sender As Object, e As EventArgs) Handles MyBase.Load + If header2 = "BPR" Or header2 = "BPG" Or header2 = "BPE" Or header2 = "AXP" Or header2 = "AXV" Then + + + + If header2 = "AXP" Or header2 = "AXV" Then + Pointer2.Enabled = True + Description2.Enabled = True + Else + Pointer2.Enabled = False + Description2.Enabled = False + End If + + ListBox1.Items.Clear() + + offset1 = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber) + + Dim varloop As Integer = 0 + + While varloop < (GetString(AppPath & "ini\roms.ini", header, "NumberOfDexEntries", "")) + + + ListBox1.Items.Add(VB.Right("0000" & (varloop), 4) & ". " & GetPokedexTypeName(varloop)) + varloop = varloop + 1 + End While + + ListBox1.SelectedIndex = 0 + + Else + + MsgBox("Unsupported ROM! Check the ReadMe!") + 'Lets the person know the ROM isn't supported. + + Me.Close() + End If + End Sub + + Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged + + If header3 = "J" Then + + If header2 = "AXP" Or header2 = "AXV" Then + SkipVar = "36" + ElseIf header2 = "BPR" Or header2 = "BPG" Then + SkipVar = "36" + ElseIf header2 = "BPE" Then + SkipVar = "32" + End If + + Else + If header2 = "AXP" Or header2 = "AXV" Then + SkipVar = "36" + ElseIf header2 = "BPR" Or header2 = "BPG" Then + SkipVar = "36" + ElseIf header2 = "BPE" Then + SkipVar = "32" + End If + End If + + Pointer1.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, offset1 + 4 + +12 + (ListBox1.SelectedIndex * SkipVar), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000) + + Hght.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, offset1 + 12 + (ListBox1.SelectedIndex * SkipVar), 2))), System.Globalization.NumberStyles.HexNumber) + Wght.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, offset1 + 2 + 12 + (ListBox1.SelectedIndex * SkipVar), 2))), System.Globalization.NumberStyles.HexNumber) + Scale1.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, offset1 + 14 + 12 + (ListBox1.SelectedIndex * SkipVar), 2))), System.Globalization.NumberStyles.HexNumber) + Offset_1.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, offset1 + 16 + 12 + (ListBox1.SelectedIndex * SkipVar), 2))), System.Globalization.NumberStyles.HexNumber) + Scale2.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, offset1 + 18 + 12 + (ListBox1.SelectedIndex * SkipVar), 2))), System.Globalization.NumberStyles.HexNumber) + Offset_2.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, offset1 + 20 + 12 + (ListBox1.SelectedIndex * SkipVar), 2))), System.Globalization.NumberStyles.HexNumber) + + If header2 = "AXP" Or header2 = "AXV" Then + Pointer2.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, offset1 + 8 + +12 + (ListBox1.SelectedIndex * SkipVar), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000) + ElseIf header2 = "BPR" Or header2 = "BPG" Then + ElseIf header2 = "BPE" Then + End If + + Type1.Text = GetPokedexTypeName(ListBox1.SelectedIndex) + + End Sub + + Private Sub Hght_TextChanged(sender As Object, e As EventArgs) Handles Hght.TextChanged + If Val(Hght.Text) > 304 Then Hght.Text = 304 + If Val(Hght.Text) < 0 Then Hght.Text = 0 + + Label16.Text = Val(Hght.Text) / 10 + + Label17.Text = Val(Label16.Text) * 3.281 + End Sub + + Private Sub Wght_TextChanged(sender As Object, e As EventArgs) Handles Wght.TextChanged + If Val(Wght.Text) > 21474 Then Wght.Text = 21474 + If Val(Wght.Text) < 0 Then Wght.Text = 0 + + Label18.Text = Val(Wght.Text) / 10 + + Label19.Text = Val(Label18.Text) * 2.2 + End Sub +End Class \ No newline at end of file diff --git a/GBAPokemonGameEditor/RSEStarterEditor.vb b/GBAPokemonGameEditor/RSEStarterEditor.vb index a942281..0f330f0 100644 --- a/GBAPokemonGameEditor/RSEStarterEditor.vb +++ b/GBAPokemonGameEditor/RSEStarterEditor.vb @@ -71,6 +71,9 @@ Public Class RSEStarterEditor StarterLevel.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), 1))), System.Globalization.NumberStyles.HexNumber) Else MsgBox("Not supported. Use a script editor.") + + + Me.Close() End If End Sub diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application index 6c6b625..2f8c534 100644 --- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application +++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application @@ -16,7 +16,7 @@ - PBVdztOSBacTyAIthjD8ZDnzmKg= + NnV1KXGO/MRb4YcM1KJqNh98rfw= diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest index c97f25a..0bcd618 100644 --- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest +++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest @@ -43,14 +43,14 @@ - + - BYLz4nuObwJqzCKwHT/R9xu0fiE= + 5zIhH9s3/ZhHe64fdpEgfeicFUo= diff --git a/GBAPokemonGameEditor/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/GBAPokemonGameEditor/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache index 68b40d5..6c3a238 100644 Binary files a/GBAPokemonGameEditor/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache and b/GBAPokemonGameEditor/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/GBAPokemonGameEditor/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/GBAPokemonGameEditor/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache index d12d9a7..6e5354c 100644 Binary files a/GBAPokemonGameEditor/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/GBAPokemonGameEditor/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ