Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
Prize money calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamer2020 committed Jan 16, 2017
1 parent b390c65 commit 45ca714
Show file tree
Hide file tree
Showing 14 changed files with 85 additions and 35 deletions.
Binary file modified GBAPokemonGameEditor.v12.suo
Binary file not shown.
64 changes: 38 additions & 26 deletions GBAPokemonGameEditor/TrainerEditor.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions GBAPokemonGameEditor/TrainerEditor.vb
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ Public Class TrainerEditor

PkmSlts.SelectedIndex = 0

CalcPrizeMoney()

'end of Pokemon Tab Stuff

TrainerIndexTextBox.Text = TrainerListComboBox.SelectedIndex + 1
Expand Down Expand Up @@ -454,6 +456,8 @@ Public Class TrainerEditor

PkmSlts.SelectedIndex = 0

CalcPrizeMoney()

'end of Pokemon Tab Stuff

End Sub
Expand Down Expand Up @@ -656,4 +660,38 @@ Public Class TrainerEditor
WriteHEX(LoadedROM, offvar + (looper * 4) + 1, Hex(MoneyRateTextBox.Text))

End Sub

Private Sub MoneyRateTextBox_TextChanged(sender As Object, e As EventArgs) Handles MoneyRateTextBox.TextChanged

CalcPrizeMoney()

End Sub

Private Sub CalcPrizeMoney()

Dim offvar As Integer
Dim offvar2 As Integer

offvar = Int32.Parse((GetString(GetINIFileLocation(), header, "TrainerTable", "")), System.Globalization.NumberStyles.HexNumber)
offvar = offvar + (40 * (TrainerListComboBox.SelectedIndex + 1))

offvar2 = ((Int32.Parse((ReverseHEX(ReadHEX(LoadedROM, offvar + 36, 4))), System.Globalization.NumberStyles.HexNumber) - &H8000000))

Dim num As Integer = 0
Dim num2 As Integer = 8

If PokeDataFormatTextBox.Text <> "" And MoneyRateTextBox.Text <> "" Then

If PokeDataFormatTextBox.Text = 1 Or PokeDataFormatTextBox.Text = 3 Then
num2 = &H10
End If
If (PkmSlts.Items.Count > 0) Then
num = (4 * Int32.Parse(ReadHEX(LoadedROM, ((((offvar2) + (num2 * PkmSlts.Items.Count)) - num2) + 2), 1), System.Globalization.NumberStyles.HexNumber))
End If
Label15.Text = ("Prize Money: " & ((num * MoneyRateTextBox.Text)))

End If

End Sub

End Class
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>rO+iiZR0DLnOusrOWO/lvyGiewUNoZwa3wggdBO/bdo=</dsig:DigestValue>
<dsig:DigestValue>qBYJ1Qbh9KnbSH2FyJz+ZiZFimSfvuPQHOyL73AnrsQ=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2131968">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2132992">
<assemblyIdentity name="PokemonGameEditor" version="3.7.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>RwSbCMu//gorFOFWqaU2hjZ/714CFkT4XB2CGm9v7LQ=</dsig:DigestValue>
<dsig:DigestValue>sf+OCyODPMew10CWgM5ZGHYEB3TevWWsekewwJxIcB8=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>rO+iiZR0DLnOusrOWO/lvyGiewUNoZwa3wggdBO/bdo=</dsig:DigestValue>
<dsig:DigestValue>qBYJ1Qbh9KnbSH2FyJz+ZiZFimSfvuPQHOyL73AnrsQ=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2131968">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2132992">
<assemblyIdentity name="PokemonGameEditor" version="3.7.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>RwSbCMu//gorFOFWqaU2hjZ/714CFkT4XB2CGm9v7LQ=</dsig:DigestValue>
<dsig:DigestValue>sf+OCyODPMew10CWgM5ZGHYEB3TevWWsekewwJxIcB8=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>rO+iiZR0DLnOusrOWO/lvyGiewUNoZwa3wggdBO/bdo=</dsig:DigestValue>
<dsig:DigestValue>qBYJ1Qbh9KnbSH2FyJz+ZiZFimSfvuPQHOyL73AnrsQ=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.exe
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2131968">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="2132992">
<assemblyIdentity name="PokemonGameEditor" version="3.7.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>RwSbCMu//gorFOFWqaU2hjZ/714CFkT4XB2CGm9v7LQ=</dsig:DigestValue>
<dsig:DigestValue>sf+OCyODPMew10CWgM5ZGHYEB3TevWWsekewwJxIcB8=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.pdb
Binary file not shown.

0 comments on commit 45ca714

Please sign in to comment.