mirror of
https://github.com/Gamer2020/PokemonGameEditor.git
synced 2026-05-27 10:59:24 -05:00
Item Editor Started!
I have started the tem editor. I have a million things to do at once otherwise it would be done.
This commit is contained in:
parent
eeda203fe4
commit
4496acdbd5
Binary file not shown.
|
|
@ -114,6 +114,29 @@ Module ChangeNameFunctions
|
|||
ChangeAbilityName = NewName
|
||||
End Function
|
||||
|
||||
Public Function ChangeItemName(ByVal Index As Integer, ByVal NewName As String)
|
||||
Dim offvar As Long
|
||||
|
||||
offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "ItemData", "")), System.Globalization.NumberStyles.HexNumber)
|
||||
|
||||
If header3 = "J" Then
|
||||
|
||||
Else
|
||||
|
||||
FileNum = FreeFile()
|
||||
FileOpen(FileNum, LoadedROM, OpenMode.Binary)
|
||||
Dim PokeName As String = "xxxxxxxxxxxxxx"
|
||||
Dim filler As Byte = "&HFF"
|
||||
PokeName = NameAsc2Sapp(NewName)
|
||||
FilePut(FileNum, PokeName, offvar + 1 + (44 * Index))
|
||||
FilePut(FileNum, filler, offvar + 1 + (44 * Index) + Len(NewName))
|
||||
|
||||
|
||||
End If
|
||||
FileClose(FileNum)
|
||||
ChangeItemName = NewName
|
||||
End Function
|
||||
|
||||
Public Function ChangeBattleFrontierTrainerName(ByVal Index As Integer, ByVal NewName As String)
|
||||
Dim offvar As Long
|
||||
|
||||
|
|
|
|||
|
|
@ -159,6 +159,12 @@
|
|||
<Compile Include="InputAttacks.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ItemEditor.Designer.vb">
|
||||
<DependentUpon>ItemEditor.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ItemEditor.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LZ77.vb" />
|
||||
<Compile Include="INI.vb" />
|
||||
<Compile Include="MainFrm.vb">
|
||||
|
|
@ -244,6 +250,9 @@
|
|||
<EmbeddedResource Include="InputAttacks.resx">
|
||||
<DependentUpon>InputAttacks.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ItemEditor.resx">
|
||||
<DependentUpon>ItemEditor.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainFrm.resx">
|
||||
<DependentUpon>MainFrm.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@ Module GetImageFunctions
|
|||
End Function
|
||||
|
||||
Public Sub GetAndDrawItemPic(ByVal picBox As PictureBox, ByVal index As Integer)
|
||||
Dim sOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon front sprites, + 8 = Bulbasaur.
|
||||
Dim pOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) + 4 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
|
||||
Dim sOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8)
|
||||
Dim pOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) + 4
|
||||
Dim Temp(&HFFF) As Byte
|
||||
Dim Image(&HFFFF) As Byte
|
||||
Dim Palette15(&HFFF) As Byte
|
||||
|
|
|
|||
220
GBAPokemonGameEditor/ItemEditor.Designer.vb
generated
Normal file
220
GBAPokemonGameEditor/ItemEditor.Designer.vb
generated
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class ItemEditor
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
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.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.ChangeNameTextBox = New System.Windows.Forms.TextBox()
|
||||
Me.ItemListComboBox = New System.Windows.Forms.ComboBox()
|
||||
Me.SaveBttn = New System.Windows.Forms.Button()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
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.GroupBox1.SuspendLayout()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
CType(Me.ItemImagePictureBox, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Controls.Add(Me.ChangeNameTextBox)
|
||||
Me.GroupBox1.Controls.Add(Me.ItemListComboBox)
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(12, 12)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(150, 82)
|
||||
Me.GroupBox1.TabIndex = 0
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "Item Names:"
|
||||
'
|
||||
'ChangeNameTextBox
|
||||
'
|
||||
Me.ChangeNameTextBox.Location = New System.Drawing.Point(18, 46)
|
||||
Me.ChangeNameTextBox.MaxLength = 13
|
||||
Me.ChangeNameTextBox.Name = "ChangeNameTextBox"
|
||||
Me.ChangeNameTextBox.Size = New System.Drawing.Size(118, 20)
|
||||
Me.ChangeNameTextBox.TabIndex = 1
|
||||
'
|
||||
'ItemListComboBox
|
||||
'
|
||||
Me.ItemListComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ItemListComboBox.FormattingEnabled = True
|
||||
Me.ItemListComboBox.Location = New System.Drawing.Point(18, 19)
|
||||
Me.ItemListComboBox.Name = "ItemListComboBox"
|
||||
Me.ItemListComboBox.Size = New System.Drawing.Size(118, 21)
|
||||
Me.ItemListComboBox.TabIndex = 0
|
||||
'
|
||||
'SaveBttn
|
||||
'
|
||||
Me.SaveBttn.Location = New System.Drawing.Point(42, 92)
|
||||
Me.SaveBttn.Name = "SaveBttn"
|
||||
Me.SaveBttn.Size = New System.Drawing.Size(95, 33)
|
||||
Me.SaveBttn.TabIndex = 1
|
||||
Me.SaveBttn.Text = "Save"
|
||||
Me.SaveBttn.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(318, 12)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(36, 13)
|
||||
Me.Label1.TabIndex = 2
|
||||
Me.Label1.Text = "Index:"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(320, 39)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(34, 13)
|
||||
Me.Label2.TabIndex = 3
|
||||
Me.Label2.Text = "Price:"
|
||||
'
|
||||
'IndexTextBox
|
||||
'
|
||||
Me.IndexTextBox.Location = New System.Drawing.Point(360, 9)
|
||||
Me.IndexTextBox.Name = "IndexTextBox"
|
||||
Me.IndexTextBox.Size = New System.Drawing.Size(42, 20)
|
||||
Me.IndexTextBox.TabIndex = 4
|
||||
'
|
||||
'PriceTextBox
|
||||
'
|
||||
Me.PriceTextBox.Location = New System.Drawing.Point(360, 36)
|
||||
Me.PriceTextBox.Name = "PriceTextBox"
|
||||
Me.PriceTextBox.Size = New System.Drawing.Size(40, 20)
|
||||
Me.PriceTextBox.TabIndex = 5
|
||||
'
|
||||
'GroupBox2
|
||||
'
|
||||
Me.GroupBox2.Controls.Add(Me.ItmRpntBttn)
|
||||
Me.GroupBox2.Controls.Add(Me.ItmPlPntrTextBox)
|
||||
Me.GroupBox2.Controls.Add(Me.Label4)
|
||||
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.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)
|
||||
Me.ItmRpntBttn.Name = "ItmRpntBttn"
|
||||
Me.ItmRpntBttn.Size = New System.Drawing.Size(99, 23)
|
||||
Me.ItmRpntBttn.TabIndex = 5
|
||||
Me.ItmRpntBttn.Text = "Repoint"
|
||||
Me.ItmRpntBttn.UseVisualStyleBackColor = True
|
||||
'
|
||||
'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.Controls.Add(Me.GroupBox2)
|
||||
Me.Controls.Add(Me.PriceTextBox)
|
||||
Me.Controls.Add(Me.IndexTextBox)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.SaveBttn)
|
||||
Me.Controls.Add(Me.GroupBox1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.MaximizeBox = False
|
||||
Me.Name = "ItemEditor"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Item Editor"
|
||||
Me.GroupBox1.ResumeLayout(False)
|
||||
Me.GroupBox1.PerformLayout()
|
||||
Me.GroupBox2.ResumeLayout(False)
|
||||
Me.GroupBox2.PerformLayout()
|
||||
CType(Me.ItemImagePictureBox, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents GroupBox1 As GroupBox
|
||||
Friend WithEvents ItemListComboBox As ComboBox
|
||||
Friend WithEvents ChangeNameTextBox As TextBox
|
||||
Friend WithEvents SaveBttn As Button
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents IndexTextBox As TextBox
|
||||
Friend WithEvents PriceTextBox As TextBox
|
||||
Friend WithEvents GroupBox2 As GroupBox
|
||||
Friend WithEvents ItemImagePictureBox As PictureBox
|
||||
Friend WithEvents ItmRpntBttn As Button
|
||||
Friend WithEvents ItmPlPntrTextBox As TextBox
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents ItmImgPntrTextBox As TextBox
|
||||
Friend WithEvents Label3 As Label
|
||||
End Class
|
||||
120
GBAPokemonGameEditor/ItemEditor.resx
Normal file
120
GBAPokemonGameEditor/ItemEditor.resx
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
123
GBAPokemonGameEditor/ItemEditor.vb
Normal file
123
GBAPokemonGameEditor/ItemEditor.vb
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
Option Strict Off
|
||||
Option Explicit On
|
||||
Imports System.IO.Directory
|
||||
Imports System.Windows.Forms.Application
|
||||
Imports System.Net
|
||||
Imports VB = Microsoft.VisualBasic
|
||||
|
||||
Public Class ItemEditor
|
||||
|
||||
Dim ItemBaseOff As Integer
|
||||
Dim ItemPicOff As Integer
|
||||
Dim ItemPalOff As Integer
|
||||
|
||||
Private Sub ItemEditor_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
If header2 = "BPR" Or header2 = "BPG" Or header2 = "BPE" Then
|
||||
|
||||
ItmImgPntrTextBox.Enabled = True
|
||||
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)
|
||||
|
||||
Else
|
||||
|
||||
ItmImgPntrTextBox.Enabled = False
|
||||
ItmPlPntrTextBox.Enabled = False
|
||||
ItmRpntBttn.Enabled = False
|
||||
|
||||
End If
|
||||
|
||||
ItemBaseOff = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "ItemData", "")), System.Globalization.NumberStyles.HexNumber)
|
||||
|
||||
|
||||
Dim LoopVar As Integer
|
||||
|
||||
LoopVar = 0
|
||||
|
||||
ItemListComboBox.Items.Clear()
|
||||
|
||||
While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfItems", "")) = True
|
||||
ItemListComboBox.Items.Add(GetItemName(LoopVar))
|
||||
|
||||
LoopVar = LoopVar + 1
|
||||
|
||||
End While
|
||||
|
||||
ItemListComboBox.SelectedIndex = 0
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ItemListComboBox_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ItemListComboBox.SelectedIndexChanged
|
||||
|
||||
ChangeNameTextBox.Text = GetItemName(ItemListComboBox.SelectedIndex)
|
||||
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
GetAndDrawItemPic(ItemImagePictureBox, ItemListComboBox.SelectedIndex)
|
||||
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SaveBttn_Click(sender As Object, e As EventArgs) Handles SaveBttn.Click
|
||||
|
||||
Dim listvar As Integer
|
||||
|
||||
Dim LoopVar As Integer
|
||||
|
||||
listvar = ItemListComboBox.SelectedIndex
|
||||
|
||||
ChangeItemName(listvar, ChangeNameTextBox.Text)
|
||||
|
||||
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)))
|
||||
|
||||
|
||||
|
||||
If header2 = "BPR" Or header2 = "BPG" Or header2 = "BPE" Then
|
||||
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
LoopVar = 0
|
||||
|
||||
ItemListComboBox.Items.Clear()
|
||||
|
||||
While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfItems", "")) = True
|
||||
ItemListComboBox.Items.Add(GetItemName(LoopVar))
|
||||
|
||||
LoopVar = LoopVar + 1
|
||||
|
||||
End While
|
||||
|
||||
ItemListComboBox.SelectedIndex = listvar
|
||||
|
||||
End Sub
|
||||
|
||||
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)))
|
||||
|
||||
GetAndDrawItemPic(ItemImagePictureBox, ItemListComboBox.SelectedIndex)
|
||||
|
||||
Else
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
|
@ -803,7 +803,9 @@ Public Class MainFrm
|
|||
End Sub
|
||||
|
||||
Private Sub Button34_Click(sender As Object, e As EventArgs) Handles Button34.Click
|
||||
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
ItemEditor.Show()
|
||||
Me.Cursor = Cursors.Arrow
|
||||
End Sub
|
||||
|
||||
Private Sub Button35_Click(sender As Object, e As EventArgs) Handles Button35.Click
|
||||
|
|
|
|||
|
|
@ -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>U6uwjRcEaX8QR5cEYKdWZub64Wo=</dsig:DigestValue>
|
||||
<dsig:DigestValue>rKtJFhTmQkC6xdk7fJqNUt101TI=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -43,14 +43,14 @@
|
|||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="430080">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="437760">
|
||||
<assemblyIdentity name="GBAPokemonGameEditor" version="3.1.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>4McaiERj9WySPDsR1x0ELrBZZ/s=</dsig:DigestValue>
|
||||
<dsig:DigestValue>lg5NGvUaj+WEV6aqk8NOch3ar7o=</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>U6uwjRcEaX8QR5cEYKdWZub64Wo=</dsig:DigestValue>
|
||||
<dsig:DigestValue>rKtJFhTmQkC6xdk7fJqNUt101TI=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
|
|
@ -43,14 +43,14 @@
|
|||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="430080">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="437760">
|
||||
<assemblyIdentity name="GBAPokemonGameEditor" version="3.1.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>4McaiERj9WySPDsR1x0ELrBZZ/s=</dsig:DigestValue>
|
||||
<dsig:DigestValue>lg5NGvUaj+WEV6aqk8NOch3ar7o=</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>U6uwjRcEaX8QR5cEYKdWZub64Wo=</dsig:DigestValue>
|
||||
<dsig:DigestValue>rKtJFhTmQkC6xdk7fJqNUt101TI=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -43,14 +43,14 @@
|
|||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="430080">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="437760">
|
||||
<assemblyIdentity name="GBAPokemonGameEditor" version="3.1.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>4McaiERj9WySPDsR1x0ELrBZZ/s=</dsig:DigestValue>
|
||||
<dsig:DigestValue>lg5NGvUaj+WEV6aqk8NOch3ar7o=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -173,3 +173,4 @@ C:\Users\Gamer2020\Documents\GitHub\PokemonGameEditor\GBAPokemonGameEditor\obj\x
|
|||
C:\Users\Gamer2020\Documents\GitHub\PokemonGameEditor\GBAPokemonGameEditor\obj\x86\Debug\GBAPokemonGameEditor.xml
|
||||
C:\Users\Gamer2020\Documents\GitHub\PokemonGameEditor\GBAPokemonGameEditor\obj\x86\Debug\GBAPokemonGameEditor.pdb
|
||||
C:\Users\Gamer2020\Documents\GitHub\PokemonGameEditor\GBAPokemonGameEditor\obj\x86\Debug\GBAPokemonGameEditor.TMHMEditor.resources
|
||||
C:\Users\Gamer2020\Documents\GitHub\PokemonGameEditor\GBAPokemonGameEditor\obj\x86\Debug\GBAPokemonGameEditor.ItemEditor.resources
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue
Block a user