diff --git a/.vs/GBAPokemonGameEditor/v14/.suo b/.vs/GBAPokemonGameEditor/v14/.suo index da83349..ce6c524 100644 Binary files a/.vs/GBAPokemonGameEditor/v14/.suo and b/.vs/GBAPokemonGameEditor/v14/.suo differ diff --git a/GBAPokemonGameEditor/ItemEditor.Designer.vb b/GBAPokemonGameEditor/ItemEditor.Designer.vb index c4351fb..30aa3df 100644 --- a/GBAPokemonGameEditor/ItemEditor.Designer.vb +++ b/GBAPokemonGameEditor/ItemEditor.Designer.vb @@ -31,15 +31,33 @@ Partial Class ItemEditor Me.IndexTextBox = New System.Windows.Forms.TextBox() Me.PriceTextBox = New System.Windows.Forms.TextBox() Me.GroupBox2 = New System.Windows.Forms.GroupBox() - Me.ItemImagePictureBox = New System.Windows.Forms.PictureBox() - Me.Label3 = New System.Windows.Forms.Label() - Me.ItmImgPntrTextBox = New System.Windows.Forms.TextBox() - Me.Label4 = New System.Windows.Forms.Label() - Me.ItmPlPntrTextBox = New System.Windows.Forms.TextBox() Me.ItmRpntBttn = New System.Windows.Forms.Button() + Me.ItmPlPntrTextBox = New System.Windows.Forms.TextBox() + Me.Label4 = New System.Windows.Forms.Label() + Me.ItmImgPntrTextBox = New System.Windows.Forms.TextBox() + Me.Label3 = New System.Windows.Forms.Label() + Me.ItemImagePictureBox = New System.Windows.Forms.PictureBox() + Me.DscrpRpntBttn = New System.Windows.Forms.Button() + Me.Label10 = New System.Windows.Forms.Label() + Me.DsrptnTextBox = New System.Windows.Forms.TextBox() + Me.DescribPointTextBox = New System.Windows.Forms.TextBox() + Me.GroupBox3 = New System.Windows.Forms.GroupBox() + Me.Label5 = New System.Windows.Forms.Label() + Me.HoldEffectTextBox = New System.Windows.Forms.TextBox() + Me.Label6 = New System.Windows.Forms.Label() + Me.ValueTextBox = New System.Windows.Forms.TextBox() + Me.Label7 = New System.Windows.Forms.Label() + Me.MysteryValue2TextBox = New System.Windows.Forms.TextBox() + Me.MysteryValue1TextBox = New System.Windows.Forms.TextBox() + Me.Label8 = New System.Windows.Forms.Label() + Me.PocketComboBox = New System.Windows.Forms.ComboBox() + Me.TypeTextBox = New System.Windows.Forms.TextBox() + Me.Label9 = New System.Windows.Forms.Label() + Me.Label11 = New System.Windows.Forms.Label() Me.GroupBox1.SuspendLayout() Me.GroupBox2.SuspendLayout() CType(Me.ItemImagePictureBox, System.ComponentModel.ISupportInitialize).BeginInit() + Me.GroupBox3.SuspendLayout() Me.SuspendLayout() ' 'GroupBox1 @@ -72,7 +90,7 @@ Partial Class ItemEditor ' 'SaveBttn ' - Me.SaveBttn.Location = New System.Drawing.Point(42, 92) + Me.SaveBttn.Location = New System.Drawing.Point(30, 268) Me.SaveBttn.Name = "SaveBttn" Me.SaveBttn.Size = New System.Drawing.Size(95, 33) Me.SaveBttn.TabIndex = 1 @@ -82,7 +100,7 @@ Partial Class ItemEditor 'Label1 ' Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(318, 12) + Me.Label1.Location = New System.Drawing.Point(183, 185) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(36, 13) Me.Label1.TabIndex = 2 @@ -91,7 +109,7 @@ Partial Class ItemEditor 'Label2 ' Me.Label2.AutoSize = True - Me.Label2.Location = New System.Drawing.Point(320, 39) + Me.Label2.Location = New System.Drawing.Point(183, 210) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(34, 13) Me.Label2.TabIndex = 3 @@ -99,14 +117,14 @@ Partial Class ItemEditor ' 'IndexTextBox ' - Me.IndexTextBox.Location = New System.Drawing.Point(360, 9) + Me.IndexTextBox.Location = New System.Drawing.Point(248, 182) Me.IndexTextBox.Name = "IndexTextBox" - Me.IndexTextBox.Size = New System.Drawing.Size(42, 20) + Me.IndexTextBox.Size = New System.Drawing.Size(40, 20) Me.IndexTextBox.TabIndex = 4 ' 'PriceTextBox ' - Me.PriceTextBox.Location = New System.Drawing.Point(360, 36) + Me.PriceTextBox.Location = New System.Drawing.Point(248, 207) Me.PriceTextBox.Name = "PriceTextBox" Me.PriceTextBox.Size = New System.Drawing.Size(40, 20) Me.PriceTextBox.TabIndex = 5 @@ -119,53 +137,13 @@ Partial Class ItemEditor Me.GroupBox2.Controls.Add(Me.ItmImgPntrTextBox) Me.GroupBox2.Controls.Add(Me.Label3) Me.GroupBox2.Controls.Add(Me.ItemImagePictureBox) - Me.GroupBox2.Location = New System.Drawing.Point(168, 12) + Me.GroupBox2.Location = New System.Drawing.Point(12, 100) Me.GroupBox2.Name = "GroupBox2" Me.GroupBox2.Size = New System.Drawing.Size(134, 153) Me.GroupBox2.TabIndex = 6 Me.GroupBox2.TabStop = False Me.GroupBox2.Text = "Item Image:" ' - 'ItemImagePictureBox - ' - Me.ItemImagePictureBox.Location = New System.Drawing.Point(62, 109) - Me.ItemImagePictureBox.Name = "ItemImagePictureBox" - Me.ItemImagePictureBox.Size = New System.Drawing.Size(32, 32) - Me.ItemImagePictureBox.TabIndex = 0 - Me.ItemImagePictureBox.TabStop = False - ' - 'Label3 - ' - Me.Label3.AutoSize = True - Me.Label3.Location = New System.Drawing.Point(17, 22) - Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(39, 13) - Me.Label3.TabIndex = 1 - Me.Label3.Text = "Image:" - ' - 'ItmImgPntrTextBox - ' - Me.ItmImgPntrTextBox.Location = New System.Drawing.Point(62, 16) - Me.ItmImgPntrTextBox.Name = "ItmImgPntrTextBox" - Me.ItmImgPntrTextBox.Size = New System.Drawing.Size(57, 20) - Me.ItmImgPntrTextBox.TabIndex = 2 - ' - 'Label4 - ' - Me.Label4.AutoSize = True - Me.Label4.Location = New System.Drawing.Point(17, 49) - Me.Label4.Name = "Label4" - Me.Label4.Size = New System.Drawing.Size(25, 13) - Me.Label4.TabIndex = 3 - Me.Label4.Text = "Pal:" - ' - 'ItmPlPntrTextBox - ' - Me.ItmPlPntrTextBox.Location = New System.Drawing.Point(62, 46) - Me.ItmPlPntrTextBox.Name = "ItmPlPntrTextBox" - Me.ItmPlPntrTextBox.Size = New System.Drawing.Size(57, 20) - Me.ItmPlPntrTextBox.TabIndex = 4 - ' 'ItmRpntBttn ' Me.ItmRpntBttn.Location = New System.Drawing.Point(20, 80) @@ -175,11 +153,210 @@ Partial Class ItemEditor Me.ItmRpntBttn.Text = "Repoint" Me.ItmRpntBttn.UseVisualStyleBackColor = True ' + 'ItmPlPntrTextBox + ' + Me.ItmPlPntrTextBox.Location = New System.Drawing.Point(62, 46) + Me.ItmPlPntrTextBox.Name = "ItmPlPntrTextBox" + Me.ItmPlPntrTextBox.Size = New System.Drawing.Size(57, 20) + Me.ItmPlPntrTextBox.TabIndex = 4 + ' + 'Label4 + ' + Me.Label4.AutoSize = True + Me.Label4.Location = New System.Drawing.Point(17, 49) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(25, 13) + Me.Label4.TabIndex = 3 + Me.Label4.Text = "Pal:" + ' + 'ItmImgPntrTextBox + ' + Me.ItmImgPntrTextBox.Location = New System.Drawing.Point(62, 16) + Me.ItmImgPntrTextBox.Name = "ItmImgPntrTextBox" + Me.ItmImgPntrTextBox.Size = New System.Drawing.Size(57, 20) + Me.ItmImgPntrTextBox.TabIndex = 2 + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.Location = New System.Drawing.Point(17, 22) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(39, 13) + Me.Label3.TabIndex = 1 + Me.Label3.Text = "Image:" + ' + 'ItemImagePictureBox + ' + Me.ItemImagePictureBox.Location = New System.Drawing.Point(62, 109) + Me.ItemImagePictureBox.Name = "ItemImagePictureBox" + Me.ItemImagePictureBox.Size = New System.Drawing.Size(32, 32) + Me.ItemImagePictureBox.TabIndex = 0 + Me.ItemImagePictureBox.TabStop = False + ' + 'DscrpRpntBttn + ' + Me.DscrpRpntBttn.Location = New System.Drawing.Point(104, 19) + Me.DscrpRpntBttn.Name = "DscrpRpntBttn" + Me.DscrpRpntBttn.Size = New System.Drawing.Size(67, 20) + Me.DscrpRpntBttn.TabIndex = 31 + Me.DscrpRpntBttn.Text = "Repoint" + Me.DscrpRpntBttn.UseVisualStyleBackColor = True + ' + 'Label10 + ' + Me.Label10.AutoSize = True + Me.Label10.Location = New System.Drawing.Point(12, 49) + Me.Label10.Name = "Label10" + Me.Label10.Size = New System.Drawing.Size(63, 13) + Me.Label10.TabIndex = 30 + Me.Label10.Text = "Description:" + ' + 'DsrptnTextBox + ' + Me.DsrptnTextBox.Location = New System.Drawing.Point(15, 72) + Me.DsrptnTextBox.Multiline = True + Me.DsrptnTextBox.Name = "DsrptnTextBox" + Me.DsrptnTextBox.ReadOnly = True + Me.DsrptnTextBox.Size = New System.Drawing.Size(147, 74) + Me.DsrptnTextBox.TabIndex = 29 + ' + 'DescribPointTextBox + ' + Me.DescribPointTextBox.Location = New System.Drawing.Point(15, 19) + Me.DescribPointTextBox.Name = "DescribPointTextBox" + Me.DescribPointTextBox.Size = New System.Drawing.Size(83, 20) + Me.DescribPointTextBox.TabIndex = 28 + ' + 'GroupBox3 + ' + Me.GroupBox3.Controls.Add(Me.DescribPointTextBox) + Me.GroupBox3.Controls.Add(Me.DscrpRpntBttn) + Me.GroupBox3.Controls.Add(Me.DsrptnTextBox) + Me.GroupBox3.Controls.Add(Me.Label10) + Me.GroupBox3.Location = New System.Drawing.Point(168, 12) + Me.GroupBox3.Name = "GroupBox3" + Me.GroupBox3.Size = New System.Drawing.Size(188, 153) + Me.GroupBox3.TabIndex = 32 + Me.GroupBox3.TabStop = False + Me.GroupBox3.Text = "Description Pointer:" + ' + 'Label5 + ' + Me.Label5.AutoSize = True + Me.Label5.Location = New System.Drawing.Point(180, 236) + Me.Label5.Name = "Label5" + Me.Label5.Size = New System.Drawing.Size(63, 13) + Me.Label5.TabIndex = 33 + Me.Label5.Text = "Hold Effect:" + ' + 'HoldEffectTextBox + ' + Me.HoldEffectTextBox.Location = New System.Drawing.Point(248, 233) + Me.HoldEffectTextBox.Name = "HoldEffectTextBox" + Me.HoldEffectTextBox.Size = New System.Drawing.Size(40, 20) + Me.HoldEffectTextBox.TabIndex = 34 + ' + 'Label6 + ' + Me.Label6.AutoSize = True + Me.Label6.Location = New System.Drawing.Point(180, 262) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(37, 13) + Me.Label6.TabIndex = 35 + Me.Label6.Text = "Value:" + ' + 'ValueTextBox + ' + Me.ValueTextBox.Location = New System.Drawing.Point(248, 259) + Me.ValueTextBox.Name = "ValueTextBox" + Me.ValueTextBox.Size = New System.Drawing.Size(40, 20) + Me.ValueTextBox.TabIndex = 36 + ' + 'Label7 + ' + Me.Label7.AutoSize = True + Me.Label7.Location = New System.Drawing.Point(300, 185) + Me.Label7.Name = "Label7" + Me.Label7.Size = New System.Drawing.Size(78, 13) + Me.Label7.TabIndex = 37 + Me.Label7.Text = "KeyItem Value:" + ' + 'MysteryValue2TextBox + ' + Me.MysteryValue2TextBox.Location = New System.Drawing.Point(396, 207) + Me.MysteryValue2TextBox.Name = "MysteryValue2TextBox" + Me.MysteryValue2TextBox.Size = New System.Drawing.Size(40, 20) + Me.MysteryValue2TextBox.TabIndex = 39 + ' + 'MysteryValue1TextBox + ' + Me.MysteryValue1TextBox.Location = New System.Drawing.Point(396, 182) + Me.MysteryValue1TextBox.Name = "MysteryValue1TextBox" + Me.MysteryValue1TextBox.Size = New System.Drawing.Size(40, 20) + Me.MysteryValue1TextBox.TabIndex = 38 + ' + 'Label8 + ' + Me.Label8.AutoSize = True + Me.Label8.Location = New System.Drawing.Point(300, 236) + Me.Label8.Name = "Label8" + Me.Label8.Size = New System.Drawing.Size(44, 13) + Me.Label8.TabIndex = 40 + Me.Label8.Text = "Pocket:" + ' + 'PocketComboBox + ' + Me.PocketComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.PocketComboBox.FormattingEnabled = True + Me.PocketComboBox.Items.AddRange(New Object() {"???", "Items", "Poke Balls", "TM/HM's", "Berries", "Key Items"}) + Me.PocketComboBox.Location = New System.Drawing.Point(396, 233) + Me.PocketComboBox.Name = "PocketComboBox" + Me.PocketComboBox.Size = New System.Drawing.Size(82, 21) + Me.PocketComboBox.TabIndex = 41 + ' + 'TypeTextBox + ' + Me.TypeTextBox.Location = New System.Drawing.Point(396, 259) + Me.TypeTextBox.Name = "TypeTextBox" + Me.TypeTextBox.Size = New System.Drawing.Size(40, 20) + Me.TypeTextBox.TabIndex = 43 + ' + 'Label9 + ' + Me.Label9.AutoSize = True + Me.Label9.Location = New System.Drawing.Point(300, 259) + Me.Label9.Name = "Label9" + Me.Label9.Size = New System.Drawing.Size(34, 13) + Me.Label9.TabIndex = 42 + Me.Label9.Text = "Type:" + ' + 'Label11 + ' + Me.Label11.AutoSize = True + Me.Label11.Location = New System.Drawing.Point(300, 210) + Me.Label11.Name = "Label11" + Me.Label11.Size = New System.Drawing.Size(69, 13) + Me.Label11.TabIndex = 44 + Me.Label11.Text = "Bag Keyitem:" + ' 'ItemEditor ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(418, 202) + Me.ClientSize = New System.Drawing.Size(496, 318) + Me.Controls.Add(Me.Label11) + Me.Controls.Add(Me.TypeTextBox) + Me.Controls.Add(Me.Label9) + Me.Controls.Add(Me.PocketComboBox) + Me.Controls.Add(Me.Label8) + Me.Controls.Add(Me.MysteryValue2TextBox) + Me.Controls.Add(Me.MysteryValue1TextBox) + Me.Controls.Add(Me.Label7) + Me.Controls.Add(Me.ValueTextBox) + Me.Controls.Add(Me.Label6) + Me.Controls.Add(Me.HoldEffectTextBox) + Me.Controls.Add(Me.Label5) + Me.Controls.Add(Me.GroupBox3) Me.Controls.Add(Me.GroupBox2) Me.Controls.Add(Me.PriceTextBox) Me.Controls.Add(Me.IndexTextBox) @@ -197,6 +374,8 @@ Partial Class ItemEditor Me.GroupBox2.ResumeLayout(False) Me.GroupBox2.PerformLayout() CType(Me.ItemImagePictureBox, System.ComponentModel.ISupportInitialize).EndInit() + Me.GroupBox3.ResumeLayout(False) + Me.GroupBox3.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -217,4 +396,21 @@ Partial Class ItemEditor Friend WithEvents Label4 As Label Friend WithEvents ItmImgPntrTextBox As TextBox Friend WithEvents Label3 As Label + Friend WithEvents DscrpRpntBttn As Button + Friend WithEvents Label10 As Label + Friend WithEvents DsrptnTextBox As TextBox + Friend WithEvents DescribPointTextBox As TextBox + Friend WithEvents GroupBox3 As GroupBox + Friend WithEvents Label5 As Label + Friend WithEvents HoldEffectTextBox As TextBox + Friend WithEvents Label6 As Label + Friend WithEvents ValueTextBox As TextBox + Friend WithEvents Label7 As Label + Friend WithEvents MysteryValue2TextBox As TextBox + Friend WithEvents MysteryValue1TextBox As TextBox + Friend WithEvents Label8 As Label + Friend WithEvents PocketComboBox As ComboBox + Friend WithEvents TypeTextBox As TextBox + Friend WithEvents Label9 As Label + Friend WithEvents Label11 As Label End Class diff --git a/GBAPokemonGameEditor/ItemEditor.vb b/GBAPokemonGameEditor/ItemEditor.vb index 1647047..6552861 100644 --- a/GBAPokemonGameEditor/ItemEditor.vb +++ b/GBAPokemonGameEditor/ItemEditor.vb @@ -8,8 +8,7 @@ Imports VB = Microsoft.VisualBasic Public Class ItemEditor Dim ItemBaseOff As Integer - Dim ItemPicOff As Integer - Dim ItemPalOff As Integer + Dim ItemPicDataOff As Integer Private Sub ItemEditor_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -19,8 +18,7 @@ Public Class ItemEditor ItmPlPntrTextBox.Enabled = True ItmRpntBttn.Enabled = True - ItemPicOff = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber) - ItemPalOff = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber) + ItemPicDataOff = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber) Else @@ -56,11 +54,32 @@ Public Class ItemEditor IndexTextBox.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 14) + (ItemListComboBox.SelectedIndex * 44), 2))), System.Globalization.NumberStyles.HexNumber) PriceTextBox.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 16) + (ItemListComboBox.SelectedIndex * 44), 2))), System.Globalization.NumberStyles.HexNumber) + HoldEffectTextBox.Text = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 18) + (ItemListComboBox.SelectedIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber) + ValueTextBox.Text = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 19) + (ItemListComboBox.SelectedIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber) + DescribPointTextBox.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((ItemBaseOff) + 20) + (ItemListComboBox.SelectedIndex * 44), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000) + MysteryValue1TextBox.Text = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 24) + (ItemListComboBox.SelectedIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber) + MysteryValue2TextBox.Text = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 25) + (ItemListComboBox.SelectedIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber) + PocketComboBox.SelectedIndex = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 26) + (ItemListComboBox.SelectedIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber) + TypeTextBox.Text = Int32.Parse((((ReadHEX(LoadedROM, ((ItemBaseOff) + 27) + (ItemListComboBox.SelectedIndex * 44), 1)))), System.Globalization.NumberStyles.HexNumber) + + FileNum = FreeFile() + FileOpen(FileNum, LoadedROM, OpenMode.Binary) + Dim ItemDescp As String = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + + FileGet(FileNum, ItemDescp, Int32.Parse(((DescribPointTextBox.Text)), System.Globalization.NumberStyles.HexNumber) + 1, True) + ItemDescp = Sapp2Asc(ItemDescp) + ItemDescp = Mid$(ItemDescp, 1, InStr(1, ItemDescp, "\x")) + ItemDescp = Replace(ItemDescp, "\n", vbCrLf) + ItemDescp = Replace(RTrim$(ItemDescp), "\", "") + DsrptnTextBox.Text = ItemDescp + DsrptnTextBox.MaxLength = Len(ItemDescp) + + FileClose(FileNum) If header2 = "BPR" Or header2 = "BPG" Or header2 = "BPE" Then - ItmImgPntrTextBox.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ItemPicOff + (ItemListComboBox.SelectedIndex * 8), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000) - ItmPlPntrTextBox.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ItemPalOff + (ItemListComboBox.SelectedIndex * 8) + 4, 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000) + ItmImgPntrTextBox.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ItemPicDataOff + (ItemListComboBox.SelectedIndex * 8), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000) + ItmPlPntrTextBox.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ItemPicDataOff + (ItemListComboBox.SelectedIndex * 8) + 4, 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000) GetAndDrawItemPic(ItemImagePictureBox, ItemListComboBox.SelectedIndex) @@ -82,7 +101,13 @@ Public Class ItemEditor WriteHEX(LoadedROM, ((ItemBaseOff) + 14) + (listvar * 44), ReverseHEX(VB.Right("0000" & Hex(IndexTextBox.Text), 4))) WriteHEX(LoadedROM, ((ItemBaseOff) + 16) + (listvar * 44), ReverseHEX(VB.Right("0000" & Hex(PriceTextBox.Text), 4))) + WriteHEX(LoadedROM, ((ItemBaseOff) + 18) + (listvar * 44), Hex(HoldEffectTextBox.Text)) + WriteHEX(LoadedROM, ((ItemBaseOff) + 19) + (listvar * 44), Hex(ValueTextBox.Text)) + WriteHEX(LoadedROM, ((ItemBaseOff) + 24) + (listvar * 44), Hex(MysteryValue1TextBox.Text)) + WriteHEX(LoadedROM, ((ItemBaseOff) + 25) + (listvar * 44), Hex(MysteryValue1TextBox.Text)) + WriteHEX(LoadedROM, ((ItemBaseOff) + 26) + (listvar * 44), Hex(PocketComboBox.SelectedIndex)) + WriteHEX(LoadedROM, ((ItemBaseOff) + 27) + (listvar * 44), Hex(TypeTextBox.Text)) If header2 = "BPR" Or header2 = "BPG" Or header2 = "BPE" Then @@ -109,10 +134,8 @@ Public Class ItemEditor Private Sub ItmRpntBttn_Click(sender As Object, e As EventArgs) Handles ItmRpntBttn.Click If header2 = "BPR" Or header2 = "BPG" Or header2 = "BPE" Then - ' MsgBox(ReverseHEX(Hex(Int32.Parse(((ItmImgPntrTextBox.Text)), System.Globalization.NumberStyles.HexNumber) + &H8000000))) - - ' WriteHEX(LoadedROM, (ItemPicOff), ReverseHEX(Hex(Int32.Parse(((ItmImgPntrTextBox.Text)), System.Globalization.NumberStyles.HexNumber) + &H8000000))) - ' WriteHEX(LoadedROM, (ItemPalOff), ReverseHEX(Hex(Int32.Parse(((ItmPlPntrTextBox.Text)), System.Globalization.NumberStyles.HexNumber) + &H8000000))) + WriteHEX(LoadedROM, (ItemPicDataOff + (ItemListComboBox.SelectedIndex * 8)), ReverseHEX(Hex(Int32.Parse(((ItmImgPntrTextBox.Text)), System.Globalization.NumberStyles.HexNumber) + &H8000000))) + WriteHEX(LoadedROM, (ItemPicDataOff + (ItemListComboBox.SelectedIndex * 8) + 4), ReverseHEX(Hex(Int32.Parse(((ItmPlPntrTextBox.Text)), System.Globalization.NumberStyles.HexNumber) + &H8000000))) GetAndDrawItemPic(ItemImagePictureBox, ItemListComboBox.SelectedIndex) @@ -120,4 +143,23 @@ Public Class ItemEditor End If End Sub + + Private Sub DscrpRpntBttn_Click(sender As Object, e As EventArgs) Handles DscrpRpntBttn.Click + + WriteHEX(LoadedROM, ((ItemBaseOff) + 20) + (ItemListComboBox.SelectedIndex * 44), ReverseHEX(Hex(Int32.Parse(((DescribPointTextBox.Text)), System.Globalization.NumberStyles.HexNumber) + &H8000000))) + + FileNum = FreeFile() + FileOpen(FileNum, LoadedROM, OpenMode.Binary) + Dim ItemDescp As String = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + + FileGet(FileNum, ItemDescp, Int32.Parse(((DescribPointTextBox.Text)), System.Globalization.NumberStyles.HexNumber) + 1, True) + ItemDescp = Sapp2Asc(ItemDescp) + ItemDescp = Mid$(ItemDescp, 1, InStr(1, ItemDescp, "\x")) + ItemDescp = Replace(ItemDescp, "\n", vbCrLf) + ItemDescp = Replace(RTrim$(ItemDescp), "\", "") + DsrptnTextBox.Text = ItemDescp + DsrptnTextBox.MaxLength = Len(ItemDescp) + + FileClose(FileNum) + End Sub End Class \ No newline at end of file diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application index dd8211e..0c0970b 100644 --- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application +++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application @@ -16,7 +16,7 @@ - rKtJFhTmQkC6xdk7fJqNUt101TI= + 8x4DI+swmrSbqwT6O0NdnKqq5qw= diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe index 7ee2ddf..3249b67 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 926f4ee..c6abaf4 100644 --- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe.manifest +++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe.manifest @@ -43,14 +43,14 @@ - + - lg5NGvUaj+WEV6aqk8NOch3ar7o= + L1pq5zFbkVS0Fu7tgnZpNH5YNaQ= diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.pdb b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.pdb index 9853189..cb038c5 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 dd8211e..0c0970b 100644 --- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application +++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application @@ -16,7 +16,7 @@ - rKtJFhTmQkC6xdk7fJqNUt101TI= + 8x4DI+swmrSbqwT6O0NdnKqq5qw= diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest index 926f4ee..c6abaf4 100644 --- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest +++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest @@ -43,14 +43,14 @@ - + - lg5NGvUaj+WEV6aqk8NOch3ar7o= + L1pq5zFbkVS0Fu7tgnZpNH5YNaQ= diff --git a/GBAPokemonGameEditor/bin/Debug/app.publish/GBAPokemonGameEditor.exe b/GBAPokemonGameEditor/bin/Debug/app.publish/GBAPokemonGameEditor.exe index 7ee2ddf..3249b67 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 dd8211e..0c0970b 100644 --- a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.application +++ b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.application @@ -16,7 +16,7 @@ - rKtJFhTmQkC6xdk7fJqNUt101TI= + 8x4DI+swmrSbqwT6O0NdnKqq5qw= diff --git a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe index 7ee2ddf..3249b67 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 926f4ee..c6abaf4 100644 --- a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe.manifest +++ b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe.manifest @@ -43,14 +43,14 @@ - + - lg5NGvUaj+WEV6aqk8NOch3ar7o= + L1pq5zFbkVS0Fu7tgnZpNH5YNaQ= diff --git a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.pdb b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.pdb index 9853189..cb038c5 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 4dbfa78..9f26cf5 100644 Binary files a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.vbproj.GenerateResource.Cache and b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.vbproj.GenerateResource.Cache differ