Mynameisgonz

FFXI Graphics Tweaker Source

Jan 22nd, 2013
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class ffxiGraphicsTweak
  2.  
  3.     Private Sub btnSubmit_Click() Handles btnSubmit.Click
  4.         If txtHeight.Text = "" Or txtWidth.Text = "" Then
  5.             MessageBox.Show("Please Enter an X and Y Resolution", "FFXI Graphics Tweaker",
  6. MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
  7.         ElseIf Not IsNumeric(txtHeight.Text) Or Not IsNumeric(txtWidth.Text) Then
  8.             MessageBox.Show("Please use numbers for your resolution.", "FFXI Graphics Tweaker",
  9. MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
  10.         Else
  11.             Dim path As String
  12.  
  13.             If rad32Bit.Checked Then
  14.                 If radRegionNA.Checked Then
  15.                     path = "Software\PlayOnlineUS\SquareEnix\FinalFantasyXI"
  16.                 ElseIf radRegionEU.Checked Then
  17.                     path = "Software\PlayOnlineEU\SquareEnix\FinalFantasyXI"
  18.                 ElseIf radRegionJP.Checked Then
  19.                     path = "Software\PlayOnlineJP\SquareEnix\FinalFantasyXI"
  20.                 End If
  21.             ElseIf rad64Bit.Checked Then
  22.                 If radRegionNA.Checked Then
  23.                     path = "Software\Wow6432Node\PlayOnlineUS\SquareEnix\FinalFantasyXI"
  24.                 ElseIf radRegionEU.Checked Then
  25.                     path = "Software\Wow6432Node\PlayOnlineEU\SquareEnix\FinalFantasyXI"
  26.                 ElseIf radRegionJP.Checked Then
  27.                     path = "Software\Wow6432Node\PlayOnlineJP\SquareEnix\FinalFantasyXI"
  28.                 End If
  29.             End If
  30.  
  31.             Dim autoshell = My.Computer.Registry.LocalMachine.OpenSubKey(path, True)
  32.  
  33.             Dim resX As Integer
  34.             Try
  35.                 resX = CInt(txtWidth.Text)
  36.             Catch ex As Exception
  37.                 MsgBox(ex.Message, , )
  38.             End Try
  39.  
  40.             Dim resY As Integer
  41.             Try
  42.                 resY = CInt(txtHeight.Text)
  43.             Catch ex As Exception
  44.                 MsgBox(ex.Message, , )
  45.             End Try
  46.  
  47.             '' Set the games Height
  48.            autoshell.SetValue("0001", resX)
  49.             '' Set the games Width
  50.            autoshell.SetValue("0002", resY)
  51.  
  52.             '' Set the 3D Resolution
  53.            If rad3DUnder.Checked Then
  54.  
  55.                 Dim BGResX As Integer
  56.                 BGResX = CInt(resX / 2)
  57.  
  58.                 Dim BGResY As Integer
  59.                 BGResY = CInt(resY / 2)
  60.  
  61.                 autoshell.SetValue("0003", BGResX)
  62.                 autoshell.SetValue("0004", BGResY)
  63.  
  64.             ElseIf rad3DMatch.Checked Then
  65.  
  66.                 autoshell.SetValue("0003", resX)
  67.                 autoshell.SetValue("0004", resY)
  68.  
  69.             ElseIf rad3DOver.Checked Then
  70.  
  71.                 Dim BGResX As Integer
  72.                 BGResX = resX * 2
  73.  
  74.                 Dim BGResY As Integer
  75.                 BGResY = resY * 2
  76.  
  77.                 autoshell.SetValue("0003", BGResX)
  78.                 autoshell.SetValue("0004", BGResY)
  79.  
  80.             End If
  81.  
  82.             '' Mip Mapping
  83.            If radMMOff.Checked Then
  84.                 autoshell.SetValue("0000", 0)
  85.             ElseIf radMMOn.Checked Then
  86.                 autoshell.SetValue("0000", 1)
  87.             ElseIf radMMEx.Checked Then
  88.                 autoshell.SetValue("0000", 4)
  89.             End If
  90.  
  91.             '' Bump Mapping
  92.            If radBMOff.Checked Then
  93.                 autoshell.SetValue("0017", 0)
  94.             ElseIf radBMOn.Checked Then
  95.                 autoshell.SetValue("0017", 1)
  96.             End If
  97.  
  98.             '' Music / Sound
  99.            If radMusicOff.Checked Then
  100.                 autoshell.SetValue("0007", 0)
  101.             ElseIf radMusicOn.Checked Then
  102.                 autoshell.SetValue("0007", 1)
  103.             End If
  104.  
  105.             '' Environmental Animation
  106.            If radAnimOff.Checked Then
  107.                 autoshell.SetValue("0011", 0)
  108.             ElseIf radAnimOn.Checked Then
  109.                 autoshell.SetValue("0011", 1)
  110.             ElseIf radAnimSmooth.Checked Then
  111.                 autoshell.SetValue("0011", 2)
  112.             End If
  113.  
  114.             '' Texture Compression
  115.            If radTextHigh.Checked Then
  116.                 autoshell.SetValue("0018", 0)
  117.             ElseIf radTextLow.Checked Then
  118.                 autoshell.SetValue("0018", 1)
  119.             ElseIf radTextUnc.Checked Then
  120.                 autoshell.SetValue("0018", 2)
  121.             End If
  122.  
  123.             '' Maps
  124.            If radMapComp.Checked Then
  125.                 autoshell.SetValue("0019", 0)
  126.             ElseIf radMapUnc.Checked Then
  127.                 autoshell.SetValue("0019", 1)
  128.             End If
  129.  
  130.             '' Intro Movie
  131.            If radIntroOff.Checked Then
  132.                 autoshell.SetValue("0022", 0)
  133.             ElseIf radIntroOn.Checked Then
  134.                 autoshell.SetValue("0022", 1)
  135.             End If
  136.  
  137.             '' Intro Movie
  138.            If radWindowOff.Checked Then
  139.                 autoshell.SetValue("0034", 0)
  140.             ElseIf radWindowOn.Checked Then
  141.                 autoshell.SetValue("0034", 1)
  142.             End If
  143.  
  144.             autoshell.Close()
  145.  
  146.             MessageBox.Show("Your Registry Has Been Tweaked!", "FFXI Graphics Tweaker",
  147.     MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
  148.  
  149.         End If
  150.  
  151.     End Sub
  152.  
  153.     Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
  154.         MessageBox.Show("FFXI Graphics Tweaker is developed by Burnie and Magzy of Quetzacoatl. If you have any questions, please contact us at [email protected].", "FFXI Graphics Tweaker",
  155.     MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
  156.     End Sub
  157.  
  158. End Class
Advertisement
Add Comment
Please, Sign In to add comment