removed the Fixed 4:3 Aspect option (there is no better aspect than the width divided by height for square pixels, which is pretty much all computer monitors)

This commit is contained in:
codeimp 2009-01-12 16:01:19 +00:00
parent cd4d577803
commit 64de24566b
6 changed files with 3 additions and 36 deletions

View file

@ -217,7 +217,6 @@ mousespeed = 500;
movespeed = 600; movespeed = 600;
viewdistance = 1000f; viewdistance = 1000f;
invertyaxis = false; invertyaxis = false;
fixedaspect = false;
scriptfontname = "Lucida Console"; scriptfontname = "Lucida Console";
scriptfontsize = 10; scriptfontsize = 10;
scriptfontbold = false; scriptfontbold = false;

View file

@ -66,7 +66,6 @@ namespace CodeImp.DoomBuilder.Config
private int movespeed; private int movespeed;
private float viewdistance; private float viewdistance;
private bool invertyaxis; private bool invertyaxis;
private bool fixedaspect;
private string scriptfontname; private string scriptfontname;
private int scriptfontsize; private int scriptfontsize;
private bool scriptfontbold; private bool scriptfontbold;
@ -104,7 +103,6 @@ namespace CodeImp.DoomBuilder.Config
public int MoveSpeed { get { return movespeed; } internal set { movespeed = value; } } public int MoveSpeed { get { return movespeed; } internal set { movespeed = value; } }
public float ViewDistance { get { return viewdistance; } internal set { viewdistance = value; } } public float ViewDistance { get { return viewdistance; } internal set { viewdistance = value; } }
public bool InvertYAxis { get { return invertyaxis; } internal set { invertyaxis = 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 string ScriptFontName { get { return scriptfontname; } internal set { scriptfontname = value; } }
public int ScriptFontSize { get { return scriptfontsize; } internal set { scriptfontsize = value; } } public int ScriptFontSize { get { return scriptfontsize; } internal set { scriptfontsize = value; } }
public bool ScriptFontBold { get { return scriptfontbold; } internal set { scriptfontbold = value; } } public bool ScriptFontBold { get { return scriptfontbold; } internal set { scriptfontbold = value; } }
@ -158,7 +156,6 @@ namespace CodeImp.DoomBuilder.Config
movespeed = cfg.ReadSetting("movespeed", 100); movespeed = cfg.ReadSetting("movespeed", 100);
viewdistance = cfg.ReadSetting("viewdistance", 3000.0f); viewdistance = cfg.ReadSetting("viewdistance", 3000.0f);
invertyaxis = cfg.ReadSetting("invertyaxis", false); invertyaxis = cfg.ReadSetting("invertyaxis", false);
fixedaspect = cfg.ReadSetting("fixedaspect", true);
scriptfontname = cfg.ReadSetting("scriptfontname", "Lucida Console"); scriptfontname = cfg.ReadSetting("scriptfontname", "Lucida Console");
scriptfontsize = cfg.ReadSetting("scriptfontsize", 10); scriptfontsize = cfg.ReadSetting("scriptfontsize", 10);
scriptfontbold = cfg.ReadSetting("scriptfontbold", false); scriptfontbold = cfg.ReadSetting("scriptfontbold", false);
@ -195,7 +192,6 @@ namespace CodeImp.DoomBuilder.Config
cfg.WriteSetting("movespeed", movespeed); cfg.WriteSetting("movespeed", movespeed);
cfg.WriteSetting("viewdistance", viewdistance); cfg.WriteSetting("viewdistance", viewdistance);
cfg.WriteSetting("invertyaxis", invertyaxis); cfg.WriteSetting("invertyaxis", invertyaxis);
cfg.WriteSetting("fixedaspect", fixedaspect);
cfg.WriteSetting("scriptfontname", scriptfontname); cfg.WriteSetting("scriptfontname", scriptfontname);
cfg.WriteSetting("scriptfontsize", scriptfontsize); cfg.WriteSetting("scriptfontsize", scriptfontsize);
cfg.WriteSetting("scriptfontbold", scriptfontbold); cfg.WriteSetting("scriptfontbold", scriptfontbold);

View file

@ -45,7 +45,6 @@ namespace CodeImp.DoomBuilder.Rendering
private const float PROJ_NEAR_PLANE = 1f; private const float PROJ_NEAR_PLANE = 1f;
private const float CROSSHAIR_SCALE = 0.06f; private const float CROSSHAIR_SCALE = 0.06f;
private const float FOG_RANGE = 0.9f; private const float FOG_RANGE = 0.9f;
private const float FIXED_ASPECT = 4.0f / 3.0f;
#endregion #endregion
@ -276,18 +275,9 @@ namespace CodeImp.DoomBuilder.Rendering
// This creates the projection // This creates the projection
internal void CreateProjection() internal void CreateProjection()
{ {
float aspect; // Calculate aspect
float aspect = (float)General.Map.Graphics.RenderTarget.ClientSize.Width /
// Determine aspect to use (float)General.Map.Graphics.RenderTarget.ClientSize.Height;
if(General.Settings.FixedAspect)
{
aspect = FIXED_ASPECT;
}
else
{
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: // The DirectX PerspectiveFovRH matrix method calculates the scaling in X and Y as follows:
// yscale = 1 / tan(fovY / 2) // yscale = 1 / tan(fovY / 2)

View file

@ -69,7 +69,6 @@ namespace CodeImp.DoomBuilder.Windows
this.fieldofview = new Dotnetrix.Controls.TrackBar(); this.fieldofview = new Dotnetrix.Controls.TrackBar();
this.viewdistancelabel = new System.Windows.Forms.Label(); this.viewdistancelabel = new System.Windows.Forms.Label();
this.label13 = 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.invertyaxis = new System.Windows.Forms.CheckBox();
this.movespeedlabel = new System.Windows.Forms.Label(); this.movespeedlabel = new System.Windows.Forms.Label();
this.label11 = 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.fieldofview);
this.groupBox2.Controls.Add(this.viewdistancelabel); this.groupBox2.Controls.Add(this.viewdistancelabel);
this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.fixedaspect);
this.groupBox2.Controls.Add(this.invertyaxis); this.groupBox2.Controls.Add(this.invertyaxis);
this.groupBox2.Controls.Add(this.movespeedlabel); this.groupBox2.Controls.Add(this.movespeedlabel);
this.groupBox2.Controls.Add(this.label11); this.groupBox2.Controls.Add(this.label11);
@ -629,16 +627,6 @@ namespace CodeImp.DoomBuilder.Windows
this.label13.TabIndex = 28; this.label13.TabIndex = 28;
this.label13.Text = "View distance:"; 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 // invertyaxis
// //
this.invertyaxis.AutoSize = true; this.invertyaxis.AutoSize = true;
@ -1139,7 +1127,6 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label viewdistancelabel; private System.Windows.Forms.Label viewdistancelabel;
private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label13;
private System.Windows.Forms.CheckBox fixedaspect;
private System.Windows.Forms.CheckBox invertyaxis; private System.Windows.Forms.CheckBox invertyaxis;
private System.Windows.Forms.ComboBox defaultviewmode; private System.Windows.Forms.ComboBox defaultviewmode;
private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label14;

View file

@ -65,7 +65,6 @@ namespace CodeImp.DoomBuilder.Windows
movespeed.Value = General.Settings.MoveSpeed / 100; movespeed.Value = General.Settings.MoveSpeed / 100;
viewdistance.Value = General.Clamp((int)(General.Settings.ViewDistance / 200.0f), viewdistance.Minimum, viewdistance.Maximum); viewdistance.Value = General.Clamp((int)(General.Settings.ViewDistance / 200.0f), viewdistance.Minimum, viewdistance.Maximum);
invertyaxis.Checked = General.Settings.InvertYAxis; invertyaxis.Checked = General.Settings.InvertYAxis;
fixedaspect.Checked = General.Settings.FixedAspect;
scriptfontbold.Checked = General.Settings.ScriptFontBold; scriptfontbold.Checked = General.Settings.ScriptFontBold;
// Fill fonts list // Fill fonts list
@ -151,7 +150,6 @@ namespace CodeImp.DoomBuilder.Windows
General.Settings.MoveSpeed = movespeed.Value * 100; General.Settings.MoveSpeed = movespeed.Value * 100;
General.Settings.ViewDistance = (float)viewdistance.Value * 200.0f; General.Settings.ViewDistance = (float)viewdistance.Value * 200.0f;
General.Settings.InvertYAxis = invertyaxis.Checked; General.Settings.InvertYAxis = invertyaxis.Checked;
General.Settings.FixedAspect = fixedaspect.Checked;
General.Settings.ScriptFontBold = scriptfontbold.Checked; General.Settings.ScriptFontBold = scriptfontbold.Checked;
General.Settings.ScriptFontName = scriptfontname.Text; General.Settings.ScriptFontName = scriptfontname.Text;

View file

@ -255,9 +255,6 @@
<metadata name="label13.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="label13.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="fixedaspect.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="invertyaxis.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="invertyaxis.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>