mirror of
https://github.com/Gamer2020/PokemonGameEditor.git
synced 2026-07-19 00:42:10 -05:00
Added editing of animation tables.
This commit is contained in:
parent
1c38758976
commit
3a8c616212
Binary file not shown.
|
|
@ -318,114 +318,120 @@ Module CryFunctions
|
|||
36, 49, -64, -49, -36, -25, _
|
||||
-16, -9, -4, -1}
|
||||
|
||||
crytosave.Compressed = False
|
||||
|
||||
' copy cry data to be written
|
||||
Dim data = New List(Of Byte)()
|
||||
If crytosave.Compressed Then
|
||||
' data is compressed in blocks of 1 + 0x20 bytes at a time
|
||||
' first byte is normal signed PCM data
|
||||
' following 0x20 bytes are compressed based on previous value
|
||||
' (for a value not in lookup table, closest value will be chosen instead)
|
||||
'Console.WriteLine("compressed");
|
||||
|
||||
' each block has 0x40 samples
|
||||
Dim blockCount = crytosave.Data.Length / &H40
|
||||
If crytosave.Data.Length Mod &H40 > 0 Then
|
||||
blockCount += 1
|
||||
End If
|
||||
MsgBox("This should not be enabled!")
|
||||
End
|
||||
|
||||
' truncates the length of the last block
|
||||
' so we don't waste space
|
||||
Dim lastBlockSize = crytosave.Data.Length - crytosave.Data.Length / &H40 * &H40
|
||||
If lastBlockSize = 0 Then
|
||||
lastBlockSize = &H21
|
||||
Else
|
||||
lastBlockSize = 1 + (lastBlockSize / 2) + (If(lastBlockSize Mod 2 = 0, 0, 1))
|
||||
End If
|
||||
'' data is compressed in blocks of 1 + 0x20 bytes at a time
|
||||
'' first byte is normal signed PCM data
|
||||
'' following 0x20 bytes are compressed based on previous value
|
||||
'' (for a value not in lookup table, closest value will be chosen instead)
|
||||
''Console.WriteLine("compressed");
|
||||
|
||||
Dim blocks = New Byte(blockCount - 1)() {}
|
||||
For n As Integer = 0 To blockCount - 1
|
||||
' create new block
|
||||
If n < blockCount - 1 Then
|
||||
blocks(n) = New Byte(32) {}
|
||||
Else
|
||||
blocks(n) = New Byte(lastBlockSize - 1) {}
|
||||
End If
|
||||
'' each block has 0x40 samples
|
||||
'Dim blockCount = crytosave.Data.Length / &H40
|
||||
'If crytosave.Data.Length Mod &H40 > 0 Then
|
||||
' blockCount += 1
|
||||
'End If
|
||||
|
||||
Dim i As Integer = n * &H40
|
||||
Dim k As Integer = 0
|
||||
'' truncates the length of the last block
|
||||
'' so we don't waste space
|
||||
'Dim lastBlockSize = crytosave.Data.Length - crytosave.Data.Length / &H40 * &H40
|
||||
'If lastBlockSize = 0 Then
|
||||
' lastBlockSize = &H21
|
||||
'Else
|
||||
' lastBlockSize = 1 + (lastBlockSize / 2) + (If(lastBlockSize Mod 2 = 0, 0, 1))
|
||||
'End If
|
||||
|
||||
If i < crytosave.Data.Length Then
|
||||
' set first value
|
||||
blocks(n)(k) = BitConverter.GetBytes(crytosave.Data(i))(0)
|
||||
End If
|
||||
'Dim blocks = New Byte(blockCount - 1)() {}
|
||||
'For n As Integer = 0 To blockCount - 1
|
||||
' ' create new block
|
||||
' If n < blockCount - 1 Then
|
||||
' blocks(n) = New Byte(32) {}
|
||||
' Else
|
||||
' blocks(n) = New Byte(lastBlockSize - 1) {}
|
||||
' End If
|
||||
|
||||
k = k + 1
|
||||
' Dim i As Integer = n * &H40
|
||||
' Dim k As Integer = 0
|
||||
|
||||
Dim pcm As SByte
|
||||
' If i < crytosave.Data.Length Then
|
||||
' ' set first value
|
||||
' blocks(n)(k) = BitConverter.GetBytes(crytosave.Data(i))(0)
|
||||
' End If
|
||||
|
||||
If i < crytosave.Data.Length Then
|
||||
' k = k + 1
|
||||
|
||||
pcm = crytosave.Data(i)
|
||||
' Dim pcm As SByte
|
||||
|
||||
End If
|
||||
' If i < crytosave.Data.Length Then
|
||||
|
||||
i = i + 1
|
||||
' pcm = crytosave.Data(i)
|
||||
|
||||
Dim j As Integer = 1
|
||||
While j < &H40 And i < crytosave.Data.Length
|
||||
' get current sample
|
||||
Dim sample As SByte = crytosave.Data(i)
|
||||
' End If
|
||||
|
||||
i = i + 1
|
||||
' i = i + 1
|
||||
|
||||
' difference between previous sample and this
|
||||
Dim diff As Integer = sample - pcm
|
||||
' Dim j As Integer = 1
|
||||
' While j < &H40 And i < crytosave.Data.Length
|
||||
' ' get current sample
|
||||
' Dim sample As SByte = crytosave.Data(i)
|
||||
|
||||
' check for a perfect match in lookup table
|
||||
Dim lookupI = -1
|
||||
For x As Integer = 0 To 15
|
||||
If lookup(x) = diff Then
|
||||
lookupI = x
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' i = i + 1
|
||||
|
||||
' search for the closest match in the table
|
||||
If lookupI = -1 Then
|
||||
Dim bestDiff As Integer = 255
|
||||
For x As Integer = 0 To 15
|
||||
If Math.Abs(CInt(lookup(x)) - diff) < bestDiff Then
|
||||
lookupI = x
|
||||
bestDiff = Math.Abs(lookup(x) - diff)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' ' difference between previous sample and this
|
||||
' Dim diff As Integer = sample - pcm
|
||||
|
||||
' set value in block
|
||||
' on an odd value, increase position in block
|
||||
If j Mod 2 = 0 Then
|
||||
blocks(n)(k) = blocks(n)(k) Or CByte(lookupI << 4)
|
||||
Else
|
||||
blocks(n)(k) = blocks(n)(k) Or CByte(lookupI)
|
||||
' ' check for a perfect match in lookup table
|
||||
' Dim lookupI = -1
|
||||
' For x As Integer = 0 To 15
|
||||
' If lookup(x) = diff Then
|
||||
' lookupI = x
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
|
||||
k = k + 1
|
||||
' ' search for the closest match in the table
|
||||
' If lookupI = -1 Then
|
||||
' Dim bestDiff As Integer = 255
|
||||
' For x As Integer = 0 To 15
|
||||
' If Math.Abs(CInt(lookup(x)) - diff) < bestDiff Then
|
||||
' lookupI = x
|
||||
' bestDiff = Math.Abs(lookup(x) - diff)
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
|
||||
End If
|
||||
' ' set value in block
|
||||
' ' on an odd value, increase position in block
|
||||
' If j Mod 2 = 0 Then
|
||||
' blocks(n)(k) = blocks(n)(k) Or CByte(lookupI << 4)
|
||||
' Else
|
||||
' blocks(n)(k) = blocks(n)(k) Or CByte(lookupI)
|
||||
|
||||
' set previous
|
||||
pcm = sample
|
||||
j += 1
|
||||
End While
|
||||
Next
|
||||
' k = k + 1
|
||||
|
||||
For n As Integer = 0 To blockCount - 1
|
||||
data.AddRange(blocks(n))
|
||||
Next
|
||||
' End If
|
||||
|
||||
' ' set previous
|
||||
' pcm = sample
|
||||
' j += 1
|
||||
' End While
|
||||
'Next
|
||||
|
||||
'For n As Integer = 0 To blockCount - 1
|
||||
' data.AddRange(blocks(n))
|
||||
'Next
|
||||
Else
|
||||
' uncompressed, copy directly to data
|
||||
'Console.WriteLine("uncompressed");
|
||||
For Each s As SByte In crytosave.Data
|
||||
data.Add(CByte(s))
|
||||
data.Add(CByte(s And &HFF))
|
||||
Next
|
||||
End If
|
||||
|
||||
|
|
@ -468,15 +474,21 @@ Module CryFunctions
|
|||
WriteHEX(LoadedROM, crytosave.Offset + 8, ReverseHEX(VB.Right("00000000" & (crytosave.LoopStart), 8)))
|
||||
WriteHEX(LoadedROM, crytosave.Offset + 12, ReverseHEX(VB.Right("00000000" & (crytosave.Data.Length - 1), 8)))
|
||||
|
||||
'WriteHEX(LoadedROM, crytosave.Offset, ReverseHEX(VB.Right("0000" & CUShort(If(crytosave.Compressed, 1, 0)), 4)))
|
||||
'WriteHEX(LoadedROM, crytosave.Offset + 2, ReverseHEX(VB.Right("0000" & CUShort(If(crytosave.Looped, &H4000, 0)), 4)))
|
||||
'WriteHEX(LoadedROM, crytosave.Offset + 4, ReverseHEX(VB.Right("00000000" & (crytosave.SampleRate << 10), 8)))
|
||||
'WriteHEX(LoadedROM, crytosave.Offset + 8, ReverseHEX(VB.Right("00000000" & (crytosave.LoopStart), 8)))
|
||||
'WriteHEX(LoadedROM, crytosave.Offset + 12, ReverseHEX(VB.Right("00000000" & (crytosave.Data.Length - 1), 8)))
|
||||
|
||||
Dim tempbuff As String = ByteArrayToHexString(data.ToArray)
|
||||
|
||||
WriteHEX(LoadedROM, crytosave.Offset + 16, tempbuff)
|
||||
|
||||
' write cry table entry
|
||||
|
||||
WriteHEX(LoadedROM, cryTable + (crytosave.Index * 12), ReverseHEX(If(crytosave.Compressed, "00003C20", "00003C00")))
|
||||
WriteHEX(LoadedROM, cryTable + (crytosave.Index * 12) + 4, ReverseHEX(VB.Right("00000000" & Hex(crytosave.Offset), 8)))
|
||||
WriteHEX(LoadedROM, cryTable + (crytosave.Index * 12) + 8, "FF00FF")
|
||||
'WriteHEX(LoadedROM, cryTable + (crytosave.Index * 12), ReverseHEX(If(crytosave.Compressed, "00003C20", "00003C00")))
|
||||
'WriteHEX(LoadedROM, cryTable + (crytosave.Index * 12) + 4, ReverseHEX(VB.Right("00000000" & Hex(crytosave.Offset), 8)))
|
||||
'WriteHEX(LoadedROM, cryTable + (crytosave.Index * 12) + 8, "FF00FF")
|
||||
|
||||
|
||||
'rom.WriteUInt16(CUShort(If(Cry.Compressed, 1, 0)))
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ Module ExportDataFunctions
|
|||
Dim Offset_2 As String = ""
|
||||
Dim PokedexType As String = ""
|
||||
|
||||
Dim FrontAnimationTable As String = ""
|
||||
Dim BackAnimTable As String = ""
|
||||
Dim AnimDelayTable As String = ""
|
||||
|
||||
'Fill vars with proper data
|
||||
|
||||
BaseStats = ReadHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonData", "")), System.Globalization.NumberStyles.HexNumber)) + (PokemonIndex * 28), 28)
|
||||
|
|
@ -251,6 +255,13 @@ Module ExportDataFunctions
|
|||
PokedexDescription = Pointer1Description
|
||||
|
||||
FileClose(FileNum)
|
||||
|
||||
|
||||
FrontAnimationTable = (Int32.Parse(((ReadHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "FrontAnimationTable", "")), System.Globalization.NumberStyles.HexNumber)) + (PokemonIndex - 1), 1))), System.Globalization.NumberStyles.HexNumber))
|
||||
BackAnimTable = (Int32.Parse(((ReadHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "BackAnimTable", "")), System.Globalization.NumberStyles.HexNumber)) + (1) + (PokemonIndex - 1), 1))), System.Globalization.NumberStyles.HexNumber))
|
||||
AnimDelayTable = (Int32.Parse(((ReadHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "AnimDelayTable", "")), System.Globalization.NumberStyles.HexNumber)) + (PokemonIndex - 1), 1))), System.Globalization.NumberStyles.HexNumber))
|
||||
|
||||
|
||||
End If
|
||||
|
||||
PokedexType = GetPokedexTypeName(NationalDexNumber)
|
||||
|
|
@ -279,6 +290,12 @@ Module ExportDataFunctions
|
|||
WriteString(INIFileName, "Pokemon", "MoveTutorCompatibility", MoveTutorCompatibility)
|
||||
End If
|
||||
|
||||
If header2 = "BPE" Then
|
||||
WriteString(INIFileName, "Pokemon", "FrontAnimationTable", FrontAnimationTable)
|
||||
WriteString(INIFileName, "Pokemon", "BackAnimTable", BackAnimTable)
|
||||
WriteString(INIFileName, "Pokemon", "AnimDelayTable", AnimDelayTable)
|
||||
End If
|
||||
|
||||
WriteString(INIFileName, "Pokemon", "TMHMCompatibility", TMHMCompatibility)
|
||||
|
||||
WriteString(INIFileName, "Pokemon", "NationalDexNumber", NationalDexNumber)
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@ Module ImportDataFunctions
|
|||
Dim Offset_2 As String = ""
|
||||
Dim PokedexType As String = ""
|
||||
|
||||
Dim FrontAnimationTable As String = ""
|
||||
Dim BackAnimTable As String = ""
|
||||
Dim AnimDelayTable As String = ""
|
||||
|
||||
|
||||
'Load data
|
||||
|
||||
|
|
@ -98,6 +102,11 @@ Module ImportDataFunctions
|
|||
ElseIf header2 = "BPR" Or header2 = "BPG" Then
|
||||
SkipVar = "36"
|
||||
ElseIf header2 = "BPE" Then
|
||||
|
||||
FrontAnimationTable = GetString(INIFileName, "Pokemon", "FrontAnimationTable", "1")
|
||||
BackAnimTable = GetString(INIFileName, "Pokemon", "BackAnimTable", "1")
|
||||
AnimDelayTable = GetString(INIFileName, "Pokemon", "AnimDelayTable", "1")
|
||||
|
||||
SkipVar = "32"
|
||||
End If
|
||||
|
||||
|
|
@ -200,6 +209,9 @@ Module ImportDataFunctions
|
|||
|
||||
WriteHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber) + 4 + 12 + (NationalDexNumber * SkipVar), ReverseHEX(Hex(Val("&H" & (Hex(PokedexDescriptionOff))) + &H8000000)))
|
||||
|
||||
WriteHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "FrontAnimationTable", "")), System.Globalization.NumberStyles.HexNumber)) + (PokemonIndex - 1), (Hex(Val(FrontAnimationTable))))
|
||||
WriteHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "BackAnimTable", "")), System.Globalization.NumberStyles.HexNumber)) + (1) + (PokemonIndex - 1), (Hex(Val(BackAnimTable))))
|
||||
WriteHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "AnimDelayTable", "")), System.Globalization.NumberStyles.HexNumber)) + (PokemonIndex - 1), (Hex(Val(AnimDelayTable))))
|
||||
|
||||
End If
|
||||
|
||||
|
|
|
|||
118
GBAPokemonGameEditor/Pokemonedit.Designer.vb
generated
118
GBAPokemonGameEditor/Pokemonedit.Designer.vb
generated
|
|
@ -209,6 +209,8 @@ Partial Class Pokemonedit
|
|||
Me.Label35 = New System.Windows.Forms.Label()
|
||||
Me.Label36 = New System.Windows.Forms.Label()
|
||||
Me.GroupBox28 = New System.Windows.Forms.GroupBox()
|
||||
Me.TextBox7 = New System.Windows.Forms.TextBox()
|
||||
Me.Label57 = New System.Windows.Forms.Label()
|
||||
Me.TextBox4 = New System.Windows.Forms.TextBox()
|
||||
Me.TextBox3 = New System.Windows.Forms.TextBox()
|
||||
Me.Button16 = New System.Windows.Forms.Button()
|
||||
|
|
@ -274,8 +276,13 @@ Partial Class Pokemonedit
|
|||
Me.Button30 = New System.Windows.Forms.Button()
|
||||
Me.Button38 = New System.Windows.Forms.Button()
|
||||
Me.Button39 = New System.Windows.Forms.Button()
|
||||
Me.TextBox7 = New System.Windows.Forms.TextBox()
|
||||
Me.Label57 = New System.Windows.Forms.Label()
|
||||
Me.Label58 = New System.Windows.Forms.Label()
|
||||
Me.TextBox8 = New System.Windows.Forms.TextBox()
|
||||
Me.TextBox9 = New System.Windows.Forms.TextBox()
|
||||
Me.Label59 = New System.Windows.Forms.Label()
|
||||
Me.TextBox10 = New System.Windows.Forms.TextBox()
|
||||
Me.Label60 = New System.Windows.Forms.Label()
|
||||
Me.AniSavBttn = New System.Windows.Forms.Button()
|
||||
Me.TabControl1.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
Me.GroupBox26.SuspendLayout()
|
||||
|
|
@ -381,7 +388,7 @@ Partial Class Pokemonedit
|
|||
'GroupBox26
|
||||
'
|
||||
Me.GroupBox26.Controls.Add(Me.ItmAnmtn)
|
||||
Me.GroupBox26.Location = New System.Drawing.Point(599, 249)
|
||||
Me.GroupBox26.Location = New System.Drawing.Point(599, 489)
|
||||
Me.GroupBox26.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.GroupBox26.Name = "GroupBox26"
|
||||
Me.GroupBox26.Padding = New System.Windows.Forms.Padding(4)
|
||||
|
|
@ -514,11 +521,11 @@ Partial Class Pokemonedit
|
|||
Me.GroupBox20.Controls.Add(Me.PictureBox1)
|
||||
Me.GroupBox20.Controls.Add(Me.Button5)
|
||||
Me.GroupBox20.Controls.Add(Me.FootPrintPointer)
|
||||
Me.GroupBox20.Location = New System.Drawing.Point(599, 318)
|
||||
Me.GroupBox20.Location = New System.Drawing.Point(8, 322)
|
||||
Me.GroupBox20.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.GroupBox20.Name = "GroupBox20"
|
||||
Me.GroupBox20.Padding = New System.Windows.Forms.Padding(4)
|
||||
Me.GroupBox20.Size = New System.Drawing.Size(196, 153)
|
||||
Me.GroupBox20.Size = New System.Drawing.Size(200, 153)
|
||||
Me.GroupBox20.TabIndex = 4
|
||||
Me.GroupBox20.TabStop = False
|
||||
Me.GroupBox20.Text = "FootPrint"
|
||||
|
|
@ -648,6 +655,13 @@ Partial Class Pokemonedit
|
|||
'
|
||||
'GroupBox15
|
||||
'
|
||||
Me.GroupBox15.Controls.Add(Me.AniSavBttn)
|
||||
Me.GroupBox15.Controls.Add(Me.TextBox10)
|
||||
Me.GroupBox15.Controls.Add(Me.Label60)
|
||||
Me.GroupBox15.Controls.Add(Me.TextBox9)
|
||||
Me.GroupBox15.Controls.Add(Me.Label59)
|
||||
Me.GroupBox15.Controls.Add(Me.TextBox8)
|
||||
Me.GroupBox15.Controls.Add(Me.Label58)
|
||||
Me.GroupBox15.Controls.Add(Me.AniPic2)
|
||||
Me.GroupBox15.Controls.Add(Me.AniPic)
|
||||
Me.GroupBox15.Controls.Add(Me.Button2)
|
||||
|
|
@ -656,7 +670,7 @@ Partial Class Pokemonedit
|
|||
Me.GroupBox15.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.GroupBox15.Name = "GroupBox15"
|
||||
Me.GroupBox15.Padding = New System.Windows.Forms.Padding(4)
|
||||
Me.GroupBox15.Size = New System.Drawing.Size(212, 233)
|
||||
Me.GroupBox15.Size = New System.Drawing.Size(212, 378)
|
||||
Me.GroupBox15.TabIndex = 2
|
||||
Me.GroupBox15.TabStop = False
|
||||
Me.GroupBox15.Text = "Animation (Emerald Only)"
|
||||
|
|
@ -2385,6 +2399,24 @@ Partial Class Pokemonedit
|
|||
Me.GroupBox28.TabStop = False
|
||||
Me.GroupBox28.Text = "Pokedex Order"
|
||||
'
|
||||
'TextBox7
|
||||
'
|
||||
Me.TextBox7.Location = New System.Drawing.Point(125, 91)
|
||||
Me.TextBox7.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.TextBox7.Name = "TextBox7"
|
||||
Me.TextBox7.Size = New System.Drawing.Size(44, 22)
|
||||
Me.TextBox7.TabIndex = 6
|
||||
'
|
||||
'Label57
|
||||
'
|
||||
Me.Label57.AutoSize = True
|
||||
Me.Label57.Location = New System.Drawing.Point(24, 96)
|
||||
Me.Label57.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
||||
Me.Label57.Name = "Label57"
|
||||
Me.Label57.Size = New System.Drawing.Size(96, 17)
|
||||
Me.Label57.TabIndex = 5
|
||||
Me.Label57.Text = "Hoenn to Nat:"
|
||||
'
|
||||
'TextBox4
|
||||
'
|
||||
Me.TextBox4.Location = New System.Drawing.Point(125, 58)
|
||||
|
|
@ -3024,23 +3056,62 @@ Partial Class Pokemonedit
|
|||
Me.Button39.Text = "Import All Cries"
|
||||
Me.Button39.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TextBox7
|
||||
'Label58
|
||||
'
|
||||
Me.TextBox7.Location = New System.Drawing.Point(125, 91)
|
||||
Me.TextBox7.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.TextBox7.Name = "TextBox7"
|
||||
Me.TextBox7.Size = New System.Drawing.Size(44, 22)
|
||||
Me.TextBox7.TabIndex = 6
|
||||
Me.Label58.AutoSize = True
|
||||
Me.Label58.Location = New System.Drawing.Point(17, 240)
|
||||
Me.Label58.Name = "Label58"
|
||||
Me.Label58.Size = New System.Drawing.Size(111, 17)
|
||||
Me.Label58.TabIndex = 14
|
||||
Me.Label58.Text = "Front Animation:"
|
||||
'
|
||||
'Label57
|
||||
'TextBox8
|
||||
'
|
||||
Me.Label57.AutoSize = True
|
||||
Me.Label57.Location = New System.Drawing.Point(24, 96)
|
||||
Me.Label57.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
||||
Me.Label57.Name = "Label57"
|
||||
Me.Label57.Size = New System.Drawing.Size(96, 17)
|
||||
Me.Label57.TabIndex = 5
|
||||
Me.Label57.Text = "Hoenn to Nat:"
|
||||
Me.TextBox8.Location = New System.Drawing.Point(151, 235)
|
||||
Me.TextBox8.Name = "TextBox8"
|
||||
Me.TextBox8.Size = New System.Drawing.Size(46, 22)
|
||||
Me.TextBox8.TabIndex = 15
|
||||
'
|
||||
'TextBox9
|
||||
'
|
||||
Me.TextBox9.Location = New System.Drawing.Point(151, 266)
|
||||
Me.TextBox9.Name = "TextBox9"
|
||||
Me.TextBox9.Size = New System.Drawing.Size(46, 22)
|
||||
Me.TextBox9.TabIndex = 17
|
||||
'
|
||||
'Label59
|
||||
'
|
||||
Me.Label59.AutoSize = True
|
||||
Me.Label59.Location = New System.Drawing.Point(17, 271)
|
||||
Me.Label59.Name = "Label59"
|
||||
Me.Label59.Size = New System.Drawing.Size(109, 17)
|
||||
Me.Label59.TabIndex = 16
|
||||
Me.Label59.Text = "Back Animation:"
|
||||
'
|
||||
'TextBox10
|
||||
'
|
||||
Me.TextBox10.Location = New System.Drawing.Point(151, 299)
|
||||
Me.TextBox10.Name = "TextBox10"
|
||||
Me.TextBox10.Size = New System.Drawing.Size(46, 22)
|
||||
Me.TextBox10.TabIndex = 19
|
||||
'
|
||||
'Label60
|
||||
'
|
||||
Me.Label60.AutoSize = True
|
||||
Me.Label60.Location = New System.Drawing.Point(17, 304)
|
||||
Me.Label60.Name = "Label60"
|
||||
Me.Label60.Size = New System.Drawing.Size(114, 17)
|
||||
Me.Label60.TabIndex = 18
|
||||
Me.Label60.Text = "Animation Delay:"
|
||||
'
|
||||
'AniSavBttn
|
||||
'
|
||||
Me.AniSavBttn.Location = New System.Drawing.Point(16, 330)
|
||||
Me.AniSavBttn.Name = "AniSavBttn"
|
||||
Me.AniSavBttn.Size = New System.Drawing.Size(182, 35)
|
||||
Me.AniSavBttn.TabIndex = 20
|
||||
Me.AniSavBttn.Text = "Save"
|
||||
Me.AniSavBttn.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Pokemonedit
|
||||
'
|
||||
|
|
@ -3420,4 +3491,11 @@ Partial Class Pokemonedit
|
|||
Friend WithEvents Button39 As System.Windows.Forms.Button
|
||||
Friend WithEvents TextBox7 As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label57 As System.Windows.Forms.Label
|
||||
Friend WithEvents AniSavBttn As System.Windows.Forms.Button
|
||||
Friend WithEvents TextBox10 As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label60 As System.Windows.Forms.Label
|
||||
Friend WithEvents TextBox9 As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label59 As System.Windows.Forms.Label
|
||||
Friend WithEvents TextBox8 As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label58 As System.Windows.Forms.Label
|
||||
End Class
|
||||
|
|
|
|||
|
|
@ -754,7 +754,7 @@ Public Class Pokemonedit
|
|||
|
||||
End If
|
||||
|
||||
|
||||
GroupBox15.Enabled = False
|
||||
Button2.Enabled = False
|
||||
AnimationPointer.Text = ""
|
||||
AnimationPointer.Enabled = False
|
||||
|
|
@ -765,12 +765,20 @@ Public Class Pokemonedit
|
|||
If header2 = "BPE" Then
|
||||
Button2.Enabled = True
|
||||
AnimationPointer.Enabled = True
|
||||
GroupBox15.Enabled = True
|
||||
|
||||
AnimationPointers = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonAnimations", "")), System.Globalization.NumberStyles.HexNumber)
|
||||
AnimationPointer.Text = (Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (AnimationPointers) + (8) + (i * 8), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000))
|
||||
|
||||
GetAndDrawAnimationPokemonPic(AniPic, i + 1)
|
||||
GetAndDrawAnimationPokemonPicShiny(AniPic2, i + 1)
|
||||
|
||||
|
||||
TextBox8.Text = (Int32.Parse(((ReadHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "FrontAnimationTable", "")), System.Globalization.NumberStyles.HexNumber)) + (i), 1))), System.Globalization.NumberStyles.HexNumber))
|
||||
TextBox9.Text = (Int32.Parse(((ReadHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "BackAnimTable", "")), System.Globalization.NumberStyles.HexNumber)) + (1) + (i), 1))), System.Globalization.NumberStyles.HexNumber))
|
||||
TextBox10.Text = (Int32.Parse(((ReadHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "AnimDelayTable", "")), System.Globalization.NumberStyles.HexNumber)) + (i), 1))), System.Globalization.NumberStyles.HexNumber))
|
||||
|
||||
|
||||
End If
|
||||
GetAndDrawFrontPokemonPic(FrntPic, i + 1)
|
||||
GetAndDrawBackPokemonPic(BckPic2, i + 1)
|
||||
|
|
@ -1763,6 +1771,8 @@ Public Class Pokemonedit
|
|||
|
||||
If (i + 1) < 252 Then
|
||||
|
||||
'MsgBox(Val(CryPointer.Text) + &H8000000)
|
||||
|
||||
WriteHEX(LoadedROM, (CryTable) + (4) + (i * 12), ReverseHEX(Hex(Int32.Parse(((CryPointer.Text)), System.Globalization.NumberStyles.HexNumber) + &H8000000)))
|
||||
' WriteHEX(LoadedROM, (CryTable3) + (4) + (i * 12), ReverseHEX(Hex(Int32.Parse(((CryPointer2.Text)), System.Globalization.NumberStyles.HexNumber) + &H8000000)))
|
||||
|
||||
|
|
@ -2451,7 +2461,7 @@ Public Class Pokemonedit
|
|||
|
||||
TextBox5.Text = GetPokedexTypeName(TextBox3.Text)
|
||||
|
||||
If header2 = "BPE" And TextBox4.Text < (GetString(GetINIFileLocation(), header, "NumberOfRegionDex", "") + 1) Then
|
||||
If header2 = "BPE" And TextBox4.Text < (GetString(GetINIFileLocation(), header, "NumberOfRegionDex", "151") + 1) Then
|
||||
TextBox7.Enabled = True
|
||||
|
||||
TextBox7.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "HoenntoNationalDex", "")), System.Globalization.NumberStyles.HexNumber) + ((TextBox4.Text - 1) * 2), 2))), System.Globalization.NumberStyles.HexNumber)
|
||||
|
|
@ -3899,10 +3909,6 @@ Public Class Pokemonedit
|
|||
|
||||
SaveCry(crynorm, CryTable)
|
||||
|
||||
'ImportPokemonFootPrint(fileOpenDialog.FileName, PKMNames.SelectedIndex + 1)
|
||||
|
||||
'GetAndDrawPokemonFootPrint(PictureBox1, PKMNames.SelectedIndex + 1)
|
||||
|
||||
Me.Text = "Pokemon Editor"
|
||||
Me.Enabled = True
|
||||
End If
|
||||
|
|
@ -3951,4 +3957,17 @@ Public Class Pokemonedit
|
|||
Private Sub chkCompressed1_CheckedChanged(sender As Object, e As EventArgs) Handles chkCompressed1.CheckedChanged
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub AniSavBttn_Click(sender As Object, e As EventArgs) Handles AniSavBttn.Click
|
||||
|
||||
If header2 = "BPE" Then
|
||||
i = PKMNames.SelectedIndex
|
||||
|
||||
WriteHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "FrontAnimationTable", "")), System.Globalization.NumberStyles.HexNumber)) + (i), (Hex(Val(TextBox8.Text))))
|
||||
WriteHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "BackAnimTable", "")), System.Globalization.NumberStyles.HexNumber)) + (1) + (i), (Hex(Val(TextBox9.Text))))
|
||||
WriteHEX(LoadedROM, (Int32.Parse((GetString(GetINIFileLocation(), header, "AnimDelayTable", "")), System.Globalization.NumberStyles.HexNumber)) + (i), (Hex(Val(TextBox10.Text))))
|
||||
|
||||
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>6ew58NOBldGe6c8PkTZKCPnWQJPc23GmAtZYU9hbcg8=</dsig:DigestValue>
|
||||
<dsig:DigestValue>bTzCyW2xhD7mfO1HKLNL3G7dl+97S82cw1uDKsQHFTM=</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="2048512">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2051072">
|
||||
<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>EucaHAdTZ8vwaknRacYCHNL84YRF45iFTgVK+FSsjJs=</dsig:DigestValue>
|
||||
<dsig:DigestValue>KnI9E4ncysJK6R4J3tmwgbcsqAR3LaRGMCaj9K+uPHc=</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>6ew58NOBldGe6c8PkTZKCPnWQJPc23GmAtZYU9hbcg8=</dsig:DigestValue>
|
||||
<dsig:DigestValue>bTzCyW2xhD7mfO1HKLNL3G7dl+97S82cw1uDKsQHFTM=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
|
|
@ -43,14 +43,14 @@
|
|||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2048512">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2051072">
|
||||
<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>EucaHAdTZ8vwaknRacYCHNL84YRF45iFTgVK+FSsjJs=</dsig:DigestValue>
|
||||
<dsig:DigestValue>KnI9E4ncysJK6R4J3tmwgbcsqAR3LaRGMCaj9K+uPHc=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
|
|
@ -236,3 +236,4 @@ Error! EvolutionName250 is missing for ROM BPEE!
|
|||
Error! EvolutionName251 is missing for ROM BPEE!
|
||||
Error! EvolutionName252 is missing for ROM BPEE!
|
||||
Error! EvolutionName253 is missing for ROM BPEE!
|
||||
Error! NumberOfRegionDex is missing for ROM BPRE!
|
||||
|
|
|
|||
|
|
@ -850,6 +850,9 @@ PokemonBackSprites=3028B8
|
|||
PokemonNormalPal=303678
|
||||
PokemonShinyPal=304438
|
||||
PokemonAnimations=30A18C
|
||||
FrontAnimationTable=3299EC
|
||||
BackAnimTable=60A8C8
|
||||
AnimDelayTable=329B87
|
||||
IconPointerTable=57BCA8
|
||||
IconPalTable=57C388
|
||||
CryTable=69DCF4
|
||||
|
|
|
|||
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>6ew58NOBldGe6c8PkTZKCPnWQJPc23GmAtZYU9hbcg8=</dsig:DigestValue>
|
||||
<dsig:DigestValue>bTzCyW2xhD7mfO1HKLNL3G7dl+97S82cw1uDKsQHFTM=</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="2048512">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2051072">
|
||||
<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>EucaHAdTZ8vwaknRacYCHNL84YRF45iFTgVK+FSsjJs=</dsig:DigestValue>
|
||||
<dsig:DigestValue>KnI9E4ncysJK6R4J3tmwgbcsqAR3LaRGMCaj9K+uPHc=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue
Block a user