diff --git a/Build/Builder.cfg b/Build/Builder.cfg index 5636c3ae..fc7b31b9 100644 --- a/Build/Builder.cfg +++ b/Build/Builder.cfg @@ -217,7 +217,6 @@ mousespeed = 500; movespeed = 600; viewdistance = 1000f; invertyaxis = false; -fixedaspect = false; scriptfontname = "Lucida Console"; scriptfontsize = 10; scriptfontbold = false; diff --git a/Source/Config/ProgramConfiguration.cs b/Source/Config/ProgramConfiguration.cs index 53c40ca7..48a35440 100644 --- a/Source/Config/ProgramConfiguration.cs +++ b/Source/Config/ProgramConfiguration.cs @@ -66,7 +66,6 @@ namespace CodeImp.DoomBuilder.Config private int movespeed; private float viewdistance; private bool invertyaxis; - private bool fixedaspect; private string scriptfontname; private int scriptfontsize; private bool scriptfontbold; @@ -104,7 +103,6 @@ namespace CodeImp.DoomBuilder.Config public int MoveSpeed { get { return movespeed; } internal set { movespeed = value; } } public float ViewDistance { get { return viewdistance; } internal set { viewdistance = value; } } public bool InvertYAxis { get { return invertyaxis; } internal set { invertyaxis = value; } } - public bool FixedAspect { get { return fixedaspect; } internal set { fixedaspect = value; } } public string ScriptFontName { get { return scriptfontname; } internal set { scriptfontname = value; } } public int ScriptFontSize { get { return scriptfontsize; } internal set { scriptfontsize = value; } } public bool ScriptFontBold { get { return scriptfontbold; } internal set { scriptfontbold = value; } } @@ -158,7 +156,6 @@ namespace CodeImp.DoomBuilder.Config movespeed = cfg.ReadSetting("movespeed", 100); viewdistance = cfg.ReadSetting("viewdistance", 3000.0f); invertyaxis = cfg.ReadSetting("invertyaxis", false); - fixedaspect = cfg.ReadSetting("fixedaspect", true); scriptfontname = cfg.ReadSetting("scriptfontname", "Lucida Console"); scriptfontsize = cfg.ReadSetting("scriptfontsize", 10); scriptfontbold = cfg.ReadSetting("scriptfontbold", false); @@ -195,7 +192,6 @@ namespace CodeImp.DoomBuilder.Config cfg.WriteSetting("movespeed", movespeed); cfg.WriteSetting("viewdistance", viewdistance); cfg.WriteSetting("invertyaxis", invertyaxis); - cfg.WriteSetting("fixedaspect", fixedaspect); cfg.WriteSetting("scriptfontname", scriptfontname); cfg.WriteSetting("scriptfontsize", scriptfontsize); cfg.WriteSetting("scriptfontbold", scriptfontbold); diff --git a/Source/Rendering/Renderer3D.cs b/Source/Rendering/Renderer3D.cs index 6f9ec0fc..5468a375 100644 --- a/Source/Rendering/Renderer3D.cs +++ b/Source/Rendering/Renderer3D.cs @@ -45,7 +45,6 @@ namespace CodeImp.DoomBuilder.Rendering private const float PROJ_NEAR_PLANE = 1f; private const float CROSSHAIR_SCALE = 0.06f; private const float FOG_RANGE = 0.9f; - private const float FIXED_ASPECT = 4.0f / 3.0f; #endregion @@ -276,18 +275,9 @@ namespace CodeImp.DoomBuilder.Rendering // This creates the projection internal void CreateProjection() { - float aspect; - - // Determine aspect to use - if(General.Settings.FixedAspect) - { - aspect = FIXED_ASPECT; - } - else - { - aspect = (float)General.Map.Graphics.RenderTarget.ClientSize.Width / - (float)General.Map.Graphics.RenderTarget.ClientSize.Height; - } + // Calculate aspect + float aspect = (float)General.Map.Graphics.RenderTarget.ClientSize.Width / + (float)General.Map.Graphics.RenderTarget.ClientSize.Height; // The DirectX PerspectiveFovRH matrix method calculates the scaling in X and Y as follows: // yscale = 1 / tan(fovY / 2) diff --git a/Source/Windows/PreferencesForm.Designer.cs b/Source/Windows/PreferencesForm.Designer.cs index 883f48a3..68e1dbd9 100644 --- a/Source/Windows/PreferencesForm.Designer.cs +++ b/Source/Windows/PreferencesForm.Designer.cs @@ -69,7 +69,6 @@ namespace CodeImp.DoomBuilder.Windows this.fieldofview = new Dotnetrix.Controls.TrackBar(); this.viewdistancelabel = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); - this.fixedaspect = new System.Windows.Forms.CheckBox(); this.invertyaxis = new System.Windows.Forms.CheckBox(); this.movespeedlabel = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); @@ -545,7 +544,6 @@ namespace CodeImp.DoomBuilder.Windows this.groupBox2.Controls.Add(this.fieldofview); this.groupBox2.Controls.Add(this.viewdistancelabel); this.groupBox2.Controls.Add(this.label13); - this.groupBox2.Controls.Add(this.fixedaspect); this.groupBox2.Controls.Add(this.invertyaxis); this.groupBox2.Controls.Add(this.movespeedlabel); this.groupBox2.Controls.Add(this.label11); @@ -629,16 +627,6 @@ namespace CodeImp.DoomBuilder.Windows this.label13.TabIndex = 28; this.label13.Text = "View distance:"; // - // fixedaspect - // - this.fixedaspect.AutoSize = true; - this.fixedaspect.Location = new System.Drawing.Point(31, 328); - this.fixedaspect.Name = "fixedaspect"; - this.fixedaspect.Size = new System.Drawing.Size(133, 18); - this.fixedaspect.TabIndex = 27; - this.fixedaspect.Text = "Fixed 4:3 view aspect"; - this.fixedaspect.UseVisualStyleBackColor = true; - // // invertyaxis // this.invertyaxis.AutoSize = true; @@ -1139,7 +1127,6 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.Label label9; private System.Windows.Forms.Label viewdistancelabel; private System.Windows.Forms.Label label13; - private System.Windows.Forms.CheckBox fixedaspect; private System.Windows.Forms.CheckBox invertyaxis; private System.Windows.Forms.ComboBox defaultviewmode; private System.Windows.Forms.Label label14; diff --git a/Source/Windows/PreferencesForm.cs b/Source/Windows/PreferencesForm.cs index 59a1eccf..eda5d7c7 100644 --- a/Source/Windows/PreferencesForm.cs +++ b/Source/Windows/PreferencesForm.cs @@ -65,7 +65,6 @@ namespace CodeImp.DoomBuilder.Windows movespeed.Value = General.Settings.MoveSpeed / 100; viewdistance.Value = General.Clamp((int)(General.Settings.ViewDistance / 200.0f), viewdistance.Minimum, viewdistance.Maximum); invertyaxis.Checked = General.Settings.InvertYAxis; - fixedaspect.Checked = General.Settings.FixedAspect; scriptfontbold.Checked = General.Settings.ScriptFontBold; // Fill fonts list @@ -151,7 +150,6 @@ namespace CodeImp.DoomBuilder.Windows General.Settings.MoveSpeed = movespeed.Value * 100; General.Settings.ViewDistance = (float)viewdistance.Value * 200.0f; General.Settings.InvertYAxis = invertyaxis.Checked; - General.Settings.FixedAspect = fixedaspect.Checked; General.Settings.ScriptFontBold = scriptfontbold.Checked; General.Settings.ScriptFontName = scriptfontname.Text; diff --git a/Source/Windows/PreferencesForm.resx b/Source/Windows/PreferencesForm.resx index 81297db3..459426e0 100644 --- a/Source/Windows/PreferencesForm.resx +++ b/Source/Windows/PreferencesForm.resx @@ -255,9 +255,6 @@ True - - True - True