mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Added, Automap mode: added "Show hidden lines" top menu button.
Added, Automap mode: added "Show secrets" top menu button. Added, Automap mode: added "Color preset" top menu drop-down.
This commit is contained in:
parent
7243994446
commit
97dcfb0275
12 changed files with 529 additions and 9 deletions
|
@ -747,6 +747,7 @@
|
|||
<Compile Include="Config\FlagTranslation.cs" />
|
||||
<Compile Include="Config\ModelAndLightRenderModes.cs" />
|
||||
<Compile Include="Config\PasteOptions.cs" />
|
||||
<Compile Include="Config\SectorEffectData.cs" />
|
||||
<Compile Include="Config\ThingsFlagsCompare.cs" />
|
||||
<Compile Include="Controls\ActionSpecialHelpButton.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
|
|
|
@ -1113,10 +1113,10 @@ namespace CodeImp.DoomBuilder.Config
|
|||
}
|
||||
|
||||
//mxd
|
||||
public static HashSet<int> GetGeneralizedSectorEffectBits(int effect) { return GetGeneralizedSectorEffectBits(effect, General.Map.Config.GenEffectOptions); }
|
||||
public static HashSet<int> GetGeneralizedSectorEffectBits(int effect, List<GeneralizedOption> options)
|
||||
public SectorEffectData GetSectorEffectData(int effect) { return GetSectorEffectData(effect, General.Map.Config.GenEffectOptions); }
|
||||
public SectorEffectData GetSectorEffectData(int effect, List<GeneralizedOption> options)
|
||||
{
|
||||
HashSet<int> result = new HashSet<int>();
|
||||
SectorEffectData result = new SectorEffectData();
|
||||
if(effect > 0)
|
||||
{
|
||||
int cureffect = effect;
|
||||
|
@ -1128,12 +1128,12 @@ namespace CodeImp.DoomBuilder.Config
|
|||
if(bit.Index > 0 && (cureffect & bit.Index) == bit.Index)
|
||||
{
|
||||
cureffect -= bit.Index;
|
||||
result.Add(bit.Index);
|
||||
result.GeneralizedBits.Add(bit.Index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(cureffect > 0) result.Add(cureffect);
|
||||
if(cureffect > 0) result.Effect = cureffect;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
15
Source/Core/Config/SectorEffectData.cs
Normal file
15
Source/Core/Config/SectorEffectData.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace CodeImp.DoomBuilder.Config
|
||||
{
|
||||
public class SectorEffectData
|
||||
{
|
||||
public int Effect;
|
||||
public HashSet<int> GeneralizedBits;
|
||||
|
||||
public SectorEffectData()
|
||||
{
|
||||
GeneralizedBits = new HashSet<int>();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -690,7 +690,8 @@ namespace CodeImp.DoomBuilder
|
|||
// Problem! Can't save the map like this!
|
||||
General.ShowErrorMessage("Unable to save the map: there are too many unique sidedefs!" + Environment.NewLine + Environment.NewLine
|
||||
+ "Sidedefs before compresion: " + initialsidescount + Environment.NewLine
|
||||
+ "Sidedefs after compresion: " + outputset.Sidedefs.Count, MessageBoxButtons.OK);
|
||||
+ "Sidedefs after compresion: " + outputset.Sidedefs.Count
|
||||
+ " (" + (outputset.Sidedefs.Count - io.MaxSidedefs) + " sidedefs above the limit)", MessageBoxButtons.OK);
|
||||
General.MainWindow.DisplayStatus(oldstatus);
|
||||
return false;
|
||||
}
|
||||
|
|
120
Source/Plugins/AutomapMode/Interface/MenusForm.Designer.cs
generated
Normal file
120
Source/Plugins/AutomapMode/Interface/MenusForm.Designer.cs
generated
Normal file
|
@ -0,0 +1,120 @@
|
|||
namespace CodeImp.DoomBuilder.AutomapMode
|
||||
{
|
||||
partial class MenusForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.showhiddenlines = new System.Windows.Forms.ToolStripButton();
|
||||
this.showsecretsectors = new System.Windows.Forms.ToolStripButton();
|
||||
this.colorpresetseparator = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.colorpresetlabel = new System.Windows.Forms.ToolStripLabel();
|
||||
this.colorpreset = new System.Windows.Forms.ToolStripComboBox();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.showhiddenlines,
|
||||
this.showsecretsectors,
|
||||
this.colorpresetseparator,
|
||||
this.colorpresetlabel,
|
||||
this.colorpreset});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(731, 25);
|
||||
this.toolStrip1.TabIndex = 0;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
// showhiddenlines
|
||||
//
|
||||
this.showhiddenlines.CheckOnClick = true;
|
||||
this.showhiddenlines.Image = global::CodeImp.DoomBuilder.AutomapMode.Properties.Resources.ShowHiddenLines;
|
||||
this.showhiddenlines.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.showhiddenlines.Margin = new System.Windows.Forms.Padding(0, 1, 2, 2);
|
||||
this.showhiddenlines.Name = "showhiddenlines";
|
||||
this.showhiddenlines.Size = new System.Drawing.Size(123, 22);
|
||||
this.showhiddenlines.Text = "Show hidden lines";
|
||||
this.showhiddenlines.CheckedChanged += new System.EventHandler(this.showhiddenlines_CheckedChanged);
|
||||
//
|
||||
// showsecretsectors
|
||||
//
|
||||
this.showsecretsectors.CheckOnClick = true;
|
||||
this.showsecretsectors.Image = global::CodeImp.DoomBuilder.AutomapMode.Properties.Resources.ShowSecrets;
|
||||
this.showsecretsectors.Name = "showsecretsectors";
|
||||
this.showsecretsectors.Size = new System.Drawing.Size(95, 22);
|
||||
this.showsecretsectors.Text = "Show secrets";
|
||||
this.showsecretsectors.CheckedChanged += new System.EventHandler(this.showsecretsectors_CheckedChanged);
|
||||
//
|
||||
// colorpresetseparator
|
||||
//
|
||||
this.colorpresetseparator.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.colorpresetseparator.Name = "colorpresetseparator";
|
||||
this.colorpresetseparator.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// colorpresetlabel
|
||||
//
|
||||
this.colorpresetlabel.Name = "colorpresetlabel";
|
||||
this.colorpresetlabel.Size = new System.Drawing.Size(74, 22);
|
||||
this.colorpresetlabel.Text = "Color preset:";
|
||||
//
|
||||
// colorpreset
|
||||
//
|
||||
this.colorpreset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.colorpreset.Items.AddRange(new object[] {
|
||||
"Doom",
|
||||
"Hexen",
|
||||
"Strife"});
|
||||
this.colorpreset.Name = "colorpreset";
|
||||
this.colorpreset.Size = new System.Drawing.Size(121, 25);
|
||||
this.colorpreset.SelectedIndexChanged += new System.EventHandler(this.colorpreset_SelectedIndexChanged);
|
||||
//
|
||||
// MenusForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
this.Name = "MenusForm";
|
||||
this.Size = new System.Drawing.Size(731, 65);
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ToolStrip toolStrip1;
|
||||
private System.Windows.Forms.ToolStripButton showhiddenlines;
|
||||
private System.Windows.Forms.ToolStripButton showsecretsectors;
|
||||
private System.Windows.Forms.ToolStripSeparator colorpresetseparator;
|
||||
private System.Windows.Forms.ToolStripLabel colorpresetlabel;
|
||||
private System.Windows.Forms.ToolStripComboBox colorpreset;
|
||||
}
|
||||
}
|
54
Source/Plugins/AutomapMode/Interface/MenusForm.cs
Normal file
54
Source/Plugins/AutomapMode/Interface/MenusForm.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CodeImp.DoomBuilder.AutomapMode
|
||||
{
|
||||
public partial class MenusForm : UserControl
|
||||
{
|
||||
public event EventHandler OnShowHiddenLinesChanged;
|
||||
public event EventHandler OnShowSecretSectorsChanged;
|
||||
internal event EventHandler OnColorPresetChanged;
|
||||
|
||||
public bool ShowHiddenLines { get { return showhiddenlines.Checked; } set { showhiddenlines.Checked = value; } }
|
||||
public bool ShowSecretSectors { get { return showsecretsectors.Checked; } set { showsecretsectors.Checked = value; } }
|
||||
internal AutomapMode.ColorPreset ColorPreset { get { return (AutomapMode.ColorPreset)colorpreset.SelectedIndex; } set { colorpreset.SelectedIndex = (int)value; } }
|
||||
|
||||
public MenusForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void Register()
|
||||
{
|
||||
General.Interface.AddButton(showhiddenlines);
|
||||
General.Interface.AddButton(showsecretsectors);
|
||||
General.Interface.AddButton(colorpresetseparator);
|
||||
General.Interface.AddButton(colorpresetlabel);
|
||||
General.Interface.AddButton(colorpreset);
|
||||
}
|
||||
|
||||
public void Unregister()
|
||||
{
|
||||
General.Interface.RemoveButton(colorpreset);
|
||||
General.Interface.RemoveButton(colorpresetlabel);
|
||||
General.Interface.RemoveButton(colorpresetseparator);
|
||||
General.Interface.RemoveButton(showsecretsectors);
|
||||
General.Interface.RemoveButton(showhiddenlines);
|
||||
}
|
||||
|
||||
private void showhiddenlines_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if(OnShowHiddenLinesChanged != null) OnShowHiddenLinesChanged(showhiddenlines.Checked, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void showsecretsectors_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if(OnShowSecretSectorsChanged != null) OnShowSecretSectorsChanged(showsecretsectors.Checked, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void colorpreset_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if(OnColorPresetChanged != null) OnColorPresetChanged(colorpreset.SelectedIndex, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
123
Source/Plugins/AutomapMode/Interface/MenusForm.resx
Normal file
123
Source/Plugins/AutomapMode/Interface/MenusForm.resx
Normal file
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
77
Source/Plugins/AutomapMode/Properties/Resources.Designer.cs
generated
Normal file
77
Source/Plugins/AutomapMode/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,77 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.5485
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CodeImp.DoomBuilder.AutomapMode.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CodeImp.DoomBuilder.AutomapMode.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap ShowHiddenLines {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ShowHiddenLines", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap ShowSecrets {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ShowSecrets", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
127
Source/Plugins/AutomapMode/Properties/Resources.resx
Normal file
127
Source/Plugins/AutomapMode/Properties/Resources.resx
Normal file
|
@ -0,0 +1,127 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="ShowHiddenLines" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ShowHiddenLines.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ShowSecrets" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ShowSecrets.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
Source/Plugins/AutomapMode/Resources/ShowHiddenLines.png
Normal file
BIN
Source/Plugins/AutomapMode/Resources/ShowHiddenLines.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
Source/Plugins/AutomapMode/Resources/ShowSecrets.png
Normal file
BIN
Source/Plugins/AutomapMode/Resources/ShowSecrets.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -812,11 +812,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(!General.Map.Config.GeneralizedEffects || source.Effect == 0 || target.Effect == 0) return false;
|
||||
|
||||
// Get effect bits...
|
||||
HashSet<int> sourcebits = GameConfiguration.GetGeneralizedSectorEffectBits(source.Effect);
|
||||
HashSet<int> targetbits = GameConfiguration.GetGeneralizedSectorEffectBits(target.Effect);
|
||||
SectorEffectData sourcedata = General.Map.Config.GetSectorEffectData(source.Effect);
|
||||
SectorEffectData targetdata = General.Map.Config.GetSectorEffectData(target.Effect);
|
||||
|
||||
// No bits match when at least one effect is not generalized, or when bits don't overlap
|
||||
if(sourcebits.Count == 0 || targetbits.Count == 0 || !sourcebits.Overlaps(targetbits)) return false;
|
||||
if(sourcedata.Effect != targetdata.Effect
|
||||
|| sourcedata.GeneralizedBits.Count != targetdata.GeneralizedBits.Count
|
||||
|| !sourcedata.GeneralizedBits.Overlaps(targetdata.GeneralizedBits)) return false;
|
||||
}
|
||||
|
||||
if(!General.Map.UDMF) return true;
|
||||
|
|
Loading…
Reference in a new issue