diff --git a/CodeWalker/App.config b/CodeWalker/App.config index 22e30d3..38524be 100644 --- a/CodeWalker/App.config +++ b/CodeWalker/App.config @@ -43,6 +43,27 @@ True + + 720 + + + True + + + Global + + + contrails + + + True + + + True + + + True + True diff --git a/CodeWalker/Properties/Settings.Designer.cs b/CodeWalker/Properties/Settings.Designer.cs index 50df41b..0f96979 100644 --- a/CodeWalker/Properties/Settings.Designer.cs +++ b/CodeWalker/Properties/Settings.Designer.cs @@ -142,7 +142,7 @@ namespace CodeWalker.Properties { this["Wireframe"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] @@ -154,7 +154,43 @@ namespace CodeWalker.Properties { this["Skydome"] = value; } } - + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool LODLights { + get { + return ((bool)(this["LODLights"])); + } + set { + this["LODLights"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool NatrualAmbientLight { + get { + return ((bool)(this["NatrualAmbientLight"])); + } + set { + this["NatrualAmbientLight"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool ArtificialAmbientLight { + get { + return ((bool)(this["ArtificialAmbientLight"])); + } + set { + this["ArtificialAmbientLight"] = value; + } + } + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] @@ -490,7 +526,55 @@ namespace CodeWalker.Properties { this["RenderMode"] = value; } } - + + [global::System.Configuration.UserScopedSetting()] + [global::System.Diagnostics.DebuggerNonUserCode()] + [global::System.Configuration.DefaultSettingValue("EXTRASUNNY")] + public string Weather { + get { + return ((string)(this["Weather"])); + } + set { + this["Weather"] = value; + } + } + + [global::System.Configuration.UserScopedSetting()] + [global::System.Diagnostics.DebuggerNonUserCode()] + [global::System.Configuration.DefaultSettingValue("GLOBAL")] + public string Region { + get { + return ((string)(this["Region"])); + } + set { + this["Region"] = value; + } + } + + [global::System.Configuration.UserScopedSetting()] + [global::System.Diagnostics.DebuggerNonUserCode()] + [global::System.Configuration.DefaultSettingValue("contrails")] + public string Clouds { + get { + return ((string)(this["Clouds"])); + } + set { + this["Clouds"] = value; + } + } + + [global::System.Configuration.UserScopedSetting()] + [global::System.Diagnostics.DebuggerNonUserCode()] + [global::System.Configuration.DefaultSettingValue("720")] + public int TimeOfDay { + get { + return ((int)(this["TimeOfDay"])); + } + set { + this["TimeOfDay"] = value; + } + } + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("DiffuseSampler")] diff --git a/CodeWalker/WorldForm.cs b/CodeWalker/WorldForm.cs index eee41d1..6e91b15 100644 --- a/CodeWalker/WorldForm.cs +++ b/CodeWalker/WorldForm.cs @@ -4304,8 +4304,8 @@ namespace CodeWalker { WeatherComboBox.Items.Add(wt); } - WeatherComboBox.SelectedIndex = 0; - WeatherRegionComboBox.SelectedIndex = 0; + WeatherComboBox.SelectedIndex = Math.Max(WeatherComboBox.FindString(Settings.Default.Weather), 0); + WeatherRegionComboBox.SelectedIndex = Math.Max(WeatherRegionComboBox.FindString(Settings.Default.Region), 0); } } catch { } @@ -4617,6 +4617,15 @@ namespace CodeWalker StatusBarCheckBox.Checked = s.ShowStatusBar; SnapGridSizeUpDown.Value = (decimal)s.SnapGridSize; SetRotationSnapping(s.SnapRotationDegrees); + TimeOfDayTrackBar.Value = s.TimeOfDay; + setTime(s.TimeOfDay); + LODLightsCheckBox.Checked = s.LODLights; + WeatherComboBox.SelectedIndex = Math.Max(WeatherComboBox.FindString(s.Weather), 0); + Renderer.SetWeatherType(s.Weather); + WeatherRegionComboBox.SelectedIndex = Math.Max(WeatherRegionComboBox.FindString(s.Region), 0); + Renderer.individualcloudfrag = s.Clouds; + NaturalAmbientLightCheckBox.Checked = s.NatrualAmbientLight; + ArtificialAmbientLightCheckBox.Checked = s.ArtificialAmbientLight; EnableModsCheckBox.Checked = s.EnableMods; @@ -4655,7 +4664,13 @@ namespace CodeWalker s.ShowStatusBar = StatusBarCheckBox.Checked; s.SnapRotationDegrees = (float)SnapAngleUpDown.Value; s.SnapGridSize = (float)SnapGridSizeUpDown.Value; - + s.TimeOfDay = TimeOfDayTrackBar.Value; + s.LODLights = LODLightsCheckBox.Checked; + s.Weather = WeatherComboBox.Text; + s.NatrualAmbientLight = NaturalAmbientLightCheckBox.Checked; + s.ArtificialAmbientLight = ArtificialAmbientLightCheckBox.Checked; + s.Region = WeatherRegionComboBox.Text; + s.Clouds = CloudsComboBox.Text; //additional settings from gamefilecache... s.EnableMods = gameFileCache.EnableMods; @@ -6994,8 +7009,12 @@ namespace CodeWalker private void TimeOfDayTrackBar_Scroll(object sender, EventArgs e) { - int v = TimeOfDayTrackBar.Value; - float hour = v / 60.0f; + setTime(TimeOfDayTrackBar.Value); + } + + private void setTime(int time) + { + float hour = time / 60.0f; UpdateTimeOfDayLabel(); lock (Renderer.RenderSyncRoot) {