mirror of
https://github.com/Gamer2020/PokemonGameEditor.git
synced 2026-08-26 12:24:03 -05:00
More progress on trainer editor!
Saving my progress.
This commit is contained in:
Binary file not shown.
@@ -206,4 +206,37 @@ Module ChangeImageFunctions
|
||||
ConvertFootPrintImageToHexString = OutPutBuffer1 & OutPutBuffer0 & OutPutBuffer3 & OutPutBuffer2
|
||||
End Function
|
||||
|
||||
|
||||
Public Sub SaveTrainerSpriteToFreeSpace(index As Integer, Sprite As Byte(), pallete As Color())
|
||||
Dim sOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "TrainerImageTable", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8)
|
||||
Dim pOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "TrainerPaletteTable", ""), System.Globalization.NumberStyles.HexNumber) + (Index * 8)
|
||||
|
||||
Dim ImgString As String
|
||||
Dim PalString As String
|
||||
|
||||
Dim ImgBytes As Byte()
|
||||
Dim PalBytes As Byte()
|
||||
|
||||
Dim ImgNewOffset As String
|
||||
Dim PalNewOffset As String
|
||||
|
||||
ImgBytes = ConvertStringToByteArray(CompressLz77String(ConvertByteArrayToString(Sprite)))
|
||||
PalBytes = ConvertStringToByteArray(CompressLz77String(ConvertPaletteToString(pallete)))
|
||||
|
||||
ImgString = ByteArrayToHexString(ImgBytes)
|
||||
PalString = ByteArrayToHexString(PalBytes)
|
||||
|
||||
ImgNewOffset = SearchFreeSpaceFourAligned(LoadedROM, &HFF, ((Len(ImgString) / 2)), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000"))
|
||||
|
||||
WriteHEX(LoadedROM, ImgNewOffset, ImgString)
|
||||
|
||||
WriteHEX(LoadedROM, sOffset, ReverseHEX(Hex((ImgNewOffset) + &H8000000)))
|
||||
|
||||
PalNewOffset = SearchFreeSpaceFourAligned(LoadedROM, &HFF, ((Len(PalString) / 2)), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000"))
|
||||
|
||||
WriteHEX(LoadedROM, PalNewOffset, PalString)
|
||||
|
||||
WriteHEX(LoadedROM, pOffset, ReverseHEX(Hex((PalNewOffset) + &H8000000)))
|
||||
|
||||
End Sub
|
||||
End Module
|
||||
|
||||
@@ -436,4 +436,12 @@ Module ExportDataFunctions
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub ExportTrainerSprite(filename As String, Index As Integer)
|
||||
|
||||
Dim bitout As Bitmap = GetAndDrawTrainerSpriteToBitmap(Index, Int32.Parse(((ReadHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "IconPalTable", "")), System.Globalization.NumberStyles.HexNumber)) + (Index), 1))), System.Globalization.NumberStyles.HexNumber), True)
|
||||
|
||||
bitout.Save(filename)
|
||||
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
@@ -1159,5 +1159,39 @@ ErrorHandle:
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function GetAndDrawTrainerSpriteToBitmap(ByVal index As Integer, ByVal palindex As Integer, Optional ShowBackColor As Boolean = False) As Bitmap
|
||||
|
||||
Dim sOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "TrainerImageTable", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8)
|
||||
Dim pOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "TrainerPaletteTable", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8)
|
||||
Dim Temp(&HFFF) As Byte
|
||||
Dim Image(&HFFFF) As Byte
|
||||
Dim Palette15(&HFFF) As Byte
|
||||
Dim Palette32() As Color
|
||||
Dim bSprite As Bitmap
|
||||
Using fs As New FileStream(LoadedROM, FileMode.Open, FileAccess.Read)
|
||||
Using r As New BinaryReader(fs)
|
||||
fs.Position = sOffset
|
||||
sOffset = r.ReadInt32 - &H8000000
|
||||
fs.Position = sOffset
|
||||
r.Read(Temp, 0, &HFFF)
|
||||
LZ77UnComp(Temp, Image)
|
||||
|
||||
ReDim Temp(&HFFF)
|
||||
fs.Position = pOffset
|
||||
pOffset = r.ReadInt32 - &H8000000
|
||||
fs.Position = pOffset
|
||||
r.Read(Temp, 0, &HFFF)
|
||||
LZ77UnComp(Temp, Palette15)
|
||||
|
||||
Palette32 = LoadPalette(Palette15)
|
||||
|
||||
End Using
|
||||
End Using
|
||||
|
||||
|
||||
bSprite = LoadSprite(Image, Palette32, 64, 64, ShowBackColor)
|
||||
GetAndDrawTrainerSpriteToBitmap = bSprite
|
||||
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
@@ -738,4 +738,30 @@ Module ImportDataFunctions
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub ImportTrainerSprite(filename As String, Index As Integer)
|
||||
|
||||
Dim SpritePAl() As Color
|
||||
|
||||
Dim importimg As New Bitmap(filename)
|
||||
|
||||
Dim Loadedimg As Bitmap = New Bitmap(&H40, &H40)
|
||||
|
||||
If importimg.Height <> &H40 Or importimg.Width <> &H40 Then
|
||||
|
||||
MsgBox("Image dimensions must be 64 by 64! Aborting...")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim hexstring As String = ""
|
||||
|
||||
BitmapBLT(importimg, Loadedimg, 0, 0, 0, 0, &H40, &H40, Color.FromArgb(&HFF, 200, 200, &HA8))
|
||||
|
||||
SpritePAl = GetBitmapPalette(Loadedimg)
|
||||
|
||||
ConvertBitmapToPalette(Loadedimg, SpritePAl, True)
|
||||
|
||||
SaveTrainerSpriteToFreeSpace(Index, SaveBitmapToArray(Loadedimg, SpritePAl), SpritePAl)
|
||||
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
143
GBAPokemonGameEditor/TrainerEditor.Designer.vb
generated
143
GBAPokemonGameEditor/TrainerEditor.Designer.vb
generated
@@ -33,10 +33,23 @@ Partial Class TrainerEditor
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.PicNumericUpDown = New System.Windows.Forms.NumericUpDown()
|
||||
Me.TrainerPic = New System.Windows.Forms.PictureBox()
|
||||
Me.SaveBttn = New System.Windows.Forms.Button()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.ClassComboBox = New System.Windows.Forms.ComboBox()
|
||||
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
|
||||
Me.RadioButton1 = New System.Windows.Forms.RadioButton()
|
||||
Me.RadioButton2 = New System.Windows.Forms.RadioButton()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.MusicTextBox = New System.Windows.Forms.TextBox()
|
||||
Me.Button22 = New System.Windows.Forms.Button()
|
||||
Me.Button21 = New System.Windows.Forms.Button()
|
||||
Me.SaveFileDialog = New System.Windows.Forms.SaveFileDialog()
|
||||
Me.fileOpenDialog = New System.Windows.Forms.OpenFileDialog()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
CType(Me.PicNumericUpDown, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TrainerPic, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.GroupBox3.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'GroupBox1
|
||||
@@ -79,6 +92,13 @@ Partial Class TrainerEditor
|
||||
'
|
||||
'GroupBox2
|
||||
'
|
||||
Me.GroupBox2.Controls.Add(Me.Button22)
|
||||
Me.GroupBox2.Controls.Add(Me.Button21)
|
||||
Me.GroupBox2.Controls.Add(Me.MusicTextBox)
|
||||
Me.GroupBox2.Controls.Add(Me.Label4)
|
||||
Me.GroupBox2.Controls.Add(Me.GroupBox3)
|
||||
Me.GroupBox2.Controls.Add(Me.ClassComboBox)
|
||||
Me.GroupBox2.Controls.Add(Me.Label3)
|
||||
Me.GroupBox2.Controls.Add(Me.RnmBttn)
|
||||
Me.GroupBox2.Controls.Add(Me.TNameTextBox)
|
||||
Me.GroupBox2.Controls.Add(Me.Label2)
|
||||
@@ -86,7 +106,7 @@ Partial Class TrainerEditor
|
||||
Me.GroupBox2.Controls.Add(Me.TrainerPic)
|
||||
Me.GroupBox2.Location = New System.Drawing.Point(189, 12)
|
||||
Me.GroupBox2.Name = "GroupBox2"
|
||||
Me.GroupBox2.Size = New System.Drawing.Size(406, 166)
|
||||
Me.GroupBox2.Size = New System.Drawing.Size(356, 273)
|
||||
Me.GroupBox2.TabIndex = 1
|
||||
Me.GroupBox2.TabStop = False
|
||||
Me.GroupBox2.Text = "Trainer Data"
|
||||
@@ -132,11 +152,116 @@ Partial Class TrainerEditor
|
||||
Me.TrainerPic.TabIndex = 10
|
||||
Me.TrainerPic.TabStop = False
|
||||
'
|
||||
'SaveBttn
|
||||
'
|
||||
Me.SaveBttn.Location = New System.Drawing.Point(18, 109)
|
||||
Me.SaveBttn.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.SaveBttn.Name = "SaveBttn"
|
||||
Me.SaveBttn.Size = New System.Drawing.Size(142, 41)
|
||||
Me.SaveBttn.TabIndex = 2
|
||||
Me.SaveBttn.Text = "Save"
|
||||
Me.SaveBttn.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(108, 54)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(46, 17)
|
||||
Me.Label3.TabIndex = 15
|
||||
Me.Label3.Text = "Class:"
|
||||
'
|
||||
'ClassComboBox
|
||||
'
|
||||
Me.ClassComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append
|
||||
Me.ClassComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
|
||||
Me.ClassComboBox.FormattingEnabled = True
|
||||
Me.ClassComboBox.Location = New System.Drawing.Point(163, 51)
|
||||
Me.ClassComboBox.Name = "ClassComboBox"
|
||||
Me.ClassComboBox.Size = New System.Drawing.Size(181, 24)
|
||||
Me.ClassComboBox.TabIndex = 16
|
||||
'
|
||||
'GroupBox3
|
||||
'
|
||||
Me.GroupBox3.Controls.Add(Me.RadioButton2)
|
||||
Me.GroupBox3.Controls.Add(Me.RadioButton1)
|
||||
Me.GroupBox3.Location = New System.Drawing.Point(111, 78)
|
||||
Me.GroupBox3.Name = "GroupBox3"
|
||||
Me.GroupBox3.Size = New System.Drawing.Size(87, 82)
|
||||
Me.GroupBox3.TabIndex = 17
|
||||
Me.GroupBox3.TabStop = False
|
||||
Me.GroupBox3.Text = "Gender"
|
||||
'
|
||||
'RadioButton1
|
||||
'
|
||||
Me.RadioButton1.AutoSize = True
|
||||
Me.RadioButton1.ForeColor = System.Drawing.Color.DodgerBlue
|
||||
Me.RadioButton1.Location = New System.Drawing.Point(6, 21)
|
||||
Me.RadioButton1.Name = "RadioButton1"
|
||||
Me.RadioButton1.Size = New System.Drawing.Size(59, 21)
|
||||
Me.RadioButton1.TabIndex = 0
|
||||
Me.RadioButton1.TabStop = True
|
||||
Me.RadioButton1.Text = "Male"
|
||||
Me.RadioButton1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RadioButton2
|
||||
'
|
||||
Me.RadioButton2.AutoSize = True
|
||||
Me.RadioButton2.ForeColor = System.Drawing.Color.DeepPink
|
||||
Me.RadioButton2.Location = New System.Drawing.Point(6, 48)
|
||||
Me.RadioButton2.Name = "RadioButton2"
|
||||
Me.RadioButton2.Size = New System.Drawing.Size(75, 21)
|
||||
Me.RadioButton2.TabIndex = 1
|
||||
Me.RadioButton2.TabStop = True
|
||||
Me.RadioButton2.Text = "Female"
|
||||
Me.RadioButton2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(204, 83)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(48, 17)
|
||||
Me.Label4.TabIndex = 18
|
||||
Me.Label4.Text = "Music:"
|
||||
'
|
||||
'MusicTextBox
|
||||
'
|
||||
Me.MusicTextBox.Location = New System.Drawing.Point(258, 80)
|
||||
Me.MusicTextBox.Name = "MusicTextBox"
|
||||
Me.MusicTextBox.Size = New System.Drawing.Size(86, 22)
|
||||
Me.MusicTextBox.TabIndex = 19
|
||||
'
|
||||
'Button22
|
||||
'
|
||||
Me.Button22.Location = New System.Drawing.Point(16, 185)
|
||||
Me.Button22.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.Button22.Name = "Button22"
|
||||
Me.Button22.Size = New System.Drawing.Size(85, 43)
|
||||
Me.Button22.TabIndex = 21
|
||||
Me.Button22.Text = "Export Sprite"
|
||||
Me.Button22.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button21
|
||||
'
|
||||
Me.Button21.Location = New System.Drawing.Point(16, 136)
|
||||
Me.Button21.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.Button21.Name = "Button21"
|
||||
Me.Button21.Size = New System.Drawing.Size(85, 43)
|
||||
Me.Button21.TabIndex = 20
|
||||
Me.Button21.Text = "Import Sprite"
|
||||
Me.Button21.UseVisualStyleBackColor = True
|
||||
'
|
||||
'fileOpenDialog
|
||||
'
|
||||
Me.fileOpenDialog.FileName = "OpenFileDialog1"
|
||||
'
|
||||
'TrainerEditor
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(607, 206)
|
||||
Me.ClientSize = New System.Drawing.Size(559, 297)
|
||||
Me.Controls.Add(Me.SaveBttn)
|
||||
Me.Controls.Add(Me.GroupBox2)
|
||||
Me.Controls.Add(Me.GroupBox1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
@@ -151,6 +276,8 @@ Partial Class TrainerEditor
|
||||
Me.GroupBox2.PerformLayout()
|
||||
CType(Me.PicNumericUpDown, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TrainerPic, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.GroupBox3.ResumeLayout(False)
|
||||
Me.GroupBox3.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@@ -164,4 +291,16 @@ Partial Class TrainerEditor
|
||||
Friend WithEvents RnmBttn As System.Windows.Forms.Button
|
||||
Friend WithEvents TNameTextBox As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label2 As System.Windows.Forms.Label
|
||||
Friend WithEvents SaveBttn As System.Windows.Forms.Button
|
||||
Friend WithEvents ClassComboBox As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents Label3 As System.Windows.Forms.Label
|
||||
Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents RadioButton1 As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents RadioButton2 As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents MusicTextBox As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label4 As System.Windows.Forms.Label
|
||||
Friend WithEvents Button22 As System.Windows.Forms.Button
|
||||
Friend WithEvents Button21 As System.Windows.Forms.Button
|
||||
Friend WithEvents SaveFileDialog As System.Windows.Forms.SaveFileDialog
|
||||
Friend WithEvents fileOpenDialog As System.Windows.Forms.OpenFileDialog
|
||||
End Class
|
||||
|
||||
@@ -117,6 +117,12 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="SaveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="fileOpenDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>172, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
||||
@@ -6,6 +6,17 @@
|
||||
|
||||
LoopVar = 0
|
||||
|
||||
ClassComboBox.Items.Clear()
|
||||
|
||||
While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfTrainerClasses", "")) = True
|
||||
|
||||
|
||||
ClassComboBox.Items.Add(GetTrainerClass(LoopVar))
|
||||
LoopVar = LoopVar + 1
|
||||
End While
|
||||
|
||||
LoopVar = 0
|
||||
|
||||
TrainerListComboBox.Items.Clear()
|
||||
|
||||
While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfTrainers", "")) = True
|
||||
@@ -26,6 +37,8 @@
|
||||
Private Sub TrainerListComboBox_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TrainerListComboBox.SelectedIndexChanged
|
||||
|
||||
Dim offvar As Integer
|
||||
Dim MusicGen As Integer
|
||||
Dim MusicGenBin As String
|
||||
|
||||
PicNumericUpDown.Value = 1
|
||||
PicNumericUpDown.Value = 0
|
||||
@@ -37,7 +50,25 @@
|
||||
|
||||
TNameTextBox.Text = GetTrainerName(TrainerListComboBox.SelectedIndex + 1)
|
||||
|
||||
PicNumericUpDown.Value = "&H" & ReadHEX(LoadedROM, offvar + 3, 1)
|
||||
PicNumericUpDown.Value = Int32.Parse(ReadHEX(LoadedROM, offvar + 3, 1), System.Globalization.NumberStyles.HexNumber)
|
||||
|
||||
ClassComboBox.SelectedIndex = Int32.Parse(ReadHEX(LoadedROM, offvar + 1, 1), System.Globalization.NumberStyles.HexNumber)
|
||||
|
||||
MusicGen = Int32.Parse(ReadHEX(LoadedROM, offvar + 2, 1), System.Globalization.NumberStyles.HexNumber)
|
||||
|
||||
MusicGenBin = (Convert.ToString(MusicGen, 2))
|
||||
|
||||
While Len(MusicGenBin) < 8
|
||||
|
||||
MusicGenBin = "0" & MusicGenBin
|
||||
|
||||
End While
|
||||
|
||||
If GetChar(MusicGenBin, 1) = "0" Then
|
||||
RadioButton1.Checked = True
|
||||
ElseIf GetChar(MusicGenBin, 1) = "1" Then
|
||||
RadioButton2.Checked = True
|
||||
End If
|
||||
|
||||
TrainerIndexTextBox.Text = TrainerListComboBox.SelectedIndex + 1
|
||||
End Sub
|
||||
@@ -80,4 +111,133 @@
|
||||
TrainerListComboBox.SelectedIndex = savevar
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SaveBttn_Click(sender As Object, e As EventArgs) Handles SaveBttn.Click
|
||||
|
||||
Dim offvar As Integer
|
||||
|
||||
offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "TrainerTable", "")), System.Globalization.NumberStyles.HexNumber)
|
||||
|
||||
offvar = offvar + (40 * (TrainerListComboBox.SelectedIndex + 1))
|
||||
|
||||
WriteHEX(LoadedROM, offvar + 3, Hex(PicNumericUpDown.Value))
|
||||
|
||||
WriteHEX(LoadedROM, offvar + 1, Hex(ClassComboBox.SelectedIndex))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button22_Click(sender As Object, e As EventArgs) Handles Button22.Click
|
||||
SaveFileDialog.FileName = (PicNumericUpDown.Value) & ".png"
|
||||
'SaveFileDialog.CheckFileExists = True
|
||||
|
||||
' Check to ensure that the selected path exists. Dialog box displays
|
||||
' a warning otherwise.
|
||||
SaveFileDialog.CheckPathExists = True
|
||||
|
||||
' Get or set default extension. Doesn't include the leading ".".
|
||||
SaveFileDialog.DefaultExt = "png"
|
||||
|
||||
' Return the file referenced by a link? If False, simply returns the selected link
|
||||
' file. If True, returns the file linked to the LNK file.
|
||||
SaveFileDialog.DereferenceLinks = True
|
||||
|
||||
' Just as in VB6, use a set of pairs of filters, separated with "|". Each
|
||||
' pair consists of a description|file spec. Use a "|" between pairs. No need to put a
|
||||
' trailing "|". You can set the FilterIndex property as well, to select the default
|
||||
' filter. The first filter is numbered 1 (not 0). The default is 1.
|
||||
SaveFileDialog.Filter =
|
||||
"(*.png)|*.png*"
|
||||
|
||||
'SaveFileDialog.Multiselect = False
|
||||
|
||||
' Restore the original directory when done selecting
|
||||
' a file? If False, the current directory changes
|
||||
' to the directory in which you selected the file.
|
||||
' Set this to True to put the current folder back
|
||||
' where it was when you started.
|
||||
' The default is False.
|
||||
'.RestoreDirectory = False
|
||||
|
||||
' Show the Help button and Read-Only checkbox?
|
||||
SaveFileDialog.ShowHelp = False
|
||||
'SaveFileDialog.ShowReadOnly = False
|
||||
|
||||
' Start out with the read-only check box checked?
|
||||
' This only make sense if ShowReadOnly is True.
|
||||
'SaveFileDialog.ReadOnlyChecked = False
|
||||
|
||||
SaveFileDialog.Title = "Save as"
|
||||
|
||||
' Only accept valid Win32 file names?
|
||||
SaveFileDialog.ValidateNames = True
|
||||
|
||||
|
||||
If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
|
||||
|
||||
ExportTrainerSprite(SaveFileDialog.FileName, (PicNumericUpDown.Value))
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button21_Click(sender As Object, e As EventArgs) Handles Button21.Click
|
||||
|
||||
fileOpenDialog.FileName = ""
|
||||
fileOpenDialog.CheckFileExists = True
|
||||
|
||||
' Check to ensure that the selected path exists. Dialog box displays
|
||||
' a warning otherwise.
|
||||
fileOpenDialog.CheckPathExists = True
|
||||
|
||||
' Get or set default extension. Doesn't include the leading ".".
|
||||
fileOpenDialog.DefaultExt = "png"
|
||||
|
||||
' Return the file referenced by a link? If False, simply returns the selected link
|
||||
' file. If True, returns the file linked to the LNK file.
|
||||
fileOpenDialog.DereferenceLinks = True
|
||||
|
||||
' Just as in VB6, use a set of pairs of filters, separated with "|". Each
|
||||
' pair consists of a description|file spec. Use a "|" between pairs. No need to put a
|
||||
' trailing "|". You can set the FilterIndex property as well, to select the default
|
||||
' filter. The first filter is numbered 1 (not 0). The default is 1.
|
||||
fileOpenDialog.Filter =
|
||||
"(*.png)|*.png*"
|
||||
|
||||
fileOpenDialog.Multiselect = False
|
||||
|
||||
' Restore the original directory when done selecting
|
||||
' a file? If False, the current directory changes
|
||||
' to the directory in which you selected the file.
|
||||
' Set this to True to put the current folder back
|
||||
' where it was when you started.
|
||||
' The default is False.
|
||||
'.RestoreDirectory = False
|
||||
|
||||
' Show the Help button and Read-Only checkbox?
|
||||
fileOpenDialog.ShowHelp = False
|
||||
fileOpenDialog.ShowReadOnly = False
|
||||
|
||||
' Start out with the read-only check box checked?
|
||||
' This only make sense if ShowReadOnly is True.
|
||||
fileOpenDialog.ReadOnlyChecked = False
|
||||
|
||||
fileOpenDialog.Title = "Select sprite to import"
|
||||
|
||||
' Only accept valid Win32 file names?
|
||||
fileOpenDialog.ValidateNames = True
|
||||
|
||||
|
||||
If fileOpenDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
|
||||
|
||||
Me.Text = "Please wait..."
|
||||
Me.Enabled = False
|
||||
|
||||
ImportTrainerSprite(fileOpenDialog.FileName, PicNumericUpDown.Value)
|
||||
|
||||
|
||||
GetAndDrawTrainerPic(TrainerPic, PicNumericUpDown.Value)
|
||||
|
||||
Me.Text = "Trainer Editor"
|
||||
Me.Enabled = True
|
||||
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#sha256" />
|
||||
<dsig:DigestValue>EU9/walP9FIIRuPG5LEMlE2WJaNzktP7aMNvYLQ7e88=</dsig:DigestValue>
|
||||
<dsig:DigestValue>INy26ZEbtRzsSrFSzHGQliTCtLGj51mfKFtceB3M5Mc=</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="2100224">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2107392">
|
||||
<assemblyIdentity name="PokemonGameEditor" version="3.7.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#sha256" />
|
||||
<dsig:DigestValue>k9nYiyCAtYppnb52qsnKjaMjoc1R3Cv4RBEzBaZHb9A=</dsig:DigestValue>
|
||||
<dsig:DigestValue>zZ0HRcsKc+ZblHEUS8rtC9WTkzKW5KAaPJTFbmBeNuo=</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#sha256" />
|
||||
<dsig:DigestValue>EU9/walP9FIIRuPG5LEMlE2WJaNzktP7aMNvYLQ7e88=</dsig:DigestValue>
|
||||
<dsig:DigestValue>INy26ZEbtRzsSrFSzHGQliTCtLGj51mfKFtceB3M5Mc=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2100224">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2107392">
|
||||
<assemblyIdentity name="PokemonGameEditor" version="3.7.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#sha256" />
|
||||
<dsig:DigestValue>k9nYiyCAtYppnb52qsnKjaMjoc1R3Cv4RBEzBaZHb9A=</dsig:DigestValue>
|
||||
<dsig:DigestValue>zZ0HRcsKc+ZblHEUS8rtC9WTkzKW5KAaPJTFbmBeNuo=</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#sha256" />
|
||||
<dsig:DigestValue>EU9/walP9FIIRuPG5LEMlE2WJaNzktP7aMNvYLQ7e88=</dsig:DigestValue>
|
||||
<dsig:DigestValue>INy26ZEbtRzsSrFSzHGQliTCtLGj51mfKFtceB3M5Mc=</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="2100224">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2107392">
|
||||
<assemblyIdentity name="PokemonGameEditor" version="3.7.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#sha256" />
|
||||
<dsig:DigestValue>k9nYiyCAtYppnb52qsnKjaMjoc1R3Cv4RBEzBaZHb9A=</dsig:DigestValue>
|
||||
<dsig:DigestValue>zZ0HRcsKc+ZblHEUS8rtC9WTkzKW5KAaPJTFbmBeNuo=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user