Skip to content

Commit

Permalink
Added AA switch to configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
DMD authored and DMD committed Aug 27, 2016
1 parent b168a24 commit 1d5e2c4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Configurator/IniViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public class IniViewModel : DependencyObject
public static readonly DependencyProperty DisableAutomaticUpdatesProperty = DependencyProperty.Register(
"DisableAutomaticUpdates", typeof (bool), typeof (IniViewModel), new PropertyMetadata(default(bool)));

public static readonly DependencyProperty AntiAliasingProperty = DependencyProperty.Register(
"AntiAliasing", typeof(bool), typeof(IniViewModel), new PropertyMetadata(default(bool)));

public static readonly DependencyProperty SoftShadowsProperty = DependencyProperty.Register(
"SoftShadows", typeof (bool), typeof (IniViewModel), new PropertyMetadata(default(bool)));

Expand Down Expand Up @@ -105,6 +108,12 @@ public bool DisableAutomaticUpdates
set { SetValue(DisableAutomaticUpdatesProperty, value); }
}

public bool AntiAliasing
{
get { return (bool)GetValue(AntiAliasingProperty); }
set { SetValue(AntiAliasingProperty, value); }
}

public bool SoftShadows
{
get { return (bool) GetValue(SoftShadowsProperty); }
Expand Down Expand Up @@ -234,6 +243,7 @@ public void LoadFromIni(IniData iniData)
}

SoftShadows = tpData["softShadows"] == "true";
AntiAliasing = tpData["antialiasing"] == "true";
WindowedMode = tpData["windowed"] == "true";

int maxLevel;
Expand Down Expand Up @@ -309,6 +319,7 @@ public void SaveToIni(IniData iniData)
tpData["windowed"] = WindowedMode ? "true" : "false";
tpData["windowWidth"] = RenderWidth.ToString();
tpData["windowHeight"] = RenderHeight.ToString();
tpData["antialiasing"] = AntiAliasing? "true" : "false";
tpData["softShadows"] = SoftShadows ? "true" : "false";
tpData["maxLevel"] = MaxLevel.ToString();
tpData["allowXpOverflow"] = AllowXpOverflow ? "true" : "false";
Expand Down
3 changes: 2 additions & 1 deletion Configurator/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
</StackPanel>
<CheckBox VerticalAlignment="Center" Content="Run in Windowed Mode" IsChecked="{Binding WindowedMode}" Margin="0,5,0,5" />
<CheckBox VerticalAlignment="Center" Content="Disable Automatic Updates" IsChecked="{Binding DisableAutomaticUpdates}" Margin="0,5,0,5" />
<CheckBox VerticalAlignment="Center" Content="Anti Aliasing" IsChecked="{Binding AntiAliasing}" Margin="0,5,0,5" ToolTip="You may have to disable this if you have an integrated GPU." />
<CheckBox VerticalAlignment="Center" Content="Enable Soft Shadows (GPU intensive)" IsChecked="{Binding SoftShadows}" Margin="0,5,0,5" />

<StackPanel Orientation="Horizontal" Margin="0,5,0,5">
<Label VerticalAlignment="Center" Content="Max Level:"/>
<TextBox Width="50" VerticalAlignment="Center" Text="{Binding MaxLevel}" />
Expand Down
Binary file modified tpdata/tpgamefiles.dat
Binary file not shown.

0 comments on commit 1d5e2c4

Please sign in to comment.