diff --git a/.vs/GBAPokemonGameEditor/v14/.suo b/.vs/GBAPokemonGameEditor/v14/.suo
index dabf1b4..483997d 100644
Binary files a/.vs/GBAPokemonGameEditor/v14/.suo and b/.vs/GBAPokemonGameEditor/v14/.suo differ
diff --git a/GBAPokemonGameEditor/AbilityEdit.vb b/GBAPokemonGameEditor/AbilityEdit.vb
index 4dd590a..3d77594 100644
--- a/GBAPokemonGameEditor/AbilityEdit.vb
+++ b/GBAPokemonGameEditor/AbilityEdit.vb
@@ -12,7 +12,7 @@
ListBox1.Items.Clear()
- While loopvar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfAbilities", "")) = True
+ While loopvar < (GetString(GetINIFileLocation(), header, "NumberOfAbilities", "")) = True
ListBox1.Items.Add(GetAbilityName(loopvar))
@@ -29,7 +29,7 @@
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
AbilityIndexTextBox.Text = ListBox1.SelectedIndex
- AbilityDesc = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "AbilityDescriptionTable", "")), System.Globalization.NumberStyles.HexNumber)
+ AbilityDesc = Int32.Parse((GetString(GetINIFileLocation(), header, "AbilityDescriptionTable", "")), System.Globalization.NumberStyles.HexNumber)
TextBox1.Text = GetAbilityName(ListBox1.SelectedIndex)
@@ -60,7 +60,7 @@
ListBox1.Items.Clear()
- While loopvar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfAbilities", "")) = True
+ While loopvar < (GetString(GetINIFileLocation(), header, "NumberOfAbilities", "")) = True
ListBox1.Items.Add(GetAbilityName(loopvar))
diff --git a/GBAPokemonGameEditor/AttackEditor.vb b/GBAPokemonGameEditor/AttackEditor.vb
index 2d1e92f..7a158ca 100644
--- a/GBAPokemonGameEditor/AttackEditor.vb
+++ b/GBAPokemonGameEditor/AttackEditor.vb
@@ -20,7 +20,7 @@
ComboBox3.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfAttacks", "")) + 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfAttacks", "")) + 1 = True
ComboBox3.Items.Add(GetAttackName(LoopVar))
@@ -38,9 +38,9 @@
Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox3.SelectedIndexChanged
Dim blah As Integer
Dim binarythebitch As String
- AttackDesc = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "AttackDescriptionTable", "")), System.Globalization.NumberStyles.HexNumber)
- AttackData = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "AttackData", "")), System.Globalization.NumberStyles.HexNumber)
- AttackAni = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "AttackAnimationTable", "")), System.Globalization.NumberStyles.HexNumber)
+ AttackDesc = Int32.Parse((GetString(GetINIFileLocation(), header, "AttackDescriptionTable", "")), System.Globalization.NumberStyles.HexNumber)
+ AttackData = Int32.Parse((GetString(GetINIFileLocation(), header, "AttackData", "")), System.Globalization.NumberStyles.HexNumber)
+ AttackAni = Int32.Parse((GetString(GetINIFileLocation(), header, "AttackAnimationTable", "")), System.Globalization.NumberStyles.HexNumber)
AnimationPointer.Text = Hex(Val("&H" & ReverseHEX(ReadHEX(LoadedROM, (AttackAni) + (ComboBox3.SelectedIndex * 4) + 4, 4))) - &H8000000)
@@ -151,8 +151,8 @@
TextBox12.Enabled = True
TextBox13.Enabled = True
Button5.Enabled = True
- ContestMoveData = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "ContestMoveData", "")), System.Globalization.NumberStyles.HexNumber)
- ContestMoveEffectData = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "ContestMoveEffectData", "")), System.Globalization.NumberStyles.HexNumber)
+ ContestMoveData = Int32.Parse((GetString(GetINIFileLocation(), header, "ContestMoveData", "")), System.Globalization.NumberStyles.HexNumber)
+ ContestMoveEffectData = Int32.Parse((GetString(GetINIFileLocation(), header, "ContestMoveEffectData", "")), System.Globalization.NumberStyles.HexNumber)
ComboBox4.SelectedIndex = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, ((ContestMoveData) + 8 + 0) + (ComboBox3.SelectedIndex * 8), 1)))), System.Globalization.NumberStyles.HexNumber)
@@ -202,7 +202,7 @@
ComboBox3.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfAttacks", "")) + 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfAttacks", "")) + 1 = True
ComboBox3.Items.Add(GetAttackName(LoopVar))
@@ -288,6 +288,7 @@
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
+
WriteHEX(LoadedROM, (AttackDesc) + (0) + (ComboBox3.SelectedIndex * 4), ReverseHEX(Hex(Int32.Parse(((TextBox6.Text)), System.Globalization.NumberStyles.HexNumber) + &H8000000)))
FileNum = FreeFile()
FileOpen(FileNum, LoadedROM, OpenMode.Binary)
diff --git a/GBAPokemonGameEditor/BattleFrontierEditor.vb b/GBAPokemonGameEditor/BattleFrontierEditor.vb
index c45c7d8..eda0b8e 100644
--- a/GBAPokemonGameEditor/BattleFrontierEditor.vb
+++ b/GBAPokemonGameEditor/BattleFrontierEditor.vb
@@ -18,8 +18,8 @@ Public Class BattleFrontierEditor
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
TextBox1.Text = GetBattleFrontierTrainerName(ListBox1.SelectedIndex)
- 'ComboBox1.SelectedIndex = CInt("&H" & (ReverseHEX(ReadHEX(LoadedROM, (GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")) + (52 * ListBox1.SelectedIndex), 1))))
- TextBox2.Text = Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)
+ 'ComboBox1.SelectedIndex = CInt("&H" & (ReverseHEX(ReadHEX(LoadedROM, (GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")) + (52 * ListBox1.SelectedIndex), 1))))
+ TextBox2.Text = Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)
ListBox3.Items.Clear()
@@ -31,7 +31,7 @@ Public Class BattleFrontierEditor
While curbytes <> "FFFF"
- ListBox3.Items.Add((Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber)) & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber) * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
+ ListBox3.Items.Add((Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber)) & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber) * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
counter = counter + 1
@@ -50,7 +50,7 @@ Public Class BattleFrontierEditor
ListBox1.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfBattleFrontierTrainers", "")) = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfBattleFrontierTrainers", "")) = True
ListBox1.Items.Add(GetBattleFrontierTrainerName(LoopVar))
@@ -64,7 +64,7 @@ Public Class BattleFrontierEditor
ComboBox1.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfTrainerClasses", "")) + 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfTrainerClasses", "")) + 1 = True
ComboBox1.Items.Add(GetTrainerClass(LoopVar))
@@ -78,17 +78,17 @@ Public Class BattleFrontierEditor
ListBox2.Items.Clear()
ComboBox8.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfBattleFrontierPokemon", "")) = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfBattleFrontierPokemon", "")) = True
- ListBox2.Items.Add(LoopVar & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", "")), System.Globalization.NumberStyles.HexNumber)) + (LoopVar * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
- ComboBox8.Items.Add(LoopVar & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", "")), System.Globalization.NumberStyles.HexNumber)) + (LoopVar * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
+ ListBox2.Items.Add(LoopVar & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", "")), System.Globalization.NumberStyles.HexNumber)) + (LoopVar * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
+ ComboBox8.Items.Add(LoopVar & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", "")), System.Globalization.NumberStyles.HexNumber)) + (LoopVar * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
LoopVar = LoopVar + 1
End While
LoopVar = 0
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfPokemon", "")) - 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfPokemon", "")) - 1 = True
LoopVar = LoopVar + 1
@@ -104,7 +104,7 @@ Public Class BattleFrontierEditor
ComboBox6.Items.Clear()
ComboBox7.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfAttacks", "")) + 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfAttacks", "")) + 1 = True
ComboBox4.Items.Add(GetAttackName(LoopVar))
@@ -122,10 +122,10 @@ Public Class BattleFrontierEditor
ComboBox3.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfBattlefrontierHeldItems", "")) + 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfBattlefrontierHeldItems", "")) + 1 = True
- ComboBox3.Items.Add(GetItemName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierHeldItems", "")), System.Globalization.NumberStyles.HexNumber)) + (LoopVar * 2)), 2))), System.Globalization.NumberStyles.HexNumber)))
+ ComboBox3.Items.Add(GetItemName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, ((Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierHeldItems", "")), System.Globalization.NumberStyles.HexNumber)) + (LoopVar * 2)), 2))), System.Globalization.NumberStyles.HexNumber)))
@@ -137,15 +137,15 @@ Public Class BattleFrontierEditor
End Sub
Private Sub ListBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox2.SelectedIndexChanged
'species
- ComboBox2.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16)), 2))), System.Globalization.NumberStyles.HexNumber) - 1
+ ComboBox2.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16)), 2))), System.Globalization.NumberStyles.HexNumber) - 1
'attacks
- ComboBox4.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 2), 2))), System.Globalization.NumberStyles.HexNumber) - 1
- ComboBox5.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 4), 2))), System.Globalization.NumberStyles.HexNumber) - 1
- ComboBox6.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 6), 2))), System.Globalization.NumberStyles.HexNumber) - 1
- ComboBox7.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 8), 2))), System.Globalization.NumberStyles.HexNumber) - 1
+ ComboBox4.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 2), 2))), System.Globalization.NumberStyles.HexNumber) - 1
+ ComboBox5.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 4), 2))), System.Globalization.NumberStyles.HexNumber) - 1
+ ComboBox6.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 6), 2))), System.Globalization.NumberStyles.HexNumber) - 1
+ ComboBox7.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 8), 2))), System.Globalization.NumberStyles.HexNumber) - 1
'items
- ComboBox3.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 10), 1))), System.Globalization.NumberStyles.HexNumber)
+ ComboBox3.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 10), 1))), System.Globalization.NumberStyles.HexNumber)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
@@ -159,7 +159,7 @@ Public Class BattleFrontierEditor
ListBox1.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfBattleFrontierTrainers", "")) = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfBattleFrontierTrainers", "")) = True
ListBox1.Items.Add(GetBattleFrontierTrainerName(LoopVar))
@@ -174,9 +174,9 @@ Public Class BattleFrontierEditor
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- WriteHEX(LoadedROM, Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), ReverseHEX(Hex((Int32.Parse((TextBox2.Text), System.Globalization.NumberStyles.HexNumber)) + &H8000000)))
+ WriteHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), ReverseHEX(Hex((Int32.Parse((TextBox2.Text), System.Globalization.NumberStyles.HexNumber)) + &H8000000)))
- TextBox2.Text = Hex(((Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))), System.Globalization.NumberStyles.HexNumber))) - &H8000000)
+ TextBox2.Text = Hex(((Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))), System.Globalization.NumberStyles.HexNumber))) - &H8000000)
ListBox3.Items.Clear()
@@ -188,7 +188,7 @@ Public Class BattleFrontierEditor
While curbytes <> "FFFF"
- ListBox3.Items.Add((Val("&H" & curbytes)) & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber) * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
+ ListBox3.Items.Add((Val("&H" & curbytes)) & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber) * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
counter = counter + 1
@@ -200,7 +200,7 @@ Public Class BattleFrontierEditor
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- ListBox2.SelectedIndex = Val("&H" & (ReverseHEX(ReadHEX(LoadedROM, ("&H" & Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)) + (ListBox3.SelectedIndex * 2), 2))))
+ ListBox2.SelectedIndex = Val("&H" & (ReverseHEX(ReadHEX(LoadedROM, ("&H" & Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)) + (ListBox3.SelectedIndex * 2), 2))))
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
@@ -208,8 +208,8 @@ Public Class BattleFrontierEditor
End Sub
Private Sub ListBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox3.SelectedIndexChanged
- GetAndDrawAnimationPokemonPic(PictureBox2, (Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + ((Val("&H" & (ReverseHEX(ReadHEX(LoadedROM, ("&H" & Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)) + (ListBox3.SelectedIndex * 2), 2))))) * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
- ComboBox8.SelectedIndex = Val("&H" & (ReverseHEX(ReadHEX(LoadedROM, ("&H" & Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)) + (ListBox3.SelectedIndex * 2), 2))))
+ GetAndDrawAnimationPokemonPic(PictureBox2, (Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + ((Val("&H" & (ReverseHEX(ReadHEX(LoadedROM, ("&H" & Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)) + (ListBox3.SelectedIndex * 2), 2))))) * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
+ ComboBox8.SelectedIndex = Val("&H" & (ReverseHEX(ReadHEX(LoadedROM, ("&H" & Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)) + (ListBox3.SelectedIndex * 2), 2))))
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
@@ -217,8 +217,8 @@ Public Class BattleFrontierEditor
indexmemory = ListBox3.SelectedIndex
- WriteHEX(LoadedROM, ("&H" & Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)) + (ListBox3.SelectedIndex * 2), ReverseHEX(VB.Right("0000" & Hex(ComboBox8.SelectedIndex), 4)))
- TextBox2.Text = Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)
+ WriteHEX(LoadedROM, ("&H" & Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)) + (ListBox3.SelectedIndex * 2), ReverseHEX(VB.Right("0000" & Hex(ComboBox8.SelectedIndex), 4)))
+ TextBox2.Text = Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)
ListBox3.Items.Clear()
Dim curbytes As String
@@ -229,7 +229,7 @@ Public Class BattleFrontierEditor
While curbytes <> "FFFF"
- ListBox3.Items.Add((Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber)) & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber) * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
+ ListBox3.Items.Add((Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber)) & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber) * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
counter = counter + 1
@@ -251,30 +251,30 @@ Public Class BattleFrontierEditor
indexmemory2 = ComboBox8.SelectedIndex
indexmemory3 = ListBox3.SelectedIndex
- WriteHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16)), ReverseHEX(VB.Right("0000" & Hex(ComboBox2.SelectedIndex + 1), 4)))
+ WriteHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16)), ReverseHEX(VB.Right("0000" & Hex(ComboBox2.SelectedIndex + 1), 4)))
- WriteHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 10), Hex(ComboBox3.SelectedIndex))
+ WriteHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 10), Hex(ComboBox3.SelectedIndex))
- WriteHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 2), ReverseHEX(VB.Right("0000" & Hex(ComboBox4.SelectedIndex + 1), 4)))
- WriteHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 4), ReverseHEX(VB.Right("0000" & Hex(ComboBox5.SelectedIndex + 1), 4)))
- WriteHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 6), ReverseHEX(VB.Right("0000" & Hex(ComboBox6.SelectedIndex + 1), 4)))
- WriteHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 8), ReverseHEX(VB.Right("0000" & Hex(ComboBox7.SelectedIndex + 1), 4)))
+ WriteHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 2), ReverseHEX(VB.Right("0000" & Hex(ComboBox4.SelectedIndex + 1), 4)))
+ WriteHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 4), ReverseHEX(VB.Right("0000" & Hex(ComboBox5.SelectedIndex + 1), 4)))
+ WriteHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 6), ReverseHEX(VB.Right("0000" & Hex(ComboBox6.SelectedIndex + 1), 4)))
+ WriteHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (ListBox2.SelectedIndex * 16) + 8), ReverseHEX(VB.Right("0000" & Hex(ComboBox7.SelectedIndex + 1), 4)))
'Everything past here loads stuff
- LoopVar = 0
+ loopvar = 0
ListBox2.Items.Clear()
ComboBox8.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfBattleFrontierPokemon", "")) = True
+ While loopvar < (GetString(GetINIFileLocation(), header, "NumberOfBattleFrontierPokemon", "")) = True
- ListBox2.Items.Add(loopvar & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (loopvar * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
- ComboBox8.Items.Add(loopvar & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (loopvar * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
+ ListBox2.Items.Add(loopvar & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (loopvar * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
+ ComboBox8.Items.Add(loopvar & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (loopvar * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
- LoopVar = LoopVar + 1
+ loopvar = LoopVar + 1
End While
- TextBox2.Text = Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)
+ TextBox2.Text = Hex((("&H" & (ReverseHEX(ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber) + ((52 * ListBox1.SelectedIndex) + 48), 4))))) - &H8000000)
ListBox3.Items.Clear()
@@ -286,7 +286,7 @@ Public Class BattleFrontierEditor
While curbytes <> "FFFF"
- ListBox3.Items.Add((Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber)) & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber) * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
+ ListBox3.Items.Add((Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber)) & " - " & GetPokemonName(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (Int32.Parse(((GetString(GetINIFileLocation(), header, "BattleFrontierPokemon", ""))), System.Globalization.NumberStyles.HexNumber) + (Int32.Parse((curbytes), System.Globalization.NumberStyles.HexNumber) * 16)), 2))), System.Globalization.NumberStyles.HexNumber)))
counter = counter + 1
diff --git a/GBAPokemonGameEditor/ChangeNameFunctions.vb b/GBAPokemonGameEditor/ChangeNameFunctions.vb
index d919592..2478278 100644
--- a/GBAPokemonGameEditor/ChangeNameFunctions.vb
+++ b/GBAPokemonGameEditor/ChangeNameFunctions.vb
@@ -6,7 +6,7 @@ Module ChangeNameFunctions
Public Function ChangePokedexTypeName(ByVal Index As Integer, ByVal NewName As String)
Dim offvar As Long
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber)
If header3 = "J" Then
@@ -48,7 +48,7 @@ Module ChangeNameFunctions
Public Function ChangePokemonName(ByVal Index As Integer, ByVal NewName As String)
Dim offvar As Long
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokemonNames", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonNames", "")), System.Globalization.NumberStyles.HexNumber)
If header3 = "J" Then
@@ -71,7 +71,7 @@ Module ChangeNameFunctions
Public Function ChangeAttackName(ByVal Index As Integer, ByVal NewName As String)
Dim offvar As Integer
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "AttackNames", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "AttackNames", "")), System.Globalization.NumberStyles.HexNumber)
If header3 = "J" Then
@@ -94,7 +94,7 @@ Module ChangeNameFunctions
Public Function ChangeAbilityName(ByVal Index As Integer, ByVal NewName As String)
Dim offvar As Long
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "AbilityNames", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "AbilityNames", "")), System.Globalization.NumberStyles.HexNumber)
If header3 = "J" Then
@@ -117,7 +117,7 @@ Module ChangeNameFunctions
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)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "ItemData", "")), System.Globalization.NumberStyles.HexNumber)
If header3 = "J" Then
@@ -140,7 +140,7 @@ Module ChangeNameFunctions
Public Function ChangeBattleFrontierTrainerName(ByVal Index As Integer, ByVal NewName As String)
Dim offvar As Long
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber)
If header2 = "BPE" Then
If header3 = "J" Then
diff --git a/GBAPokemonGameEditor/GetImageFunctions.vb b/GBAPokemonGameEditor/GetImageFunctions.vb
index 3bf06dd..8580259 100644
--- a/GBAPokemonGameEditor/GetImageFunctions.vb
+++ b/GBAPokemonGameEditor/GetImageFunctions.vb
@@ -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)
- Dim pOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) + 4
+ Dim sOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8)
+ Dim pOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) + 4
Dim Temp(&HFFF) As Byte
Dim Image(&HFFFF) As Byte
Dim Palette15(&HFFF) As Byte
@@ -160,8 +160,8 @@ Module GetImageFunctions
End Sub
Public Sub GetAndDrawFrontPokemonPic(ByVal picBox As PictureBox, ByVal index As Integer)
- Dim sOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "PokemonFrontSprites", ""), 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, "PokemonNormalPal", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
+ Dim sOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "PokemonFrontSprites", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon front sprites, + 8 = Bulbasaur.
+ Dim pOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "PokemonNormalPal", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
Dim Temp(&HFFF) As Byte
Dim Image(&HFFFF) As Byte
Dim Palette15(&HFFF) As Byte
@@ -194,8 +194,8 @@ Module GetImageFunctions
End Sub
Public Sub GetAndDrawBackPokemonPic(ByVal picBox As PictureBox, ByVal index As Integer)
- Dim sOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "PokemonBackSprites", ""), 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, "PokemonShinyPal", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
+ Dim sOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "PokemonBackSprites", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon front sprites, + 8 = Bulbasaur.
+ Dim pOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "PokemonShinyPal", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
Dim Temp(&HFFF) As Byte
Dim Image(&HFFFF) As Byte
Dim Palette15(&HFFF) As Byte
@@ -228,8 +228,8 @@ Module GetImageFunctions
End Sub
Public Sub GetAndDrawAnimationPokemonPic(ByVal picBox As PictureBox, ByVal index As Integer)
- Dim sOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "PokemonAnimations", ""), 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, "PokemonNormalPal", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
+ Dim sOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "PokemonAnimations", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon front sprites, + 8 = Bulbasaur.
+ Dim pOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "PokemonNormalPal", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
Dim Temp(&HFFF) As Byte
Dim Image(&HFFFF) As Byte
Dim Palette15(&HFFF) As Byte
@@ -262,8 +262,8 @@ Module GetImageFunctions
End Sub
Public Sub GetAndDrawShadowAnimationPokemonPic(ByVal picBox As PictureBox, ByVal index As Integer)
- Dim sOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ShadowFronts", ""), 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, "ShadowPals", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
+ Dim sOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "ShadowFronts", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon front sprites, + 8 = Bulbasaur.
+ Dim pOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "ShadowPals", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
Dim Temp(&HFFF) As Byte
Dim Image(&HFFFF) As Byte
Dim Palette15(&HFFF) As Byte
@@ -296,8 +296,8 @@ Module GetImageFunctions
End Sub
Public Sub GetAndDrawBackShadowPokemonPic(ByVal picBox As PictureBox, ByVal index As Integer)
- Dim sOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ShadowBacks", ""), 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, "ShadowPals", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
+ Dim sOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "ShadowBacks", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon front sprites, + 8 = Bulbasaur.
+ Dim pOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "ShadowPals", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
Dim Temp(&HFFF) As Byte
Dim Image(&HFFFF) As Byte
Dim Palette15(&HFFF) As Byte
@@ -330,8 +330,8 @@ Module GetImageFunctions
End Sub
Public Sub GetAndDrawShadowFrontPokemonPic(ByVal picBox As PictureBox, ByVal index As Integer)
- Dim sOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ShadowFronts", ""), 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, "ShadowPals", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
+ Dim sOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "ShadowFronts", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon front sprites, + 8 = Bulbasaur.
+ Dim pOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "ShadowPals", ""), System.Globalization.NumberStyles.HexNumber) + (index * 8) 'Pointer to Pokemon normal palettes, + 8 = Bulbasaur.
Dim Temp(&HFFF) As Byte
Dim Image(&HFFFF) As Byte
Dim Palette15(&HFFF) As Byte
@@ -432,8 +432,8 @@ ErrorHandle:
End Function
Public Sub GetAndDrawPokemonIconPic(ByVal picBox As PictureBox, ByVal index As Integer, ByVal palindex As Integer)
- Dim sOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "IconPointerTable", ""), System.Globalization.NumberStyles.HexNumber) + (4 + (index * 4))
- Dim pOffset As Integer = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "IconPals", ""), System.Globalization.NumberStyles.HexNumber) + (palindex * 32)
+ Dim sOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "IconPointerTable", ""), System.Globalization.NumberStyles.HexNumber) + (4 + (index * 4))
+ Dim pOffset As Integer = Int32.Parse(GetString(GetINIFileLocation(), header, "IconPals", ""), System.Globalization.NumberStyles.HexNumber) + (palindex * 32)
Dim Temp(&HFFF) As Byte
Dim Image(&HFFFF) As Byte
Dim Palette15(&HFFF) As Byte
diff --git a/GBAPokemonGameEditor/GetNameFunctions.vb b/GBAPokemonGameEditor/GetNameFunctions.vb
index f40f6f5..4bb85c5 100644
--- a/GBAPokemonGameEditor/GetNameFunctions.vb
+++ b/GBAPokemonGameEditor/GetNameFunctions.vb
@@ -6,7 +6,7 @@ Module GetNameFunctions
Public Function GetAbilityName(ByVal Index As Integer)
Dim offvar As Integer
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "AbilityNames", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "AbilityNames", "")), System.Globalization.NumberStyles.HexNumber)
If header3 = "J" Then
@@ -29,7 +29,7 @@ Module GetNameFunctions
Public Function GetItemName(ByVal Index As Integer)
Dim offvar As Integer
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "ItemData", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "ItemData", "")), System.Globalization.NumberStyles.HexNumber)
If header3 = "J" Then
@@ -52,7 +52,7 @@ Module GetNameFunctions
Public Function GetPokemonName(ByVal Index As Integer)
Dim offvar As Integer
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokemonNames", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonNames", "")), System.Globalization.NumberStyles.HexNumber)
If header3 = "J" Then
@@ -84,7 +84,7 @@ Module GetNameFunctions
Public Function GetMapLabelName(ByVal Index As Integer) As String
Dim offvar As Integer
Dim stringvar As String
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "MapLabelData", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "MapLabelData", "")), System.Globalization.NumberStyles.HexNumber)
If header2 = "BPR" Or header2 = "BPG" Then
offvar = "&H" & Hex(Val("&H" & ReverseHEX(ReadHEX(LoadedROM, offvar + (4 * Index), 4))) - &H8000000)
@@ -119,7 +119,7 @@ Module GetNameFunctions
Public Function GetAttackName(ByVal Index As Integer)
Dim offvar As Integer
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "AttackNames", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "AttackNames", "")), System.Globalization.NumberStyles.HexNumber)
If header3 = "J" Then
@@ -142,7 +142,7 @@ Module GetNameFunctions
Public Function GetBattleFrontierTrainerName(ByVal Index As Integer) As String
Dim offvar As Integer
Dim stringvar As String
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "BattleFrontierTrainers", "")), System.Globalization.NumberStyles.HexNumber)
If header2 = "BPE" Then
If header3 = "J" Then
@@ -175,7 +175,7 @@ Module GetNameFunctions
Public Function GetTrainerClass(ByVal Index As Integer)
Dim offvar As Integer
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "TrainerClasses", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "TrainerClasses", "")), System.Globalization.NumberStyles.HexNumber)
If header3 = "J" Then
@@ -198,7 +198,7 @@ Module GetNameFunctions
Public Function GetPokedexTypeName(ByVal Index As Integer)
Dim offvar As Integer
- offvar = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber)
+ offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber)
If header3 = "J" Then
diff --git a/GBAPokemonGameEditor/ItemEditor.vb b/GBAPokemonGameEditor/ItemEditor.vb
index 74d9677..03a0370 100644
--- a/GBAPokemonGameEditor/ItemEditor.vb
+++ b/GBAPokemonGameEditor/ItemEditor.vb
@@ -18,7 +18,7 @@ Public Class ItemEditor
ItmPlPntrTextBox.Enabled = True
ItmRpntBttn.Enabled = True
- ItemPicDataOff = Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber)
+ ItemPicDataOff = Int32.Parse(GetString(GetINIFileLocation(), header, "ItemIMGData", ""), System.Globalization.NumberStyles.HexNumber)
Else
@@ -28,7 +28,7 @@ Public Class ItemEditor
End If
- ItemBaseOff = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "ItemData", "")), System.Globalization.NumberStyles.HexNumber)
+ ItemBaseOff = Int32.Parse((GetString(GetINIFileLocation(), header, "ItemData", "")), System.Globalization.NumberStyles.HexNumber)
Dim LoopVar As Integer
@@ -37,7 +37,7 @@ Public Class ItemEditor
ItemListComboBox.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfItems", "")) = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfItems", "")) = True
ItemListComboBox.Items.Add(GetItemName(LoopVar))
LoopVar = LoopVar + 1
@@ -128,7 +128,7 @@ Public Class ItemEditor
ItemListComboBox.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfItems", "")) = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfItems", "")) = True
ItemListComboBox.Items.Add(GetItemName(LoopVar))
LoopVar = LoopVar + 1
diff --git a/GBAPokemonGameEditor/MainFrm.vb b/GBAPokemonGameEditor/MainFrm.vb
index 216615a..b0cc3c4 100644
--- a/GBAPokemonGameEditor/MainFrm.vb
+++ b/GBAPokemonGameEditor/MainFrm.vb
@@ -310,6 +310,8 @@ Public Class MainFrm
header3 = Mid(header, 4, 1)
FileClose(FileNum)
+ 'MsgBox(GetINIFileLocation())
+
If header2 = "BPR" Or header2 = "BPG" Or header2 = "BPE" Or header2 = "AXP" Or header2 = "AXV" Then
If header3 = "J" Then
Label2.Text = ""
@@ -326,7 +328,7 @@ Public Class MainFrm
MessageBox.Show("I haven't added Jap support out of pure lazziness. I will though if it get's highly Demanded.")
Else
- Label2.Text = header & " - " & GetString(AppPath & "ini\roms.ini", header, "ROMName", "")
+ Label2.Text = header & " - " & GetString(GetINIFileLocation(), header, "ROMName", "")
Button5.Enabled = True
Button6.Enabled = True
@@ -362,23 +364,6 @@ Public Class MainFrm
OpenToolStripMenuItem.PerformClick()
End Sub
- Private Sub UpdateRomsiniToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
-
- Dim result1 As DialogResult = MessageBox.Show("Download and replace your current roms.ini?", "Update?", MessageBoxButtons.YesNo)
-
- If result1 = DialogResult.Yes Then
- Dim wc As New WebClient
- wc.DownloadFile("http://gamer2020.0xrh.net/programs/GBAPokemonGameEditor/ini.zip", "ini.zip")
-
- 'ExtractArchive(AppPath & "ini.zip", AppPath)
-
- System.IO.File.Delete(AppPath & "ini.zip")
-
- MessageBox.Show("roms.ini updated!")
-
- End If
- End Sub
-
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
End
End Sub
diff --git a/GBAPokemonGameEditor/PokedexDataEditor.vb b/GBAPokemonGameEditor/PokedexDataEditor.vb
index 4d77ce0..c958735 100644
--- a/GBAPokemonGameEditor/PokedexDataEditor.vb
+++ b/GBAPokemonGameEditor/PokedexDataEditor.vb
@@ -67,11 +67,11 @@ Public Class PokedexDataEditor
ListBox1.Items.Clear()
- offset1 = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber)
+ offset1 = Int32.Parse((GetString(GetINIFileLocation(), header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber)
Dim varloop As Integer = 0
- While varloop < (GetString(AppPath & "ini\roms.ini", header, "NumberOfDexEntries", ""))
+ While varloop < (GetString(GetINIFileLocation(), header, "NumberOfDexEntries", ""))
ListBox1.Items.Add(VB.Right("0000" & (varloop), 4) & ". " & GetPokedexTypeName(varloop))
@@ -156,7 +156,7 @@ Public Class PokedexDataEditor
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
i = ListBox1.SelectedIndex
- offset1 = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber)
+ offset1 = Int32.Parse((GetString(GetINIFileLocation(), header, "PokedexData", "")), System.Globalization.NumberStyles.HexNumber)
If header2 = "AXP" Or header2 = "AXV" Then
@@ -194,7 +194,7 @@ Public Class PokedexDataEditor
Dim varloop As Integer = 0
- While varloop < (GetString(AppPath & "ini\roms.ini", header, "NumberOfDexEntries", ""))
+ While varloop < (GetString(GetINIFileLocation(), header, "NumberOfDexEntries", ""))
ListBox1.Items.Add(VB.Right("0000" & (varloop), 4) & ". " & GetPokedexTypeName(varloop))
diff --git a/GBAPokemonGameEditor/PokedexOrderEditor.vb b/GBAPokemonGameEditor/PokedexOrderEditor.vb
index af4c141..929ec3d 100644
--- a/GBAPokemonGameEditor/PokedexOrderEditor.vb
+++ b/GBAPokemonGameEditor/PokedexOrderEditor.vb
@@ -4,11 +4,10 @@ Public Class PokedexOrderEditor
Dim Offset1 As Integer
Dim Offset2 As Integer
Private Sub PokedexOrderEditor_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- ' MessageBox.Show((GetString(AppPath & "ini\roms.ini", header, "NumberOfPokemon", "")) - 2)
- Offset1 = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "NationalDexTable", "")), System.Globalization.NumberStyles.HexNumber)
+ Offset1 = Int32.Parse((GetString(GetINIFileLocation(), header, "NationalDexTable", "")), System.Globalization.NumberStyles.HexNumber)
- Offset2 = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "SecondDexTable", "")), System.Globalization.NumberStyles.HexNumber)
+ Offset2 = Int32.Parse((GetString(GetINIFileLocation(), header, "SecondDexTable", "")), System.Globalization.NumberStyles.HexNumber)
Dim LoopVar As Integer
@@ -16,7 +15,7 @@ Public Class PokedexOrderEditor
LoopVar = 0
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfPokemon", "")) - 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfPokemon", "")) - 1 = True
LoopVar = LoopVar + 1
diff --git a/GBAPokemonGameEditor/Pokemonedit.vb b/GBAPokemonGameEditor/Pokemonedit.vb
index de1faca..f236ec9 100644
--- a/GBAPokemonGameEditor/Pokemonedit.vb
+++ b/GBAPokemonGameEditor/Pokemonedit.vb
@@ -44,9 +44,9 @@ Public Class Pokemonedit
EvoTypes.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfEvolutionTypes", "") + 1) = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfEvolutionTypes", "") + 1) = True
- EvoTypes.Items.Add(GetString(AppPath & "ini\roms.ini", header, "EvolutionName" & LoopVar, ""))
+ EvoTypes.Items.Add(GetString(GetINIFileLocation(), header, "EvolutionName" & LoopVar, ""))
LoopVar = LoopVar + 1
@@ -56,7 +56,7 @@ Public Class Pokemonedit
EvoSlots.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfEvolutionsPerPokemon", "")) = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfEvolutionsPerPokemon", "")) = True
LoopVar = LoopVar + 1
@@ -68,7 +68,7 @@ Public Class Pokemonedit
NewAt.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfAttacks", "")) + 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfAttacks", "")) + 1 = True
NewAt.Items.Add(GetAttackName(LoopVar))
@@ -83,7 +83,7 @@ Public Class Pokemonedit
PKMNames.Items.Clear()
EvoPKMNames.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfPokemon", "")) - 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfPokemon", "")) - 1 = True
LoopVar = LoopVar + 1
@@ -99,7 +99,7 @@ Public Class Pokemonedit
Item2.Items.Clear()
EvoItem.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfItems", "")) = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfItems", "")) = True
Item1.Items.Add(GetItemName(LoopVar))
Item2.Items.Add(GetItemName(LoopVar))
EvoItem.Items.Add(GetItemName(LoopVar))
@@ -115,7 +115,7 @@ Public Class Pokemonedit
Ab1.Items.Clear()
Ab2.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfAbilities", "")) = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfAbilities", "")) = True
Ab1.Items.Add(GetAbilityName(LoopVar))
Ab2.Items.Add(GetAbilityName(LoopVar))
@@ -137,7 +137,7 @@ Public Class Pokemonedit
Private Sub Baseload()
- baseoff = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokemonData", "")), System.Globalization.NumberStyles.HexNumber)
+ baseoff = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonData", "")), System.Globalization.NumberStyles.HexNumber)
HpBase.Text = Int32.Parse(((ReadHEX(LoadedROM, (baseoff) + 28 + (i * 28), 1))), System.Globalization.NumberStyles.HexNumber)
AtBase.Text = Int32.Parse(((ReadHEX(LoadedROM, ((baseoff) + 28 + 1) + (i * 28), 1))), System.Globalization.NumberStyles.HexNumber)
@@ -583,15 +583,15 @@ Public Class Pokemonedit
Private Sub MediaLoad()
- FrontSpritePointers = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokemonFrontSprites", "")), System.Globalization.NumberStyles.HexNumber)
- BackSpritePointers = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokemonBackSprites", "")), System.Globalization.NumberStyles.HexNumber)
- NormalPalPointers = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokemonNormalPal", "")), System.Globalization.NumberStyles.HexNumber)
- ShinyPalPointers = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokemonShinyPal", "")), System.Globalization.NumberStyles.HexNumber)
- IconPointers = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "IconPointerTable", "")), System.Globalization.NumberStyles.HexNumber)
- IconPalTable = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "IconPalTable", "")), System.Globalization.NumberStyles.HexNumber)
- FootPrintTable = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "FootPrintTable", "")), System.Globalization.NumberStyles.HexNumber)
- CryTable = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "CryTable", "")), System.Globalization.NumberStyles.HexNumber)
- CryTable2 = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "CryConversionTable", "")), System.Globalization.NumberStyles.HexNumber)
+ FrontSpritePointers = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonFrontSprites", "")), System.Globalization.NumberStyles.HexNumber)
+ BackSpritePointers = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonBackSprites", "")), System.Globalization.NumberStyles.HexNumber)
+ NormalPalPointers = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonNormalPal", "")), System.Globalization.NumberStyles.HexNumber)
+ ShinyPalPointers = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonShinyPal", "")), System.Globalization.NumberStyles.HexNumber)
+ IconPointers = Int32.Parse((GetString(GetINIFileLocation(), header, "IconPointerTable", "")), System.Globalization.NumberStyles.HexNumber)
+ IconPalTable = Int32.Parse((GetString(GetINIFileLocation(), header, "IconPalTable", "")), System.Globalization.NumberStyles.HexNumber)
+ FootPrintTable = Int32.Parse((GetString(GetINIFileLocation(), header, "FootPrintTable", "")), System.Globalization.NumberStyles.HexNumber)
+ CryTable = Int32.Parse((GetString(GetINIFileLocation(), header, "CryTable", "")), System.Globalization.NumberStyles.HexNumber)
+ CryTable2 = Int32.Parse((GetString(GetINIFileLocation(), header, "CryConversionTable", "")), System.Globalization.NumberStyles.HexNumber)
FrontPointer.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (FrontSpritePointers) + (8) + (i * 8), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
BackPointer.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (BackSpritePointers) + (8) + (i * 8), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
@@ -642,7 +642,7 @@ Public Class Pokemonedit
Button2.Enabled = True
AnimationPointer.Enabled = True
- AnimationPointers = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokemonAnimations", "")), System.Globalization.NumberStyles.HexNumber)
+ 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)
@@ -693,7 +693,7 @@ Public Class Pokemonedit
Private Sub EvoSlots_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EvoSlots.SelectedIndexChanged
Dim loopy As Integer = 0
- EvoData = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokemonEvolutions", "")), System.Globalization.NumberStyles.HexNumber)
+ EvoData = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonEvolutions", "")), System.Globalization.NumberStyles.HexNumber)
@@ -729,7 +729,7 @@ Public Class Pokemonedit
'This will enable the right stuff
- If (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "none" Then
+ If (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "none" Then
EvoPKMNames.Enabled = False
EvoItem.Enabled = False
@@ -739,14 +739,14 @@ Public Class Pokemonedit
EvoLevel.Text = ""
EvoPKMNames.SelectedIndex = -1
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "evolvesbutnoparms" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "evolvesbutnoparms" Then
EvoPKMNames.SelectedIndex = -1
EvoPKMNames.SelectedIndex = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), 2)))), System.Globalization.NumberStyles.HexNumber) - 1
EvoPKMNames.Enabled = True
EvoLevel.Enabled = False
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "level" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "level" Then
EvoLevel.Text = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, (EvoData) + (40) + (2) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), 2)))), System.Globalization.NumberStyles.HexNumber)
@@ -755,7 +755,7 @@ Public Class Pokemonedit
EvoPKMNames.Enabled = True
EvoLevel.Enabled = True
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "item" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "item" Then
EvoItem.SelectedIndex = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, (EvoData) + (40) + (2) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), 2)))), System.Globalization.NumberStyles.HexNumber)
EvoPKMNames.SelectedIndex = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), 2)))), System.Globalization.NumberStyles.HexNumber) - 1
@@ -763,7 +763,7 @@ Public Class Pokemonedit
EvoItem.Enabled = True
EvoLevel.Enabled = False
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "attack" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "attack" Then
EvoPKMNames.SelectedIndex = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), 2)))), System.Globalization.NumberStyles.HexNumber) - 1
EvoPKMNames.Enabled = True
@@ -771,7 +771,7 @@ Public Class Pokemonedit
ComboBox3.SelectedIndex = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, (EvoData) + (40) + (2) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), 2)))), System.Globalization.NumberStyles.HexNumber)
ComboBox3.Enabled = True
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "mapname" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "mapname" Then
EvoPKMNames.SelectedIndex = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), 2)))), System.Globalization.NumberStyles.HexNumber) - 1
EvoPKMNames.Enabled = True
@@ -788,7 +788,7 @@ Public Class Pokemonedit
ComboBox2.Enabled = True
End If
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "species" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "species" Then
EvoPKMNames.SelectedIndex = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), 2)))), System.Globalization.NumberStyles.HexNumber) - 1
EvoPKMNames.Enabled = True
@@ -796,7 +796,7 @@ Public Class Pokemonedit
ComboBox1.SelectedIndex = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, (EvoData) + (40) + (2) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), 2)))), System.Globalization.NumberStyles.HexNumber)
ComboBox1.Enabled = True
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "bankandmap" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "bankandmap" Then
EvoPKMNames.SelectedIndex = Int32.Parse(((ReverseHEX(ReadHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), 2)))), System.Globalization.NumberStyles.HexNumber) - 1
EvoPKMNames.Enabled = True
@@ -842,35 +842,35 @@ Public Class Pokemonedit
Private Sub EvoSave()
- If (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "none" Then
+ If (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "none" Then
WriteHEX(LoadedROM, (EvoData) + (40) + (0) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), Hex(EvoTypes.SelectedIndex))
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "evolvesbutnoparms" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "evolvesbutnoparms" Then
WriteHEX(LoadedROM, (EvoData) + (40) + (0) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), Hex(EvoTypes.SelectedIndex))
WriteHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(VB.Right("0000" & Hex(Val(EvoPKMNames.SelectedIndex) + 1), 4)))
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "level" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "level" Then
WriteHEX(LoadedROM, (EvoData) + (40) + (0) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), Hex(EvoTypes.SelectedIndex))
WriteHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(VB.Right("0000" & Hex(Val(EvoPKMNames.SelectedIndex) + 1), 4)))
WriteHEX(LoadedROM, (EvoData) + (40) + (2) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(Hex(EvoLevel.Text)))
WriteHEX(LoadedROM, (EvoData) + (40) + (3) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(Hex("00")))
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "item" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "item" Then
WriteHEX(LoadedROM, (EvoData) + (40) + (0) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), Hex(EvoTypes.SelectedIndex))
WriteHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(VB.Right("0000" & Hex(Val(EvoPKMNames.SelectedIndex) + 1), 4)))
WriteHEX(LoadedROM, (EvoData) + (40) + (2) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(VB.Right("0000" & Hex(Val(EvoItem.SelectedIndex)), 4)))
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "attack" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "attack" Then
WriteHEX(LoadedROM, (EvoData) + (40) + (0) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), Hex(EvoTypes.SelectedIndex))
WriteHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(VB.Right("0000" & Hex(Val(EvoPKMNames.SelectedIndex) + 1), 4)))
WriteHEX(LoadedROM, (EvoData) + (40) + (2) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(VB.Right("0000" & Hex(Val(ComboBox3.SelectedIndex)), 4)))
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "mapname" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "mapname" Then
WriteHEX(LoadedROM, (EvoData) + (40) + (0) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), Hex(EvoTypes.SelectedIndex))
WriteHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(VB.Right("0000" & Hex(Val(EvoPKMNames.SelectedIndex) + 1), 4)))
@@ -885,13 +885,13 @@ Public Class Pokemonedit
End If
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "species" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "species" Then
WriteHEX(LoadedROM, (EvoData) + (40) + (0) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), Hex(EvoTypes.SelectedIndex))
WriteHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(VB.Right("0000" & Hex(Val(EvoPKMNames.SelectedIndex) + 1), 4)))
WriteHEX(LoadedROM, (EvoData) + (40) + (2) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(VB.Right("0000" & Hex(Val(ComboBox1.SelectedIndex)), 4)))
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "bankandmap" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "bankandmap" Then
WriteHEX(LoadedROM, (EvoData) + (40) + (0) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), Hex(EvoTypes.SelectedIndex))
WriteHEX(LoadedROM, (EvoData) + (40) + (4) + ((PKMNames.SelectedIndex) * 40) + (EvoSlots.SelectedIndex * 8), ReverseHEX(VB.Right("0000" & Hex(Val(EvoPKMNames.SelectedIndex) + 1), 4)))
@@ -1241,7 +1241,7 @@ Public Class Pokemonedit
Private Sub TMHMLoad()
Dim LoopVar As Integer
- TMHMAttacks = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "TMData", "")), System.Globalization.NumberStyles.HexNumber)
+ TMHMAttacks = Int32.Parse((GetString(GetINIFileLocation(), header, "TMData", "")), System.Globalization.NumberStyles.HexNumber)
TMHMCom.Items.Clear()
@@ -1302,7 +1302,7 @@ Public Class Pokemonedit
i = PKMNames.SelectedIndex
- TMHMCompoLoc = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "TMHMCompatibility", "")), System.Globalization.NumberStyles.HexNumber)
+ TMHMCompoLoc = Int32.Parse((GetString(GetINIFileLocation(), header, "TMHMCompatibility", "")), System.Globalization.NumberStyles.HexNumber)
Dim blah As Integer
Dim howmanyzeros As Integer
@@ -1569,7 +1569,7 @@ Public Class Pokemonedit
LoopVar = 0
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfPokemon", "")) - 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfPokemon", "")) - 1 = True
PKMNames.SelectedIndex = LoopVar
LoopVar = LoopVar + 1
@@ -1641,7 +1641,7 @@ Public Class Pokemonedit
WriteString((FolderBrowserDialog.SelectedPath & "\ExportedPGEPKMs\" & (LoopVar) & " - " & GetPokemonName(LoopVar) & ".pgepkm"), "Pokemon", "TMHM" & (LoopVarthing + 1), TMHMCom.GetItemChecked(LoopVarthing))
LoopVarthing = LoopVarthing + 1
End While
- ProgressBar.Value = (LoopVar / (GetString(AppPath & "ini\roms.ini", header, "NumberOfPokemon", ""))) * 100
+ ProgressBar.Value = (LoopVar / (GetString(GetINIFileLocation(), header, "NumberOfPokemon", ""))) * 100
End While
Me.Text = "Pokemon Editor"
@@ -1666,7 +1666,7 @@ Public Class Pokemonedit
'Dim loopme As Integer
If GetString(AppPath & "GBAPGESettings.ini", "Settings", "MoveTableHack", "0") = 0 Then
- AttackTable = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokemonAttackTable", "")), System.Globalization.NumberStyles.HexNumber)
+ AttackTable = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonAttackTable", "")), System.Globalization.NumberStyles.HexNumber)
LvlUpAttPointer.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (AttackTable) + (4) + (PKMNames.SelectedIndex * 4), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
@@ -1702,7 +1702,7 @@ Public Class Pokemonedit
If GetString(AppPath & "GBAPGESettings.ini", "Settings", "MoveTableHack", "0") = 1 Then
- AttackTable = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "PokemonAttackTable", "")), System.Globalization.NumberStyles.HexNumber)
+ AttackTable = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonAttackTable", "")), System.Globalization.NumberStyles.HexNumber)
LvlUpAttPointer.Text = Hex(Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, (AttackTable) + (4) + (PKMNames.SelectedIndex * 4), 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000)
@@ -1712,7 +1712,7 @@ Public Class Pokemonedit
Looper = 0
- While ReadHEX(LoadedROM, Int32.Parse((LvlUpAttPointer.Text), System.Globalization.NumberStyles.HexNumber) + (Looper * 3), 3) = GetString(AppPath & "ini\roms.ini", header, "JamboLearnableMovesTerm", "") = False
+ While ReadHEX(LoadedROM, Int32.Parse((LvlUpAttPointer.Text), System.Globalization.NumberStyles.HexNumber) + (Looper * 3), 3) = GetString(GetINIFileLocation(), header, "JamboLearnableMovesTerm", "") = False
lvl = Int32.Parse(((ReadHEX(LoadedROM, Int32.Parse((LvlUpAttPointer.Text), System.Globalization.NumberStyles.HexNumber) + (Looper * 3) + 2, 1))), System.Globalization.NumberStyles.HexNumber)
@@ -1771,7 +1771,7 @@ Public Class Pokemonedit
Looper = 0
- While ReadHEX(LoadedROM, Int32.Parse((LvlUpAttPointer.Text), System.Globalization.NumberStyles.HexNumber) + (Looper * 3), 3) = GetString(AppPath & "ini\roms.ini", header, "JamboLearnableMovesTerm", "") = False
+ While ReadHEX(LoadedROM, Int32.Parse((LvlUpAttPointer.Text), System.Globalization.NumberStyles.HexNumber) + (Looper * 3), 3) = GetString(GetINIFileLocation(), header, "JamboLearnableMovesTerm", "") = False
lvl = Int32.Parse(((ReadHEX(LoadedROM, Int32.Parse((LvlUpAttPointer.Text), System.Globalization.NumberStyles.HexNumber) + (Looper * 3) + 2, 1))), System.Globalization.NumberStyles.HexNumber)
@@ -1806,7 +1806,7 @@ Public Class Pokemonedit
LoopVar = 0
If header2 = "BPE" Then
- MTattacks = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "MoveTutorAttacks", "")), System.Globalization.NumberStyles.HexNumber)
+ MTattacks = Int32.Parse((GetString(GetINIFileLocation(), header, "MoveTutorAttacks", "")), System.Globalization.NumberStyles.HexNumber)
MTCom.Enabled = True
While LoopVar < 32
@@ -1815,7 +1815,7 @@ Public Class Pokemonedit
End While
ElseIf header2 = "BPR" Or header2 = "BPE" Then
- MTattacks = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "MoveTutorAttacks", "")), System.Globalization.NumberStyles.HexNumber)
+ MTattacks = Int32.Parse((GetString(GetINIFileLocation(), header, "MoveTutorAttacks", "")), System.Globalization.NumberStyles.HexNumber)
MTCom.Enabled = True
@@ -1838,7 +1838,7 @@ Public Class Pokemonedit
Dim curchar As String
If header2 = "BPE" Then
- MTCompoLoc = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "MoveTutorCompatibility", "")), System.Globalization.NumberStyles.HexNumber)
+ MTCompoLoc = Int32.Parse((GetString(GetINIFileLocation(), header, "MoveTutorCompatibility", "")), System.Globalization.NumberStyles.HexNumber)
For emloop = 0 To 1
@@ -1869,7 +1869,7 @@ Public Class Pokemonedit
Next emloop
ElseIf header2 = "BPR" Or header2 = "BPG" Then
- MTCompoLoc = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "MoveTutorCompatibility", "")), System.Globalization.NumberStyles.HexNumber)
+ MTCompoLoc = Int32.Parse((GetString(GetINIFileLocation(), header, "MoveTutorCompatibility", "")), System.Globalization.NumberStyles.HexNumber)
blah = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, MTCompoLoc + 2 + (PKMNames.SelectedIndex * 2), 2))), System.Globalization.NumberStyles.HexNumber)
binarythebitch = (Convert.ToString(blah, 2))
@@ -2077,7 +2077,7 @@ Public Class Pokemonedit
PKMNames.Items.Clear()
EvoPKMNames.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfPokemon", "")) - 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfPokemon", "")) - 1 = True
LoopVar = LoopVar + 1
@@ -2142,7 +2142,7 @@ Public Class Pokemonedit
ComboBox1.Enabled = False
ComboBox1.SelectedIndex = -1
- If (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "none" Then
+ If (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "none" Then
EvoPKMNames.Enabled = False
EvoItem.Enabled = False
@@ -2152,21 +2152,21 @@ Public Class Pokemonedit
EvoLevel.Text = ""
EvoPKMNames.SelectedIndex = -1
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "evolvesbutnoparms" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "evolvesbutnoparms" Then
EvoPKMNames.SelectedIndex = 0
EvoPKMNames.Enabled = True
EvoLevel.Enabled = False
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "level" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "level" Then
EvoLevel.Text = "1"
EvoPKMNames.SelectedIndex = 0
- EvoPKMNames.Enabled = True
+ EvoPKMNames.Enabled = True
EvoLevel.Enabled = True
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "item" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "item" Then
EvoPKMNames.Enabled = True
EvoPKMNames.SelectedIndex = 0
@@ -2174,7 +2174,7 @@ Public Class Pokemonedit
EvoItem.Enabled = True
EvoLevel.Enabled = False
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "attack" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "attack" Then
EvoPKMNames.Enabled = True
EvoPKMNames.SelectedIndex = 0
@@ -2182,7 +2182,7 @@ Public Class Pokemonedit
ComboBox3.SelectedIndex = 0
ComboBox3.Enabled = True
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "mapname" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "mapname" Then
EvoPKMNames.Enabled = True
EvoPKMNames.SelectedIndex = 0
@@ -2190,7 +2190,7 @@ Public Class Pokemonedit
ComboBox2.SelectedIndex = 0
ComboBox2.Enabled = True
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "species" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "species" Then
EvoPKMNames.Enabled = True
EvoPKMNames.SelectedIndex = 0
@@ -2198,7 +2198,7 @@ Public Class Pokemonedit
ComboBox1.SelectedIndex = 0
ComboBox1.Enabled = True
- ElseIf (GetString(AppPath & "ini\roms.ini", header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "bankandmap" Then
+ ElseIf (GetString(GetINIFileLocation(), header, "Evolution" & EvoTypes.SelectedIndex & "Param", "0")) = "bankandmap" Then
EvoPKMNames.Enabled = True
EvoPKMNames.SelectedIndex = 0
diff --git a/GBAPokemonGameEditor/RSEStarterEditor.vb b/GBAPokemonGameEditor/RSEStarterEditor.vb
index 0f330f0..acc4578 100644
--- a/GBAPokemonGameEditor/RSEStarterEditor.vb
+++ b/GBAPokemonGameEditor/RSEStarterEditor.vb
@@ -19,7 +19,7 @@ Public Class RSEStarterEditor
Starter3.Items.Clear()
Opponent.Items.Clear()
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfPokemon", "")) - 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfPokemon", "")) - 1 = True
LoopVar = LoopVar + 1
@@ -33,42 +33,42 @@ Public Class RSEStarterEditor
If header2 = "BPE" Then
- If ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 4) = "90214900" Then
+ If ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 4) = "90214900" Then
Opponent.SelectedIndex = 288 - 1
Else
- Opponent.SelectedIndex = ((Int32.Parse(((ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 1))), System.Globalization.NumberStyles.HexNumber) + (Int32.Parse((ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, 1)), System.Globalization.NumberStyles.HexNumber))) - 1)
+ Opponent.SelectedIndex = ((Int32.Parse(((ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 1))), System.Globalization.NumberStyles.HexNumber) + (Int32.Parse((ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, 1)), System.Globalization.NumberStyles.HexNumber))) - 1)
End If
- Starter1.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 2))), System.Globalization.NumberStyles.HexNumber) - 1
- Starter2.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, 2))), System.Globalization.NumberStyles.HexNumber) - 1
- Starter3.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 4, 2))), System.Globalization.NumberStyles.HexNumber) - 1
+ Starter1.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 2))), System.Globalization.NumberStyles.HexNumber) - 1
+ Starter2.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, 2))), System.Globalization.NumberStyles.HexNumber) - 1
+ Starter3.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 4, 2))), System.Globalization.NumberStyles.HexNumber) - 1
- OpponentLevel.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), 1))), System.Globalization.NumberStyles.HexNumber)
- StarterLevel.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), 1))), System.Globalization.NumberStyles.HexNumber)
+ OpponentLevel.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), 1))), System.Globalization.NumberStyles.HexNumber)
+ StarterLevel.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), 1))), System.Globalization.NumberStyles.HexNumber)
ElseIf header2 = "AXV" Or header2 = "AXP" Then
- If ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 4) = "8F214900" Then
+ If ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 4) = "8F214900" Then
Opponent.SelectedIndex = 286 - 1
Else
- Opponent.SelectedIndex = (Int32.Parse((ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 1)), System.Globalization.NumberStyles.HexNumber) + Int32.Parse((ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, 1)), System.Globalization.NumberStyles.HexNumber)) - 1
+ Opponent.SelectedIndex = (Int32.Parse((ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 1)), System.Globalization.NumberStyles.HexNumber) + Int32.Parse((ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, 1)), System.Globalization.NumberStyles.HexNumber)) - 1
End If
- Starter1.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 2))), System.Globalization.NumberStyles.HexNumber) - 1
- Starter2.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, 2))), System.Globalization.NumberStyles.HexNumber) - 1
- Starter3.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 4, 2))), System.Globalization.NumberStyles.HexNumber) - 1
+ Starter1.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber), 2))), System.Globalization.NumberStyles.HexNumber) - 1
+ Starter2.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, 2))), System.Globalization.NumberStyles.HexNumber) - 1
+ Starter3.SelectedIndex = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 4, 2))), System.Globalization.NumberStyles.HexNumber) - 1
- OpponentLevel.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), 1))), System.Globalization.NumberStyles.HexNumber)
- StarterLevel.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), 1))), System.Globalization.NumberStyles.HexNumber)
+ OpponentLevel.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), 1))), System.Globalization.NumberStyles.HexNumber)
+ StarterLevel.Text = Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), 1))), System.Globalization.NumberStyles.HexNumber)
Else
MsgBox("Not supported. Use a script editor.")
@@ -102,24 +102,24 @@ Public Class RSEStarterEditor
If Opponent.SelectedIndex + 1 > 255 Then
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), "FF")
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 1, "21")
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, Hex(Opponent.SelectedIndex - 255 + 1))
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 3, "31")
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), "FF")
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 1, "21")
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, Hex(Opponent.SelectedIndex - 255 + 1))
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 3, "31")
ElseIf Opponent.SelectedIndex + 1 < 255 Then
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), Hex(Opponent.SelectedIndex + 1))
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 1, "21")
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, "00")
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 3, "31")
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber), Hex(Opponent.SelectedIndex + 1))
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 1, "21")
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, "00")
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 3, "31")
End If
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterEncounterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), Hex(OpponentLevel.Text))
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), Hex(StarterLevel.Text))
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterEncounterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), Hex(OpponentLevel.Text))
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemonLevel", ""), System.Globalization.NumberStyles.HexNumber), Hex(StarterLevel.Text))
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber), ReverseHEX(VB.Right("0000" & Hex(Starter1.SelectedIndex + 1), 4)))
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, ReverseHEX(VB.Right("0000" & Hex(Starter2.SelectedIndex + 1), 4)))
- WriteHEX(LoadedROM, Int32.Parse(GetString(AppPath & "ini\roms.ini", header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 4, ReverseHEX(VB.Right("0000" & Hex(Starter3.SelectedIndex + 1), 4)))
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber), ReverseHEX(VB.Right("0000" & Hex(Starter1.SelectedIndex + 1), 4)))
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 2, ReverseHEX(VB.Right("0000" & Hex(Starter2.SelectedIndex + 1), 4)))
+ WriteHEX(LoadedROM, Int32.Parse(GetString(GetINIFileLocation(), header, "StarterPokemon", ""), System.Globalization.NumberStyles.HexNumber) + 4, ReverseHEX(VB.Right("0000" & Hex(Starter3.SelectedIndex + 1), 4)))
End Sub
End Class
\ No newline at end of file
diff --git a/GBAPokemonGameEditor/TMHMEditor.vb b/GBAPokemonGameEditor/TMHMEditor.vb
index ceb646a..15a0ec6 100644
--- a/GBAPokemonGameEditor/TMHMEditor.vb
+++ b/GBAPokemonGameEditor/TMHMEditor.vb
@@ -10,7 +10,7 @@ Public Class TMHMEditor
Dim LoopVar As Integer
- TMHMAttacks = Int32.Parse((GetString(AppPath & "ini\roms.ini", header, "TMData", "")), System.Globalization.NumberStyles.HexNumber)
+ TMHMAttacks = Int32.Parse((GetString(GetINIFileLocation(), header, "TMData", "")), System.Globalization.NumberStyles.HexNumber)
TMHMList.Items.Clear()
@@ -49,7 +49,7 @@ Public Class TMHMEditor
LoopVar = 0
- While LoopVar < (GetString(AppPath & "ini\roms.ini", header, "NumberOfAttacks", "")) + 1 = True
+ While LoopVar < (GetString(GetINIFileLocation(), header, "NumberOfAttacks", "")) + 1 = True
AttackList.Items.Add(GetAttackName(LoopVar))
diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application
index d3bcfce..4bb3441 100644
--- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application
+++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.application
@@ -16,7 +16,7 @@
- /xV+2//u92VAs+v7sHHgS+F3JXA=
+ 2tfplIyfx5LERvfkGKSqzEJ+TPc=
diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe
index 393ac88..3104442 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 f483baf..54b7172 100644
--- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe.manifest
+++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.exe.manifest
@@ -43,14 +43,14 @@
-
+
- zg43t8GjcnEAFG8AVEKfI21g2cE=
+ qVVGyb4PoWQ3GJi15Gu1kpcRRfA=
diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.pdb b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.pdb
index ca56380..38c547a 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 d3bcfce..4bb3441 100644
--- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application
+++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.application
@@ -16,7 +16,7 @@
- /xV+2//u92VAs+v7sHHgS+F3JXA=
+ 2tfplIyfx5LERvfkGKSqzEJ+TPc=
diff --git a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest
index f483baf..54b7172 100644
--- a/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest
+++ b/GBAPokemonGameEditor/bin/Debug/GBAPokemonGameEditor.vshost.exe.manifest
@@ -43,14 +43,14 @@
-
+
- zg43t8GjcnEAFG8AVEKfI21g2cE=
+ qVVGyb4PoWQ3GJi15Gu1kpcRRfA=
diff --git a/GBAPokemonGameEditor/bin/Debug/app.publish/GBAPokemonGameEditor.exe b/GBAPokemonGameEditor/bin/Debug/app.publish/GBAPokemonGameEditor.exe
index 393ac88..3104442 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/mMain.vb b/GBAPokemonGameEditor/mMain.vb
index 88e81ec..567f498 100644
--- a/GBAPokemonGameEditor/mMain.vb
+++ b/GBAPokemonGameEditor/mMain.vb
@@ -70,5 +70,17 @@ Module mMain
Public MapTiles2 As Integer(,)
+ Public Function GetINIFileLocation()
+
+ If System.IO.File.Exists((LoadedROM).Substring(0, LoadedROM.Length - 4) & ".ini") = True Then
+
+ Return (LoadedROM).Substring(0, LoadedROM.Length - 4) & ".ini"
+ Else
+
+ Return AppPath & "ini\roms.ini"
+ End If
+
+ End Function
+
End Module
diff --git a/GBAPokemonGameEditor/movetutor2.vb b/GBAPokemonGameEditor/movetutor2.vb
index c3b4511..1138f5d 100644
--- a/GBAPokemonGameEditor/movetutor2.vb
+++ b/GBAPokemonGameEditor/movetutor2.vb
@@ -85,14 +85,14 @@ Public Class movetutor2
ComboBox15.Items.Clear()
ComboBox16.Items.Clear()
- Offset = Int32.Parse((GetString("ini\roms.ini", header, "MoveTutorAttacks", "")), System.Globalization.NumberStyles.HexNumber)
+ Offset = Int32.Parse((GetString(GetINIFileLocation(), header, "MoveTutorAttacks", "")), System.Globalization.NumberStyles.HexNumber)
Dim loopything As String = 0
Dim curattack As String
- While loopything < (Val(GetString("ini\roms.ini", header, "NumberOfAttacks", "")) + 1)
+ While loopything < (Val(GetString(GetINIFileLocation(), header, "NumberOfAttacks", "")) + 1)
curattack = GetAttackName(loopything)
diff --git a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.application b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.application
index d3bcfce..4bb3441 100644
--- a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.application
+++ b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.application
@@ -16,7 +16,7 @@
- /xV+2//u92VAs+v7sHHgS+F3JXA=
+ 2tfplIyfx5LERvfkGKSqzEJ+TPc=
diff --git a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe
index 393ac88..3104442 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 f483baf..54b7172 100644
--- a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe.manifest
+++ b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.exe.manifest
@@ -43,14 +43,14 @@
-
+
- zg43t8GjcnEAFG8AVEKfI21g2cE=
+ qVVGyb4PoWQ3GJi15Gu1kpcRRfA=
diff --git a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.pdb b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.pdb
index ca56380..38c547a 100644
Binary files a/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.pdb and b/GBAPokemonGameEditor/obj/x86/Debug/GBAPokemonGameEditor.pdb differ