Fixed, Linedef Edit form (classic): it was impossible to enable disabled front/back sides, because corresponding check-boxes were inside of corresponding groups.

Fixed, Nodes Viewer Mode: the mode was unable to handle missing node lumps properly.
Fixed, Nodes Viewer Mode: the mode no longer builds nodes when unable to find both classic nodes and ZNODES at the same time.
Removed SlimDX installer, because it's no longer required.
Internal: debug console is now cleared when opening a map.
This commit is contained in:
MaxED 2015-01-09 13:56:54 +00:00
parent 8238ae9138
commit 1b911628ac
8 changed files with 73 additions and 62 deletions

Binary file not shown.

View file

@ -139,7 +139,7 @@ ECHO.
ECHO Packing release...
ECHO.
IF EXIST "SVN_Build\*.7z" DEL /F /Q "SVN_Build\*.7z" > NUL
"%SEVENZIPDIR%\7z" a .\SVN_Build\gzdb.7z .\Build\* -xr!*.pdb -x!Setup
"%SEVENZIPDIR%\7z" a .\SVN_Build\gzdb.7z .\Build\* -xr!*.pdb -xr!*.xml -x!Setup
IF %ERRORLEVEL% NEQ 0 GOTO PACKFAIL
IF NOT EXIST .\SVN_Build\gzdb.7z GOTO FILEFAIL

View file

@ -1 +1 @@
Disclaimer of warranty: The software and documentation are provided as is without warranty of any kind. To the maximum extent permitted by applicable law, CodeImp further disclaims all warranties, including without limitation any implied warranties of merchantability, fitness for a particular purpose, and noninfringement. The entire risk arising out of the use or performance of the software and documentation remains with you. To the maximum extent permitted by applicable law, in no event shall CodeImp be liable for any consequential, incidental, direct, indirect, special, punitive, or other damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of this agreement or the use of or inability to use the product, even if CodeImp has been advised of the possibility of such damages.
Disclaimer of warranty: The software and documentation are provided as is without warranty of any kind. To the maximum extent permitted by applicable law, MaxED further disclaims all warranties, including without limitation any implied warranties of merchantability, fitness for a particular purpose, and noninfringement. The entire risk arising out of the use or performance of the software and documentation remains with you. To the maximum extent permitted by applicable law, in no event shall MaxED be liable for any consequential, incidental, direct, indirect, special, punitive, or other damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of this agreement or the use of or inability to use the product, even if MaxED has been advised of the possibility of such damages.

View file

@ -32,7 +32,7 @@ namespace CodeImp.DoomBuilder.Controls
#region ================== Variables
private bool blockUpdate;
private bool preventchanges;
// Slope values
private float anglexy;
@ -44,7 +44,7 @@ namespace CodeImp.DoomBuilder.Controls
#region ================== Properties
public StepsList StepValues { set { sloperotation.StepValues = value; } }
public bool UseLineAngles { get { return cbuselineangles.Checked; } set { blockUpdate = true; cbuselineangles.Checked = value; blockUpdate = false; } }
public bool UseLineAngles { get { return cbuselineangles.Checked; } set { preventchanges = true; cbuselineangles.Checked = value; preventchanges = false; } }
internal SlopePivotMode PivotMode
{
@ -54,9 +54,9 @@ namespace CodeImp.DoomBuilder.Controls
}
set
{
blockUpdate = true;
preventchanges = true;
pivotmodeselector.SelectedIndex = (int)value;
blockUpdate = false;
preventchanges = false;
}
}
@ -124,7 +124,7 @@ namespace CodeImp.DoomBuilder.Controls
public void UpdateControls()
{
blockUpdate = true;
preventchanges = true;
if(float.IsNaN(anglexy))
{
@ -153,14 +153,14 @@ namespace CodeImp.DoomBuilder.Controls
slopeoffset.Text = (float.IsNaN(offset) ? "" : offset.ToString());
blockUpdate = false;
preventchanges = false;
}
public void UpdateOffset()
{
blockUpdate = true;
preventchanges = true;
slopeoffset.Text = (float.IsNaN(offset) ? "" : offset.ToString());
blockUpdate = false;
preventchanges = false;
}
#endregion
@ -169,50 +169,50 @@ namespace CodeImp.DoomBuilder.Controls
private void sloperotation_WhenTextChanged(object sender, EventArgs e)
{
if(blockUpdate) return;
blockUpdate = true;
if(preventchanges) return;
preventchanges = true;
anglexy = General.ClampAngle(sloperotation.GetResultFloat(float.NaN));
rotationcontrol.Angle = (float.IsNaN(anglexy) ? GZBuilder.Controls.AngleControl.NO_ANGLE : (int)Math.Round(anglexy + 90));
if(OnAnglesChanged != null) OnAnglesChanged(this, EventArgs.Empty);
blockUpdate = false;
preventchanges = false;
}
private void rotationcontrol_AngleChanged(object sender, EventArgs e)
{
if(blockUpdate) return;
blockUpdate = true;
if(preventchanges) return;
preventchanges = true;
anglexy = General.ClampAngle(rotationcontrol.Angle - 90);
sloperotation.Text = anglexy.ToString();
if(OnAnglesChanged != null) OnAnglesChanged(this, EventArgs.Empty);
blockUpdate = false;
preventchanges = false;
}
private void slopeangle_WhenTextChanged(object sender, EventArgs e)
{
if(blockUpdate) return;
blockUpdate = true;
if(preventchanges) return;
preventchanges = true;
anglez = General.Clamp((int)Math.Round(slopeangle.GetResultFloat(0f)), angletrackbar.Minimum, angletrackbar.Maximum);
angletrackbar.Value = (int)anglez;
if(OnAnglesChanged != null) OnAnglesChanged(this, EventArgs.Empty);
blockUpdate = false;
preventchanges = false;
}
private void angletrackbar_ValueChanged(object sender, EventArgs e)
{
if(blockUpdate) return;
blockUpdate = true;
if(preventchanges) return;
preventchanges = true;
slopeangle.Text = angletrackbar.Value.ToString();
anglez = angletrackbar.Value;
if(OnAnglesChanged != null) OnAnglesChanged(this, EventArgs.Empty);
blockUpdate = false;
preventchanges = false;
}
private void slopeoffset_WhenTextChanged(object sender, EventArgs e)
@ -223,7 +223,7 @@ namespace CodeImp.DoomBuilder.Controls
private void reset_Click(object sender, EventArgs e)
{
blockUpdate = true;
preventchanges = true;
sloperotation.Text = "0";
rotationcontrol.Angle = 90;
@ -235,19 +235,19 @@ namespace CodeImp.DoomBuilder.Controls
offset = 0f;
if(OnResetClicked != null) OnResetClicked(this, EventArgs.Empty);
blockUpdate = false;
preventchanges = false;
}
private void pivotmodeselector_SelectedIndexChanged(object sender, EventArgs e)
{
if(blockUpdate) return;
if(preventchanges) return;
if(OnPivotModeChanged != null) OnPivotModeChanged(this, EventArgs.Empty);
}
private void cbuselineangles_CheckedChanged(object sender, EventArgs e)
{
sloperotation.ButtonStepsWrapAround = cbuselineangles.Checked;
if(blockUpdate) return;
if(preventchanges) return;
if(OnUseLineAnglesChanged != null) OnUseLineAnglesChanged(this, EventArgs.Empty);
}

View file

@ -239,6 +239,10 @@ namespace CodeImp.DoomBuilder
// Initializes for a new map
internal bool InitializeNewMap(MapOptions options)
{
#if DEBUG
DebugConsole.Clear();
#endif
// Apply settings
this.filetitle = "unnamed.wad";
this.filepathname = "";
@ -328,6 +332,10 @@ namespace CodeImp.DoomBuilder
WAD mapwad;
string tempfile;
#if DEBUG
DebugConsole.Clear();
#endif
// Apply settings
this.filetitle = Path.GetFileName(filepathname);
this.filepathname = filepathname;
@ -456,6 +464,10 @@ namespace CodeImp.DoomBuilder
//mxd. This switches to another map in the same wad
internal bool InitializeSwitchMap(MapOptions options)
{
#if DEBUG
DebugConsole.Clear();
#endif
this.changed = false;
this.options = options;

View file

@ -464,7 +464,7 @@ namespace CodeImp.DoomBuilder.Windows
// frontside
//
this.frontside.AutoSize = true;
this.frontside.Location = new System.Drawing.Point(11, -2);
this.frontside.Location = new System.Drawing.Point(17, 4);
this.frontside.Name = "frontside";
this.frontside.Size = new System.Drawing.Size(74, 17);
this.frontside.TabIndex = 0;
@ -477,7 +477,6 @@ namespace CodeImp.DoomBuilder.Windows
this.frontgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.frontgroup.Controls.Add(this.labelFrontTextureOffset);
this.frontgroup.Controls.Add(this.frontside);
this.frontgroup.Controls.Add(this.frontsector);
this.frontgroup.Controls.Add(label11);
this.frontgroup.Controls.Add(this.frontlow);
@ -558,7 +557,7 @@ namespace CodeImp.DoomBuilder.Windows
// backside
//
this.backside.AutoSize = true;
this.backside.Location = new System.Drawing.Point(11, -2);
this.backside.Location = new System.Drawing.Point(17, 170);
this.backside.Name = "backside";
this.backside.Size = new System.Drawing.Size(75, 17);
this.backside.TabIndex = 0;
@ -571,7 +570,6 @@ namespace CodeImp.DoomBuilder.Windows
this.backgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.backgroup.Controls.Add(this.labelBackTextureOffset);
this.backgroup.Controls.Add(this.backside);
this.backgroup.Controls.Add(this.backsector);
this.backgroup.Controls.Add(label12);
this.backgroup.Controls.Add(this.backlow);
@ -654,6 +652,8 @@ namespace CodeImp.DoomBuilder.Windows
this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel.BackColor = System.Drawing.SystemColors.Window;
this.panel.Controls.Add(this.backside);
this.panel.Controls.Add(this.frontside);
this.panel.Controls.Add(this.frontgroup);
this.panel.Controls.Add(this.backgroup);
this.panel.Controls.Add(this.flagsgroup);
@ -693,10 +693,9 @@ namespace CodeImp.DoomBuilder.Windows
this.flagsgroup.ResumeLayout(false);
this.idgroup.ResumeLayout(false);
this.frontgroup.ResumeLayout(false);
this.frontgroup.PerformLayout();
this.backgroup.ResumeLayout(false);
this.backgroup.PerformLayout();
this.panel.ResumeLayout(false);
this.panel.PerformLayout();
this.ResumeLayout(false);
}

View file

@ -186,15 +186,6 @@
<metadata name="fronthigh.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontlow.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="frontmid.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fronthigh.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backlow.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -204,16 +195,4 @@
<metadata name="backhigh.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backlow.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backmid.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="backhigh.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -102,12 +102,26 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer
/// <summary>
/// This loads all nodes structures data from the lumps
/// </summary>
private void LoadClassicStructures()
private bool LoadClassicStructures()
{
// Load the nodes structure
MemoryStream nodesstream = General.Map.GetLumpData("NODES");
BinaryReader nodesreader = new BinaryReader(nodesstream);
int numnodes = (int)nodesstream.Length / 28;
//mxd. More boilerplate
if(numnodes < 1)
{
// Close readers
nodesstream.Close();
nodesstream.Dispose();
// Cancel mode
MessageBox.Show("The map has only one subsector. Please add more sectors, then try running this mode again.", "Why are you doing this, Stanley?..", MessageBoxButtons.OK, MessageBoxIcon.Error);
General.Editing.CancelMode();
return false;
}
BinaryReader nodesreader = new BinaryReader(nodesstream);
nodes = new Node[numnodes];
for(int i = 0; i < nodes.Length; i++)
{
@ -195,6 +209,8 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer
segs[sg].ssector = i;
}
}
return true;
}
//mxd. This loads all data from the ZNODES lump
@ -776,17 +792,24 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer
return;
}
//mxd. No need to check for these twice
//mxd
bool haveNodes = General.Map.LumpExists("NODES");
bool haveZnodes = General.Map.LumpExists("ZNODES");
bool haveSectors = General.Map.LumpExists("SSECTORS");
bool haveSegs = General.Map.LumpExists("SEGS");
bool haveVerts = General.Map.LumpExists("VERTEXES");
if(General.Map.IsChanged || !haveNodes || !haveSectors || !haveSegs || !haveVerts || !haveZnodes)
if(General.Map.IsChanged || !(haveZnodes || (haveNodes || haveSectors || haveSegs || haveVerts)))
{
// We need to build the nodes!
BuildNodes();
//mxd. Update nodes availability
haveNodes = General.Map.LumpExists("NODES");
haveZnodes = General.Map.LumpExists("ZNODES");
haveSectors = General.Map.LumpExists("SSECTORS");
haveSegs = General.Map.LumpExists("SEGS");
haveVerts = General.Map.LumpExists("VERTEXES");
}
//mxd
@ -795,6 +818,7 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer
General.Interface.DisplayStatus(StatusType.Busy, "Reading map nodes...");
if(!LoadZNodes())
{
General.Interface.DisplayStatus(StatusType.Warning, "Failed to read map nodes.");
General.Editing.CancelMode();
return;
}
@ -830,12 +854,9 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer
}
General.Interface.DisplayStatus(StatusType.Busy, "Reading map nodes...");
LoadClassicStructures();
//mxd. More boilerplate
if (nodes.Length < 1)
if(!LoadClassicStructures())
{
MessageBox.Show("The map has only one subsector.", "Why are you doing this, Stanley?..", MessageBoxButtons.OK, MessageBoxIcon.Error);
General.Interface.DisplayStatus(StatusType.Warning, "Failed to read map nodes.");
General.Editing.CancelMode();
return;
}