diff --git a/Build/Setup/slimdx.msi b/Build/Setup/slimdx.msi deleted file mode 100644 index f3b661a7..00000000 Binary files a/Build/Setup/slimdx.msi and /dev/null differ diff --git a/MakeSVNRelease.bat b/MakeSVNRelease.bat index f2157cf3..8a28941f 100644 --- a/MakeSVNRelease.bat +++ b/MakeSVNRelease.bat @@ -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 diff --git a/Setup/disclaimer.txt b/Setup/disclaimer.txt index e90e0230..271d9d84 100644 --- a/Setup/disclaimer.txt +++ b/Setup/disclaimer.txt @@ -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. diff --git a/Source/Core/Controls/SectorSlopeControl.cs b/Source/Core/Controls/SectorSlopeControl.cs index bdbef402..6ce88870 100644 --- a/Source/Core/Controls/SectorSlopeControl.cs +++ b/Source/Core/Controls/SectorSlopeControl.cs @@ -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); } diff --git a/Source/Core/General/MapManager.cs b/Source/Core/General/MapManager.cs index e95104a2..90b713c4 100644 --- a/Source/Core/General/MapManager.cs +++ b/Source/Core/General/MapManager.cs @@ -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; diff --git a/Source/Core/Windows/LinedefEditForm.Designer.cs b/Source/Core/Windows/LinedefEditForm.Designer.cs index 1a676d75..0431bfd3 100644 --- a/Source/Core/Windows/LinedefEditForm.Designer.cs +++ b/Source/Core/Windows/LinedefEditForm.Designer.cs @@ -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); } diff --git a/Source/Core/Windows/LinedefEditForm.resx b/Source/Core/Windows/LinedefEditForm.resx index 65e7e114..f7f3f9fb 100644 --- a/Source/Core/Windows/LinedefEditForm.resx +++ b/Source/Core/Windows/LinedefEditForm.resx @@ -186,15 +186,6 @@ True - - True - - - True - - - True - True @@ -204,16 +195,4 @@ True - - True - - - True - - - True - - - 17, 17 - \ No newline at end of file diff --git a/Source/Plugins/NodesViewer/NodesViewerMode.cs b/Source/Plugins/NodesViewer/NodesViewerMode.cs index 90e8a1ab..1c683aee 100644 --- a/Source/Plugins/NodesViewer/NodesViewerMode.cs +++ b/Source/Plugins/NodesViewer/NodesViewerMode.cs @@ -102,12 +102,26 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer /// /// This loads all nodes structures data from the lumps /// - 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; }