GZDoom Builder 1.12:

GZDoom Builder now uses SharpCompress.dll instead of SharpZip.dll.
Added PK7 archive support.
PK3 archives now load aprox. 40% faster.
Textures browser now shows Folder/PK3/PK7 folder structure.
TextureBrowserForm is now used to display both Textures and Flats.
ACS scripts from #include and #import directives are now shown in Script name/number dropdowns.
Fixed several cases when ACS scripts lists used in Edit Thing and Edit Linedef forms wasn't updated when they should've (i.e. after compiling a script).
This commit is contained in:
MaxED 2012-07-23 21:28:23 +00:00
parent cc6424fb1c
commit 70ea0658ed
56 changed files with 1399 additions and 1005 deletions

BIN
Build/SharpCompress.3.5.dll Normal file

Binary file not shown.

Binary file not shown.

View file

@ -234,12 +234,16 @@
<param name="Name" value="New settings">
<param name="Local" value="gz_settings.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Enhanced scripting workflow">
<param name="Local" value="gz_acsex.html">
</OBJECT>
<UL>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Enhanced textures browser">
<param name="Local" value="gz_texbrowser.html">
</OBJECT>
<UL>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="New editing modes">
<param name="Local" value="gz_editmodes.html">

View file

@ -23,6 +23,7 @@
<li>Dynamic lights defined in GLDEFS are rendered in Visual modes.</li>
<li>Animated lights.</li>
<li><a href="gz_acsex.html">Enhanced scripting workflow</a>.</li>
<li><a href="gz_texbrowser.html">Enhanced textures browser</a>.</li>
<li>Partial <a href="gz_gldefs.html">GLDEFS</a> and <a href="gz_mapinfo.html">(Z)MAPINFO support.</a></li>
<li>Fog rendering (including colored fog in maps in UDMF format).</li>
<li><a href="gz_gldefs.html">MD2 and MD3 models</a> rendering in 2D and 3D modes.</li>
@ -31,8 +32,8 @@
<li><a href="gz_actions.html#newtestmap">"Test Map from current position"</a> feature.</li>
<li><a href="gz_settings.html">"Sync camera position between 2D and 3D modes"</a> feature.</li>
<li><a href="gz_actions.html#movethingtocursor">"Place Things at cursor position in Visual Modes"</a> feature.</li>
<li>PNG image format support.</li>
<li>PK7 archive format support.</li>
<li><a href="gz_plug_colorpicker.html">Color Picker plugin.</a></li>
<li><a href="gz_plug_udmfcontrols.html">UDMF Controls plugin.</a></li>
<li><a href="gz_plug_tagexplorer.html">Tag Explorer plugin.</a></li>

24
Help/gz_texbrowser.html Normal file
View file

@ -0,0 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GZDoom Builder features</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="default.css" media="screen" title="Default" />
</head>
<body>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="Template">
</object>
<div id="gz_title"><h1>Textures browser</h1></div>
<div id="contents">
<p><img style="float:left; margin-right:10px" src="gz_texbrowser.jpg"/>Texture browser will display directory structure of Folder, PK3 and PK7 resources, allowing you to group textures easier.<br /><br />
<strong>Technical notice:</strong><br />
For textures defined in TEXTURES lump, location of first patch is used as texture path.<br />
</p>
</div>
</body>

BIN
Help/gz_texbrowser.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View file

@ -276,12 +276,6 @@
<Compile Include="Controls\FieldsEditorControl.Designer.cs">
<DependentUpon>FieldsEditorControl.cs</DependentUpon>
</Compile>
<Compile Include="Windows\FlatBrowserForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Windows\FlatBrowserForm.Designer.cs">
<DependentUpon>FlatBrowserForm.cs</DependentUpon>
</Compile>
<Compile Include="Windows\DelayedForm.cs">
<SubType>Form</SubType>
</Compile>
@ -497,9 +491,7 @@
<Compile Include="Rendering\WorldVertex.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Sharpzip, Version=0.85.2.329, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Build\Sharpzip.dll</HintPath>
<Reference Include="SharpCompress.3.5, Version=0.8.1.0, Culture=neutral, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="SlimDX, Version=2.0.13.43, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=x86" />
@ -596,10 +588,6 @@
<SubType>Designer</SubType>
<DependentUpon>FieldsEditorControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\FlatBrowserForm.resx">
<DependentUpon>FlatBrowserForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Windows\DelayedForm.resx">
<SubType>Designer</SubType>
<DependentUpon>DelayedForm.cs</DependentUpon>
@ -720,6 +708,7 @@
<Compile Include="GZBuilder\Data\ModeldefEntry.cs" />
<Compile Include="GZBuilder\Data\ScriptItem.cs" />
<Compile Include="GZBuilder\Data\ScriptType.cs" />
<Compile Include="GZBuilder\Data\SharpCompressHelper.cs" />
<Compile Include="GZBuilder\Data\TextureData.cs" />
<Compile Include="GZBuilder\Data\ThingBoundingBox.cs" />
<Compile Include="GZBuilder\Data\ThingCopyData.cs" />

View file

@ -71,7 +71,8 @@ namespace CodeImp.DoomBuilder.Controls
string result;
// Browse for texture
result = FlatBrowserForm.Browse(this.ParentForm, imagename);
//result = FlatBrowserForm.Browse(this.ParentForm, imagename);
result = TextureBrowserForm.Browse(this.ParentForm, imagename, true); //mxd
if(result != null) return result; else return imagename;
}
}

View file

@ -29,127 +29,129 @@ namespace CodeImp.DoomBuilder.Controls
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.splitter = new System.Windows.Forms.SplitContainer();
this.list = new CodeImp.DoomBuilder.Controls.OptimizedListView();
this.texturesize = new System.Windows.Forms.Label();
this.texturesizelabel = new System.Windows.Forms.Label();
this.objectname = new System.Windows.Forms.TextBox();
this.label = new System.Windows.Forms.Label();
this.refreshtimer = new System.Windows.Forms.Timer(this.components);
this.texturesizetimer = new System.Windows.Forms.Timer(this.components);
this.splitter.Panel1.SuspendLayout();
this.splitter.Panel2.SuspendLayout();
this.splitter.SuspendLayout();
this.SuspendLayout();
//
// splitter
//
this.splitter.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitter.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitter.IsSplitterFixed = true;
this.splitter.Location = new System.Drawing.Point(0, 0);
this.splitter.Name = "splitter";
this.splitter.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitter.Panel1
//
this.splitter.Panel1.Controls.Add(this.list);
//
// splitter.Panel2
//
this.splitter.Panel2.Controls.Add(this.texturesize);
this.splitter.Panel2.Controls.Add(this.texturesizelabel);
this.splitter.Panel2.Controls.Add(this.objectname);
this.splitter.Panel2.Controls.Add(this.label);
this.splitter.Size = new System.Drawing.Size(518, 346);
this.splitter.SplitterDistance = 312;
this.splitter.TabIndex = 0;
this.splitter.TabStop = false;
//
// list
//
this.list.Dock = System.Windows.Forms.DockStyle.Fill;
this.list.HideSelection = false;
this.list.Location = new System.Drawing.Point(0, 0);
this.list.MultiSelect = false;
this.list.Name = "list";
this.list.OwnerDraw = true;
this.list.ShowItemToolTips = true;
this.list.Size = new System.Drawing.Size(518, 312);
this.list.TabIndex = 1;
this.list.TabStop = false;
this.list.TileSize = new System.Drawing.Size(90, 90);
this.list.UseCompatibleStateImageBehavior = false;
this.list.View = System.Windows.Forms.View.Tile;
this.list.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.list_DrawItem);
this.list.DoubleClick += new System.EventHandler(this.list_DoubleClick);
this.list.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.list_ItemSelectionChanged);
this.list.KeyDown += new System.Windows.Forms.KeyEventHandler(this.list_KeyDown);
//
// texturesize
//
this.texturesize.Location = new System.Drawing.Point(368, 13);
this.texturesize.Name = "texturesize";
this.texturesize.Size = new System.Drawing.Size(271, 14);
this.texturesize.TabIndex = 2;
this.texturesize.Text = "1024 x 1024";
this.texturesize.Visible = false;
//
// texturesizelabel
//
this.texturesizelabel.AutoSize = true;
this.texturesizelabel.Location = new System.Drawing.Point(331, 13);
this.texturesizelabel.Name = "texturesizelabel";
this.texturesizelabel.Size = new System.Drawing.Size(31, 14);
this.texturesizelabel.TabIndex = 1;
this.texturesizelabel.Text = "Size:";
this.texturesizelabel.Visible = false;
//
// objectname
//
this.objectname.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.objectname.Location = new System.Drawing.Point(145, 10);
this.objectname.Name = "objectname";
this.objectname.Size = new System.Drawing.Size(122, 20);
this.objectname.TabIndex = 0;
this.objectname.TabStop = false;
this.objectname.TextChanged += new System.EventHandler(this.objectname_TextChanged);
this.objectname.KeyDown += new System.Windows.Forms.KeyEventHandler(this.objectname_KeyDown);
//
// label
//
this.label.AutoSize = true;
this.label.Location = new System.Drawing.Point(1, 13);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(138, 14);
this.label.TabIndex = 0;
this.label.Text = "Select or type object name:";
//
// refreshtimer
//
this.refreshtimer.Interval = 500;
this.refreshtimer.Tick += new System.EventHandler(this.refreshtimer_Tick);
//
// texturesizetimer
//
this.texturesizetimer.Interval = 3;
this.texturesizetimer.Tick += new System.EventHandler(this.texturesizetimer_Tick);
//
// ImageBrowserControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.splitter);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "ImageBrowserControl";
this.Size = new System.Drawing.Size(518, 346);
this.Resize += new System.EventHandler(this.ImageBrowserControl_Resize);
this.splitter.Panel1.ResumeLayout(false);
this.splitter.Panel2.ResumeLayout(false);
this.splitter.Panel2.PerformLayout();
this.splitter.ResumeLayout(false);
this.ResumeLayout(false);
this.components = new System.ComponentModel.Container();
this.splitter = new System.Windows.Forms.SplitContainer();
this.list = new CodeImp.DoomBuilder.Controls.OptimizedListView();
this.texturesize = new System.Windows.Forms.Label();
this.texturesizelabel = new System.Windows.Forms.Label();
this.objectname = new System.Windows.Forms.TextBox();
this.label = new System.Windows.Forms.Label();
this.refreshtimer = new System.Windows.Forms.Timer(this.components);
this.texturesizetimer = new System.Windows.Forms.Timer(this.components);
this.splitter.Panel1.SuspendLayout();
this.splitter.Panel2.SuspendLayout();
this.splitter.SuspendLayout();
this.SuspendLayout();
//
// splitter
//
this.splitter.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitter.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitter.IsSplitterFixed = true;
this.splitter.Location = new System.Drawing.Point(0, 0);
this.splitter.Name = "splitter";
this.splitter.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitter.Panel1
//
this.splitter.Panel1.Controls.Add(this.list);
//
// splitter.Panel2
//
this.splitter.Panel2.Controls.Add(this.texturesize);
this.splitter.Panel2.Controls.Add(this.texturesizelabel);
this.splitter.Panel2.Controls.Add(this.objectname);
this.splitter.Panel2.Controls.Add(this.label);
this.splitter.Size = new System.Drawing.Size(518, 346);
this.splitter.SplitterDistance = 312;
this.splitter.TabIndex = 0;
this.splitter.TabStop = false;
//
// list
//
this.list.Dock = System.Windows.Forms.DockStyle.Fill;
this.list.HideSelection = false;
this.list.Location = new System.Drawing.Point(0, 0);
this.list.MultiSelect = false;
this.list.Name = "list";
this.list.OwnerDraw = true;
this.list.ShowItemToolTips = true;
this.list.Size = new System.Drawing.Size(518, 312);
this.list.TabIndex = 1;
this.list.TabStop = false;
this.list.TileSize = new System.Drawing.Size(90, 90);
this.list.UseCompatibleStateImageBehavior = false;
this.list.View = System.Windows.Forms.View.Tile;
this.list.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.list_DrawItem);
this.list.DoubleClick += new System.EventHandler(this.list_DoubleClick);
this.list.MouseEnter += new System.EventHandler(this.list_MouseEnter);
this.list.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.list_ItemSelectionChanged);
this.list.KeyDown += new System.Windows.Forms.KeyEventHandler(this.list_KeyDown);
//
// texturesize
//
this.texturesize.Location = new System.Drawing.Point(368, 13);
this.texturesize.Name = "texturesize";
this.texturesize.Size = new System.Drawing.Size(271, 14);
this.texturesize.TabIndex = 2;
this.texturesize.Text = "1024 x 1024";
this.texturesize.Visible = false;
//
// texturesizelabel
//
this.texturesizelabel.AutoSize = true;
this.texturesizelabel.Location = new System.Drawing.Point(331, 13);
this.texturesizelabel.Name = "texturesizelabel";
this.texturesizelabel.Size = new System.Drawing.Size(31, 14);
this.texturesizelabel.TabIndex = 1;
this.texturesizelabel.Text = "Size:";
this.texturesizelabel.Visible = false;
//
// objectname
//
this.objectname.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.objectname.Location = new System.Drawing.Point(145, 10);
this.objectname.Name = "objectname";
this.objectname.Size = new System.Drawing.Size(122, 20);
this.objectname.TabIndex = 0;
this.objectname.TabStop = false;
this.objectname.TextChanged += new System.EventHandler(this.objectname_TextChanged);
this.objectname.KeyDown += new System.Windows.Forms.KeyEventHandler(this.objectname_KeyDown);
this.objectname.MouseEnter += new System.EventHandler(this.objectname_MouseEnter);
//
// label
//
this.label.AutoSize = true;
this.label.Location = new System.Drawing.Point(1, 13);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(138, 14);
this.label.TabIndex = 0;
this.label.Text = "Select or type object name:";
//
// refreshtimer
//
this.refreshtimer.Interval = 500;
this.refreshtimer.Tick += new System.EventHandler(this.refreshtimer_Tick);
//
// texturesizetimer
//
this.texturesizetimer.Interval = 3;
this.texturesizetimer.Tick += new System.EventHandler(this.texturesizetimer_Tick);
//
// ImageBrowserControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.splitter);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "ImageBrowserControl";
this.Size = new System.Drawing.Size(518, 346);
this.Resize += new System.EventHandler(this.ImageBrowserControl_Resize);
this.splitter.Panel1.ResumeLayout(false);
this.splitter.Panel2.ResumeLayout(false);
this.splitter.Panel2.PerformLayout();
this.splitter.ResumeLayout(false);
this.ResumeLayout(false);
}

View file

@ -236,6 +236,16 @@ namespace CodeImp.DoomBuilder.Controls
texturesize.Visible = false;
texturesizelabel.Visible = false;
}
//mxd
private void list_MouseEnter(object sender, EventArgs e) {
FocusList();
}
//mxd
private void objectname_MouseEnter(object sender, EventArgs e) {
objectname.Focus();
}
#endregion
@ -506,6 +516,11 @@ namespace CodeImp.DoomBuilder.Controls
{
objectname.Focus();
}
//mxd. This sends the focus to the list
public void FocusList() {
list.Focus();
}
// This updates the texture size label
private void UpdateTextureSizeLabel()

View file

@ -184,9 +184,7 @@ namespace CodeImp.DoomBuilder.Controls
}
// This compiles the script
public virtual void Compile()
{
}
public virtual void Compile() { }
// This saves the document (used for both explicit and implicit)
// Return true when successfully saved

View file

@ -134,6 +134,11 @@ namespace CodeImp.DoomBuilder.Controls
errors.Add(newerr);
}
//mxd. Should be called only if script is compiled successfully
if (compiler.Errors.Length == 0 && config.Description == ScriptTypes.TYPES[(int)ScriptType.ACS]) {
General.Map.UpdateScriptNames();
}
}
// Dispose compiler

View file

@ -111,11 +111,17 @@ namespace CodeImp.DoomBuilder.Controls
// Compile script
public override void Compile()
{
// Compile
bool success = false; //mxd
// Compile
if(ismapheader)
General.Map.CompileLump(MapManager.CONFIG_MAP_HEADER, true);
success = General.Map.CompileLump(MapManager.CONFIG_MAP_HEADER, true);
else
General.Map.CompileLump(lumpname, true);
success = General.Map.CompileLump(lumpname, true);
//mxd
if (success && config.Description == ScriptTypes.TYPES[(int)ScriptType.ACS])
General.Map.UpdateScriptNames();
// Feed errors to panel
panel.ShowErrors(General.Map.Errors);

View file

@ -81,7 +81,7 @@ namespace CodeImp.DoomBuilder.Controls
string result;
// Browse for texture
result = TextureBrowserForm.Browse(this.ParentForm, imagename);
result = TextureBrowserForm.Browse(this.ParentForm, imagename, false);
if(result != null) return result; else return imagename;
}
}

View file

@ -433,7 +433,7 @@ namespace CodeImp.DoomBuilder.Data
StartBackgroundLoader();
// Output info
General.WriteLogLine("Loaded " + texcount + " textures, " + flatcount + " flats, " + colormapcount + " colormaps, " + spritecount + " sprites, " + thingcount + " decorate things");
General.WriteLogLine("Loaded " + texcount + " textures, " + flatcount + " flats, " + colormapcount + " colormaps, " + spritecount + " sprites, " + thingcount + " decorate things, " + modeldefEntries.Count + " model deinitions, " + gldefsEntries.Count + " gl definitions");
}
// This unloads all data
@ -869,6 +869,19 @@ namespace CodeImp.DoomBuilder.Data
return null;
}
//mxd
internal string GetPatchLocation(string pname) {
string fullName = pname;
// Go for all opened containers
for (int i = containers.Count - 1; i >= 0; i--) {
// This contain provides this patch?
fullName = containers[i].GetPatchLocation(pname);
if (fullName != pname) return fullName;
}
return pname;
}
// This returns a specific texture stream
internal Stream GetTextureData(string pname)
{
@ -1399,7 +1412,6 @@ namespace CodeImp.DoomBuilder.Data
currentreader = null;
if (mde.Model != null) {
//GZBuilder.GZGeneral.Trace("Loaded model for Thing ¹" + t.Type);
return true;
} else {
modeldefEntries.Remove(t.Type);
@ -1517,22 +1529,6 @@ namespace CodeImp.DoomBuilder.Data
else
GZBuilder.GZGeneral.LogAndTraceWarning("Got MODELDEF override for class '" + e.Key + "', but haven't found such class in Decorate");
}
//dbg
/*foreach (KeyValuePair<int, ModeldefEntry> group in modeldefEntries) {
GZBuilder.GZGeneral.Trace("MDE for thing " + group.Key + ":");
GZBuilder.GZGeneral.Trace("Name: " + group.Value.ClassName);
GZBuilder.GZGeneral.Trace("Path: " + group.Value.Path);
foreach (string d in group.Value.ModelNames)
GZBuilder.GZGeneral.Trace("ModelName: " + d);
foreach (string d in group.Value.TextureNames)
GZBuilder.GZGeneral.Trace("TextureName: " + d);
GZBuilder.GZGeneral.Trace("Scale: " + group.Value.Scale.X + "," + group.Value.Scale.Y + "," + group.Value.Scale.Z);
GZBuilder.GZGeneral.Trace("zOffset: " + group.Value.zOffset);
}*/
}
//mxd. This parses gldefs. Should be called after all DECORATE actors are parsed and actorsByClass dictionary created
@ -1548,9 +1544,6 @@ namespace CodeImp.DoomBuilder.Data
GldefsParser parser = new GldefsParser();
parser.OnInclude = loadGldefsFromLocation;
//dbg
//GZBuilder.GZGeneral.Trace("Base game is " + General.Map.Config.GameType);
//load default GZDoom gldefs for current game
if (loadDefaultDefinitions && General.Map.Config.GameType != GameType.UNKNOWN) {
string defaultGldefsPath = Gldefs.GLDEFS_LUMPS_PER_GAME[(int)General.Map.Config.GameType].ToLowerInvariant() + ".txt";
@ -1590,31 +1583,10 @@ namespace CodeImp.DoomBuilder.Data
GZBuilder.GZGeneral.LogAndTraceWarning("Got GLDEFS light for class '" + e.Key + "', but haven't found such class in Decorate");
}
}
//dbg
/*GZBuilder.GZGeneral.Trace("******************************************");
foreach (KeyValuePair<int, GZDoomLight> group in gldefsEntries) {
GZBuilder.GZGeneral.Trace("----------------------------------------");
GZBuilder.GZGeneral.Trace("gldefsEntry for id " + group.Key + ":");
GZBuilder.GZGeneral.Trace("Color: " + group.Value.Color.Red + "," + group.Value.Color.Green + "," + group.Value.Color.Blue);
GZBuilder.GZGeneral.Trace("PrimaryRadius: " + group.Value.PrimaryRadius);
GZBuilder.GZGeneral.Trace("SecondaryRadius: " + group.Value.SecondaryRadius);
GZBuilder.GZGeneral.Trace("Interval: " + group.Value.Interval);
GZBuilder.GZGeneral.Trace("Offset: " + group.Value.Offset.X + "," + group.Value.Offset.Y + "," + group.Value.Offset.Z);
//GZBuilder.GZGeneral.Trace("Scale: " + group.Value.Scale);
GZBuilder.GZGeneral.Trace("Type: " + group.Value.Type);
//GZBuilder.GZGeneral.Trace("Chance: " + group.Value.Chance);
GZBuilder.GZGeneral.Trace("Subtractive: " + group.Value.Subtractive);
GZBuilder.GZGeneral.Trace("DontLightSelf: " + group.Value.DontLightSelf);
}*/
}
//mxd. This loads (Z)MAPINFO
private void loadMapInfo() {
//dbg
//GZBuilder.GZGeneral.Trace("Loading MAPINFO for map " + General.Map.Options.LevelName);
MapinfoParser parser = new MapinfoParser();
foreach (DataReader dr in containers) {
@ -1623,7 +1595,6 @@ namespace CodeImp.DoomBuilder.Data
Dictionary<string, Stream> streams = dr.GetMapinfoData();
foreach (KeyValuePair<string, Stream> group in streams) {
// Parse the data
//group.Value.Seek(0, SeekOrigin.Begin);
parser.Parse(group.Value, Path.Combine(currentreader.Location.location, group.Key), General.Map.Options.LevelName);
}
}
@ -1633,24 +1604,6 @@ namespace CodeImp.DoomBuilder.Data
mapInfo = parser.MapInfo;
else
mapInfo = new MapInfo();
//dbg
/*GZBuilder.GZGeneral.Trace("********************************");
GZBuilder.GZGeneral.Trace("MAPINFO for map " + General.Map.Options.LevelName + ":");
GZBuilder.GZGeneral.Trace("EvenLighting: " + mapInfo.EvenLighting);
GZBuilder.GZGeneral.Trace("HasFadeColor: " + mapInfo.HasFadeColor);
GZBuilder.GZGeneral.Trace("FadeColor: " + mapInfo.FadeColor.Red + "," + mapInfo.FadeColor.Green + "," + mapInfo.FadeColor.Blue);
GZBuilder.GZGeneral.Trace("HasOutsideFogColor: " + mapInfo.HasOutsideFogColor);
GZBuilder.GZGeneral.Trace("OutsideFogColor: " + mapInfo.OutsideFogColor.Red + "," + mapInfo.OutsideFogColor.Green + "," + mapInfo.OutsideFogColor.Blue);
GZBuilder.GZGeneral.Trace("Sky1: " + mapInfo.Sky1);
GZBuilder.GZGeneral.Trace("Sky1ScrollSpeed: " + mapInfo.Sky1ScrollSpeed);
GZBuilder.GZGeneral.Trace("Sky2: " + mapInfo.Sky2);
GZBuilder.GZGeneral.Trace("Sky2ScrollSpeed: " + mapInfo.Sky2ScrollSpeed);
GZBuilder.GZGeneral.Trace("DoubleSky: " + mapInfo.DoubleSky);
//GZBuilder.GZGeneral.Trace("SmoothLighting: " + mapInfo.SmoothLighting);
GZBuilder.GZGeneral.Trace("HorizWallShade: " + mapInfo.HorizWallShade);
GZBuilder.GZGeneral.Trace("VertWallShade: " + mapInfo.VertWallShade);
GZBuilder.GZGeneral.Trace("********************************");*/
}
private void loadGldefsFromLocation(GldefsParser parser, string location) {
@ -1660,6 +1613,15 @@ namespace CodeImp.DoomBuilder.Data
parser.Parse(group.Value, group.Key);
}
//mxd
internal MemoryStream LoadFile(string name) {
foreach (DataReader dr in containers) {
if (dr.FileExists(name))
return dr.LoadFile(name);
}
return null;
}
#endregion
#region ================== Tools

View file

@ -121,6 +121,9 @@ namespace CodeImp.DoomBuilder.Data
// When implemented, this returns the patch lump
public virtual Stream GetPatchData(string pname) { return null; }
//mxd. When implemented, this returns a path to... path (like /patches/walls/WALL001.png)
public virtual string GetPatchLocation(string pname) { return pname; }
// When implemented, this returns the texture lump
public virtual Stream GetTextureData(string pname) { return null; }
@ -152,7 +155,7 @@ namespace CodeImp.DoomBuilder.Data
#endregion
#region ================== Decorate, Modeldef, Mapinfo, Gldefs
#region ================== Decorate, Modeldef, Mapinfo, Gldefs, etc...
// When implemented, this returns the decorate lump
public virtual List<Stream> GetDecorateData(string pname) { return new List<Stream>(); }
@ -167,6 +170,11 @@ namespace CodeImp.DoomBuilder.Data
public virtual Dictionary<string, Stream> GetGldefsData(GameType gameType) { return new Dictionary<string, Stream>(); }
public virtual Dictionary<string, Stream> GetGldefsData(string location) { return new Dictionary<string, Stream>(); }
//mxd
internal virtual MemoryStream LoadFile(string name) { return null; }
//mxd
internal virtual bool FileExists(string filename) { return false; }
#endregion
}
}

View file

@ -268,7 +268,7 @@ namespace CodeImp.DoomBuilder.Data
}
// This returns true if the specified file exists
public override bool FileExists(string filename)
internal override bool FileExists(string filename)
{
return files.FileExists(filename);
}
@ -314,7 +314,7 @@ namespace CodeImp.DoomBuilder.Data
// This loads an entire file in memory and returns the stream
// NOTE: Callers are responsible for disposing the stream!
public override MemoryStream LoadFile(string filename)
internal override MemoryStream LoadFile(string filename)
{
return new MemoryStream(File.ReadAllBytes(Path.Combine(location.location, filename)));
}

View file

@ -34,7 +34,7 @@ namespace CodeImp.DoomBuilder.Data
{
#region ================== Variables
private string filepathname;
//private string filepathname;
private int probableformat;
#endregion
@ -45,7 +45,8 @@ namespace CodeImp.DoomBuilder.Data
public FileImage(string name, string filepathname, bool asflat)
{
// Initialize
this.filepathname = filepathname;
//this.filepathname = filepathname;
this.fullName = filepathname;
SetName(name);
if(asflat)
@ -69,7 +70,7 @@ namespace CodeImp.DoomBuilder.Data
public FileImage(string name, string filepathname, bool asflat, float scalex, float scaley)
{
// Initialize
this.filepathname = filepathname;
this.fullName = filepathname;
this.scale.x = scalex;
this.scale.y = scaley;
SetName(name);
@ -97,7 +98,7 @@ namespace CodeImp.DoomBuilder.Data
{
// Load file data
if(bitmap != null) bitmap.Dispose(); bitmap = null;
MemoryStream filedata = new MemoryStream(File.ReadAllBytes(filepathname));
MemoryStream filedata = new MemoryStream(File.ReadAllBytes(fullName));
// Get a reader for the data
IImageReader reader = ImageDataFormat.GetImageReader(filedata, probableformat, General.Map.Data.Palette);
@ -116,7 +117,7 @@ namespace CodeImp.DoomBuilder.Data
// Not loaded?
if(bitmap == null)
{
General.ErrorLogger.Add(ErrorType.Error, "Image file '" + filepathname + "' data format could not be read, while loading image '" + this.Name + "'. Is this a valid picture file at all?");
General.ErrorLogger.Add(ErrorType.Error, "Image file '" + fullName + "' data format could not be read, while loading image '" + this.Name + "'. Is this a valid picture file at all?");
loadfailed = true;
}
else

View file

@ -36,6 +36,7 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Variables
private List<TexturePatch> patches;
private bool gotFullName;//mxd
#endregion
@ -66,6 +67,12 @@ namespace CodeImp.DoomBuilder.Data
{
// Add it
patches.Add(patch);
//mxd. Get full name from first patch
if (!gotFullName) {
fullName = General.Map.Data.GetPatchLocation(patch.lumpname);
gotFullName = true;
}
}
// This loads the image

View file

@ -54,6 +54,8 @@ namespace CodeImp.DoomBuilder.Data
protected Vector2D scale;
protected bool worldpanning;
protected bool usecolorcorrection;
//mxd
protected string fullName; //name with path;
// Loading
private volatile ImageLoadState previewstate;
@ -83,6 +85,8 @@ namespace CodeImp.DoomBuilder.Data
public string Name { get { return name; } }
public long LongName { get { return longname; } }
//mxd
public string FullName { get { return fullName; } }
public bool UseColorCorrection { get { return usecolorcorrection; } set { usecolorcorrection = value; } }
public Texture Texture { get { lock(this) { return texture; } } }
public bool IsPreviewLoaded { get { return (previewstate == ImageLoadState.Ready); } }
@ -178,6 +182,9 @@ namespace CodeImp.DoomBuilder.Data
{
this.name = name;
this.longname = Lump.MakeLongName(name);
//mxd
if (this.fullName == null)
this.fullName = name;
}
// This unloads the image

View file

@ -35,7 +35,7 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Variables
private PK3Reader datareader;
private string filepathname;
//private string filepathname;
private int probableformat;
#endregion
@ -47,7 +47,8 @@ namespace CodeImp.DoomBuilder.Data
{
// Initialize
this.datareader = datareader;
this.filepathname = filepathname;
//this.filepathname = filepathname;
this.fullName = filepathname;
SetName(name);
if(asflat)
@ -81,7 +82,7 @@ namespace CodeImp.DoomBuilder.Data
{
// Load file data
if(bitmap != null) bitmap.Dispose(); bitmap = null;
MemoryStream filedata = datareader.ExtractFile(filepathname);
MemoryStream filedata = datareader.ExtractFile(fullName); //mxd
// Get a reader for the data
IImageReader reader = ImageDataFormat.GetImageReader(filedata, probableformat, General.Map.Data.Palette);
@ -100,7 +101,7 @@ namespace CodeImp.DoomBuilder.Data
// Not loaded?
if(bitmap == null)
{
General.ErrorLogger.Add(ErrorType.Error, "Image file '" + filepathname + "' data format could not be read, while loading texture '" + this.Name + "'");
General.ErrorLogger.Add(ErrorType.Error, "Image file '" + fullName + "' data format could not be read, while loading texture '" + this.Name + "'");
loadfailed = true;
}
else

View file

@ -25,7 +25,11 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using CodeImp.DoomBuilder.IO;
using ICSharpCode.SharpZipLib.Zip;
//using ICSharpCode.SharpZipLib.Zip;
//mxd
using SharpCompress.Archive;
using SharpCompress.Common;
using SharpCompress.Reader;
#endregion
@ -36,6 +40,9 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Variables
private DirectoryFilesList files;
private IArchive archive;//mxd
private ArchiveType archiveType; //mxd
private static Dictionary<string, byte[]> sevenZipEntries; //mxd
#endregion
@ -44,31 +51,42 @@ namespace CodeImp.DoomBuilder.Data
// Constructor
public PK3Reader(DataLocation dl) : base(dl)
{
General.WriteLogLine("Opening PK3 resource '" + location.location + "'");
General.WriteLogLine("Opening " + Path.GetExtension(location.location).ToUpper().Replace(".", "") + " resource '" + location.location + "'");
if(!File.Exists(location.location))
throw new FileNotFoundException("Could not find the file \"" + location.location + "\"", location.location);
// Open the zip file
ZipInputStream zipstream = OpenPK3File();
// Make list of all files
List<DirectoryFileEntry> fileentries = new List<DirectoryFileEntry>();
ZipEntry entry = zipstream.GetNextEntry();
while(entry != null)
{
if(entry.IsFile) fileentries.Add(new DirectoryFileEntry(entry.Name));
// Next
entry = zipstream.GetNextEntry();
}
// Make files list
files = new DirectoryFilesList(fileentries);
// Make list of all files
List<DirectoryFileEntry> fileentries = new List<DirectoryFileEntry>();
// Done with the zip file
zipstream.Close();
zipstream.Dispose();
//mxd
archive = ArchiveFactory.Open(location.location);
archiveType = archive.Type;
if (archive.Type == ArchiveType.SevenZip) { //random access of 7z archives works TERRIBLY slow in SharpCompress
sevenZipEntries = new Dictionary<string, byte[]>();
IReader reader = archive.ExtractAllEntries();
while (reader.MoveToNextEntry()) {
if (!reader.Entry.IsDirectory) {
MemoryStream s = new MemoryStream();
reader.WriteEntryTo(s);
sevenZipEntries.Add(reader.Entry.FilePath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar), s.ToArray());
fileentries.Add(new DirectoryFileEntry(reader.Entry.FilePath));
}
}
archive.Dispose();
archive = null;
} else {
foreach (IEntry entry in archive.Entries) {
if (!entry.IsDirectory)
fileentries.Add(new DirectoryFileEntry(entry.FilePath));
}
}
// Make files list
files = new DirectoryFilesList(fileentries);
// Initialize without path (because we use paths relative to the PK3 file)
Initialize();
@ -83,8 +101,9 @@ namespace CodeImp.DoomBuilder.Data
// Not already disposed?
if(!isdisposed)
{
General.WriteLogLine("Closing PK3 resource '" + location.location + "'");
General.WriteLogLine("Closing " + Path.GetExtension(location.location).ToUpper().Replace(".", "") + " resource '" + location.location + "'");
if(archive != null) archive.Dispose(); //mxd
// Done
base.Dispose();
}
@ -92,18 +111,6 @@ namespace CodeImp.DoomBuilder.Data
#endregion
#region ================== Management
// This opens the zip file for reading
private ZipInputStream OpenPK3File()
{
FileStream filestream = File.Open(location.location, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
filestream.Seek(0, SeekOrigin.Begin);
return new ZipInputStream(filestream);
}
#endregion
#region ================== Textures
// This finds and returns a patch stream
@ -267,7 +274,7 @@ namespace CodeImp.DoomBuilder.Data
}
// This returns true if the specified file exists
public override bool FileExists(string filename)
internal override bool FileExists(string filename)
{
return files.FileExists(filename);
}
@ -313,55 +320,33 @@ namespace CodeImp.DoomBuilder.Data
// This loads an entire file in memory and returns the stream
// NOTE: Callers are responsible for disposing the stream!
public override MemoryStream LoadFile(string filename)
internal override MemoryStream LoadFile(string filename)
{
MemoryStream filedata = null;
byte[] copybuffer = new byte[4096];
// Open the zip file
ZipInputStream zipstream = OpenPK3File();
ZipEntry entry = zipstream.GetNextEntry();
while(entry != null)
{
if(entry.IsFile)
{
string entryname = entry.Name.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
// Is this the entry we are looking for?
if(string.Compare(entryname, filename, true) == 0)
{
int expectedsize = (int)entry.Size;
if(expectedsize < 1) expectedsize = 1024;
filedata = new MemoryStream(expectedsize);
int readsize = zipstream.Read(copybuffer, 0, copybuffer.Length);
while(readsize > 0)
{
filedata.Write(copybuffer, 0, readsize);
readsize = zipstream.Read(copybuffer, 0, copybuffer.Length);
}
break;
}
}
// Next
entry = zipstream.GetNextEntry();
}
// Done with the zip file
zipstream.Close();
zipstream.Dispose();
MemoryStream filedata = null;
//mxd
if (archiveType == ArchiveType.SevenZip) { //this works waaaaaay faster with 7z archive
if (sevenZipEntries.ContainsKey(filename))
filedata = new MemoryStream(sevenZipEntries[filename]);
} else {
foreach (var entry in archive.Entries) {
if (!entry.IsDirectory) {
// Is this the entry we are looking for?
string entryname = entry.FilePath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
if (string.Compare(entryname, filename, true) == 0) {
filedata = new MemoryStream();
entry.WriteTo(filedata);
break;
}
}
}
}
// Nothing found?
if(filedata == null)
{
throw new FileNotFoundException("Cannot find the file " + filename + " in PK3 file " + location.location + ".");
}
else
{
//mxd. rewind before use
filedata.Position = 0;
if (filedata == null){
throw new FileNotFoundException("Cannot find the file " + filename + " in archive " + location.location + ".");
}else{
filedata.Position = 0; //mxd. rewind before use
return filedata;
}
}

View file

@ -256,6 +256,20 @@ namespace CodeImp.DoomBuilder.Data
return null;
}
//mxd
public override string GetPatchLocation(string pname) {
// Error when suspended
if (issuspended) throw new Exception("Data reader is suspended");
//no need to search in wads...
// Find in patches directory
string filename = FindFirstFile(PATCHES_DIR, pname, true);
if ((filename != null) && FileExists(filename))
return filename;
return pname;
}
#endregion
@ -559,10 +573,6 @@ namespace CodeImp.DoomBuilder.Data
// This must create an image
protected abstract ImageData CreateImage(string name, string filename, int imagetype);
// This must return true if the specified file exists
//mxd
public abstract bool FileExists(string filename);
// This must return all files in a given directory
protected abstract string[] GetAllFiles(string path, bool subfolders);
@ -580,12 +590,7 @@ namespace CodeImp.DoomBuilder.Data
// This must find the first file that has the specific name
protected abstract string FindFirstFileWithExt(string path, string beginswith, bool subfolders);
// This must load an entire file in memory and returns the stream
// NOTE: Callers are responsible for disposing the stream!
//mxd
public abstract MemoryStream LoadFile(string filename);
// This must create a temp file for the speciied file and return the absolute path to the temp file
// NOTE: Callers are responsible for removing the temp file when done!
protected abstract string CreateTempFile(string filename);

View file

@ -36,6 +36,7 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Variables
private List<TexturePatch> patches;
private bool gotFullName;//mxd
#endregion
@ -65,6 +66,12 @@ namespace CodeImp.DoomBuilder.Data
{
// Add it
patches.Add(patch);
//mxd. Get full name from first patch
if (!gotFullName) {
fullName = General.Map.Data.GetPatchLocation(patch.lumpname);
gotFullName = true;
}
}
// This loads the image

View file

@ -308,7 +308,7 @@ namespace CodeImp.DoomBuilder.Data
public override ICollection<ImageData> LoadTextures(PatchNames pnames)
{
List<ImageData> images = new List<ImageData>();
string rangestart, rangeend;
//string rangestart, rangeend;
int lumpindex;
Lump lump;
@ -794,7 +794,7 @@ namespace CodeImp.DoomBuilder.Data
#endregion
#region ================== Decorate, Gldefs, Mapinfo
#region ================== Decorate, Gldefs, Mapinfo, etc...
// This finds and returns a sprite stream
public override List<Stream> GetDecorateData(string pname)
@ -882,6 +882,23 @@ namespace CodeImp.DoomBuilder.Data
return streams;
}
//mxd
internal override MemoryStream LoadFile(string name) {
Lump l = file.FindLump(name);
if (l != null) {
l.Stream.Seek(0, SeekOrigin.Begin);
return new MemoryStream(l.Stream.ReadAllBytes());
} else {
return null;
}
}
//mxd
internal override bool FileExists(string filename) {
Lump l = file.FindLump(filename);
return l != null;
}
#endregion
}
}

View file

@ -30,9 +30,11 @@ using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using System.Diagnostics;
using CodeImp.DoomBuilder.Actions;
using ICSharpCode.SharpZipLib.BZip2;
//using ICSharpCode.SharpZipLib.BZip2;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Geometry;
//mxd
using CodeImp.DoomBuilder.GZBuilder.Data;
#endregion
@ -120,9 +122,8 @@ namespace CodeImp.DoomBuilder.Editing
writer.Write(copyset, memstream, null);
// Compress the stream
MemoryStream compressed = new MemoryStream((int)memstream.Length);
memstream.Seek(0, SeekOrigin.Begin);
BZip2.Compress(memstream, compressed, 900000);
MemoryStream compressed = SharpCompressHelper.CompressStream(memstream);//mxd
// Done
memstream.Dispose();
@ -169,11 +170,18 @@ namespace CodeImp.DoomBuilder.Editing
General.Map.UndoRedo.CreateUndo("Insert prefab");
// Decompress stream
MemoryStream decompressed = new MemoryStream((int)filedata.Length * 3);
MemoryStream memstream = null; //mxd
filedata.Seek(0, SeekOrigin.Begin);
BZip2.Decompress(filedata, decompressed);
MemoryStream memstream = new MemoryStream(decompressed.ToArray());
decompressed.Dispose();
try {
memstream = SharpCompressHelper.DecompressStream(filedata); //mxd
memstream.Seek(0, SeekOrigin.Begin);
}catch(Exception e){
General.ErrorLogger.Add(ErrorType.Error, e.GetType().Name + " while reading prefab from file: " + e.Message);
General.WriteLogLine(e.StackTrace);
General.ShowErrorMessage("Unable to load prefab. See log file for error details.", MessageBoxButtons.OK);
return;
}
// Mark all current geometry
General.Map.Map.ClearAllMarks(true);

View file

@ -495,7 +495,7 @@ namespace CodeImp.DoomBuilder.Editing
/// <returns>Ticket ID that identifies the created undo level. Returns -1 when no undo level was created.</returns>
public int CreateUndo(string description, object groupsource, int groupid, int grouptag)
{
UndoSnapshot u;
//UndoSnapshot u;
Plugin p = null;
string groupsourcename = "Null";

View file

@ -30,7 +30,7 @@ using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using System.Diagnostics;
using CodeImp.DoomBuilder.Actions;
using ICSharpCode.SharpZipLib.BZip2;
using CodeImp.DoomBuilder.GZBuilder.Data; //mxd
#endregion
@ -123,8 +123,7 @@ namespace CodeImp.DoomBuilder.Editing
// Compress data
recstream.Seek(0, SeekOrigin.Begin);
MemoryStream outstream = new MemoryStream((int)recstream.Length);
BZip2.Compress(recstream, outstream, 300000);
MemoryStream outstream = SharpCompressHelper.CompressStream(recstream); //mxd
// Make temporary file
filename = General.MakeTempFilename(General.Map.TempPath, "snapshot");
@ -152,15 +151,15 @@ namespace CodeImp.DoomBuilder.Editing
MemoryStream instream = new MemoryStream(File.ReadAllBytes(filename));
// Decompress data
MemoryStream outstream = new MemoryStream((int)instream.Length * 4);
instream.Seek(0, SeekOrigin.Begin);
BZip2.Decompress(instream, outstream);
MemoryStream outstream = SharpCompressHelper.DecompressStream(instream); //mxd
recstream = new MemoryStream(outstream.ToArray());
// Clean up
instream.Dispose();
File.Delete(filename);
filename = null;
outstream.Dispose();
}
}

View file

@ -0,0 +1,36 @@
using System;
using System.IO;
using SharpCompress.Compressor;
using SharpCompress.Compressor.BZip2;
namespace CodeImp.DoomBuilder.GZBuilder.Data
{
internal static class SharpCompressHelper
{
internal static MemoryStream CompressStream(Stream stream) {
byte[] arr = new byte[stream.Length];
stream.Read(arr, 0, (int)stream.Length);
MemoryStream ms = new MemoryStream();
BZip2Stream bzip = new BZip2Stream(ms, CompressionMode.Compress, true);
bzip.Write(arr, 0, arr.Length);
bzip.Close();
return ms;
}
internal static MemoryStream DecompressStream(Stream stream) {
BZip2Stream bzip = new BZip2Stream(stream, CompressionMode.Decompress, false);
byte[] buffer = new byte[16 * 1024];
MemoryStream ms = new MemoryStream();
int read;
while ((read = bzip.Read(buffer, 0, buffer.Length)) > 0)
ms.Write(buffer, 0, read);
return ms;
}
}
}

View file

@ -12,6 +12,11 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom
{
internal sealed class AcsParserSE : ZDTextParser
{
internal delegate void IncludeDelegate(AcsParserSE parser, string includefile);
internal IncludeDelegate OnInclude;
private List<string> parsedLumps;
private List<ScriptItem> namedScripts;
private List<ScriptItem> numberedScripts;
@ -21,11 +26,25 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom
internal AcsParserSE() {
namedScripts = new List<ScriptItem>();
numberedScripts = new List<ScriptItem>();
parsedLumps = new List<string>();
}
public override bool Parse(Stream stream, string sourcefilename) {
return Parse(stream, sourcefilename, false);
}
public bool Parse(Stream stream, string sourcefilename, bool processIncludes) {
base.Parse(stream, sourcefilename);
//already parsed this?
if (parsedLumps.IndexOf(sourcefilename) != -1) return false;
parsedLumps.Add(sourcefilename);
// Keep local data
Stream localstream = datastream;
string localsourcename = sourcename;
BinaryReader localreader = datareader;
// Continue until at the end of the stream
while (SkipWhitespace(true)) {
string token = ReadToken();
@ -71,6 +90,24 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom
}
}
} else if ((token == "#include" || token == "#import") && processIncludes) {
SkipWhitespace(true);
string includeLump = StripTokenQuotes(ReadToken()).ToLowerInvariant();
if (!string.IsNullOrEmpty(includeLump)) {
if (includeLump == "zcommon.acs" || includeLump == "common.acs")
continue;
// Callback to parse this file
if (OnInclude != null) OnInclude(this, includeLump.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
// Set our buffers back to continue parsing
datastream = localstream;
datareader = localreader;
sourcename = localsourcename;
} else {
GZBuilder.GZGeneral.LogAndTraceWarning("Error in '" + sourcefilename + "' at line " + GetCurrentLineNumber() + ": got #include directive with missing or incorrect path: '" + includeLump + "'");
}
}
}
}

View file

@ -390,7 +390,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom {
if (!string.IsNullOrEmpty(includeLump)) {
// Callback to parse this file
if (OnInclude != null)
OnInclude(this, includeLump.Replace("/", "\\"));
OnInclude(this, includeLump.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
// Set our buffers back to continue parsing
datastream = localstream;

View file

@ -32,8 +32,8 @@ namespace CodeImp.DoomBuilder.GZBuilder
public static int[] ACS_SPECIALS { get { return acsSpecials; } }
//version
public const float Version = 1.11f;
public const char Revision = 'b';
public const float Version = 1.12f;
public const char Revision = ' ';
//debug console
#if DEBUG

View file

@ -23,7 +23,6 @@ using System.Globalization;
using System.Text;
using System.Runtime.InteropServices;
using System.Diagnostics;
using ICSharpCode.SharpZipLib.Checksums;
#endregion
@ -86,5 +85,156 @@ namespace CodeImp.DoomBuilder
}
#endregion
}
//mxd. Taken from SharpZip
#region ================== Crc32
sealed class Crc32
{
const uint CrcSeed = 0xFFFFFFFF;
readonly static uint[] CrcTable = new uint[] {
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419,
0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4,
0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07,
0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856,
0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9,
0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4,
0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3,
0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A,
0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599,
0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190,
0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F,
0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E,
0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED,
0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950,
0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3,
0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A,
0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5,
0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010,
0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17,
0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6,
0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615,
0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344,
0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB,
0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A,
0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1,
0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C,
0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF,
0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE,
0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31,
0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C,
0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B,
0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242,
0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1,
0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278,
0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7,
0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66,
0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605,
0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8,
0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B,
0x2D02EF8D
};
internal static uint ComputeCrc32(uint oldCrc, byte value) {
return (uint)(Crc32.CrcTable[(oldCrc ^ value) & 0xFF] ^ (oldCrc >> 8));
}
/// <summary>
/// The crc data checksum so far.
/// </summary>
uint crc;
/// <summary>
/// Returns the CRC32 data checksum computed so far.
/// </summary>
public long Value {
get {
return (long)crc;
}
set {
crc = (uint)value;
}
}
/// <summary>
/// Resets the CRC32 data checksum as if no update was ever called.
/// </summary>
public void Reset() {
crc = 0;
}
/// <summary>
/// Updates the checksum with the int bval.
/// </summary>
/// <param name = "value">
/// the byte is taken as the lower 8 bits of value
/// </param>
public void Update(int value) {
crc ^= CrcSeed;
crc = CrcTable[(crc ^ value) & 0xFF] ^ (crc >> 8);
crc ^= CrcSeed;
}
/// <summary>
/// Updates the checksum with the bytes taken from the array.
/// </summary>
/// <param name="buffer">
/// buffer an array of bytes
/// </param>
public void Update(byte[] buffer) {
if (buffer == null) {
throw new ArgumentNullException("buffer");
}
Update(buffer, 0, buffer.Length);
}
/// <summary>
/// Adds the byte array to the data checksum.
/// </summary>
/// <param name = "buffer">
/// The buffer which contains the data
/// </param>
/// <param name = "offset">
/// The offset in the buffer where the data starts
/// </param>
/// <param name = "count">
/// The number of data bytes to update the CRC with.
/// </param>
public void Update(byte[] buffer, int offset, int count) {
if (buffer == null) {
throw new ArgumentNullException("buffer");
}
if (count < 0) {
throw new ArgumentOutOfRangeException("count", "Count cannot be less than zero");
}
if (offset < 0 || offset + count > buffer.Length) {
throw new ArgumentOutOfRangeException("offset");
}
crc ^= CrcSeed;
while (--count >= 0) {
crc = CrcTable[(crc ^ buffer[offset++]) & 0xFF] ^ (crc >> 8);
}
crc ^= CrcSeed;
}
}
#endregion
}
}

View file

@ -1363,15 +1363,13 @@ namespace CodeImp.DoomBuilder {
// Done
return true;
}
else {
} else {
// Fail
compiler.Dispose();
errors = null;
return false;
}
}
else {
} else {
// No compiler to run for this script type
return true;
}
@ -1395,12 +1393,23 @@ namespace CodeImp.DoomBuilder {
MemoryStream stream = GetLumpData(maplumpinfo.name);
if (stream != null) {
AcsParserSE parser = new AcsParserSE();
parser.Parse(stream, "SCRIPTS");
parser.OnInclude = updateScriptsFromLocation;
parser.Parse(stream, "SCRIPTS", true);
namedScripts.AddRange(parser.NamedScripts);
numberedScripts.AddRange(parser.NumberedScripts);
}
}
}
//sort
namedScripts.Sort(ScriptItem.SortByName);
numberedScripts.Sort(ScriptItem.SortByIndex);
}
//mxd
private void updateScriptsFromLocation(AcsParserSE parser, string path) {
MemoryStream s = General.Map.Data.LoadFile(path);
if(s != null && s.Length > 0) parser.Parse(s, path, true);
}
#endregion
@ -1538,6 +1547,7 @@ namespace CodeImp.DoomBuilder {
Cursor.Current = oldcursor;
//mxd
UpdateScriptNames();
GZBuilder.GZGeneral.OnReloadResources();
}

View file

@ -540,7 +540,6 @@ namespace CodeImp.DoomBuilder.Rendering
// MASK PASS
world = Matrix.Identity;
ApplyMatrices3D();
//graphics.Device.SetRenderState(RenderState.AlphaTestEnable, true);
RenderSinglePass((int)RenderPass.Mask);
// ALPHA PASS

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 KiB

After

Width:  |  Height:  |  Size: 229 KiB

View file

@ -58,7 +58,7 @@ namespace CodeImp.DoomBuilder.Types
public override void Browse(IWin32Window parent)
{
this.value = FlatBrowserForm.Browse(parent, this.value);
this.value = TextureBrowserForm.Browse(parent, this.value, true); //mxd. was FlatBrowserForm
}
public override void SetValue(object value)

View file

@ -58,7 +58,7 @@ namespace CodeImp.DoomBuilder.Types
public override void Browse(IWin32Window parent)
{
this.value = TextureBrowserForm.Browse(parent, this.value);
this.value = TextureBrowserForm.Browse(parent, this.value, false);
}
public override void SetValue(object value)

View file

@ -95,7 +95,7 @@ namespace CodeImp.DoomBuilder.Windows
string result;
// Browse for texture
result = TextureBrowserForm.Browse(this, backgroundname);
result = TextureBrowserForm.Browse(this, backgroundname, false);
if(result != null)
{
// Set this texture as background
@ -113,7 +113,7 @@ namespace CodeImp.DoomBuilder.Windows
string result;
// Browse for flat
result = FlatBrowserForm.Browse(this, backgroundname);
result = TextureBrowserForm.Browse(this, backgroundname, true); //mxd. was FlatBrowserForm
if(result != null)
{
// Set this flat as background

View file

@ -685,8 +685,7 @@ namespace CodeImp.DoomBuilder.Windows
if (cbArgStr.Checked) {
setNamedScripts((string)fieldslist.GetValue("arg0str"));
}
else if (!cbArgStr.Checked) {
} else if (!cbArgStr.Checked) {
setNumberedScripts(General.GetByIndex(lines, 0));
}

View file

@ -93,6 +93,7 @@ namespace CodeImp.DoomBuilder.Windows
this.seperatorviewzoom = new System.Windows.Forms.ToolStripSeparator();
this.itemscripteditor = new System.Windows.Forms.ToolStripMenuItem();
this.menumode = new System.Windows.Forms.ToolStripMenuItem();
this.separatorDrawModes = new System.Windows.Forms.ToolStripSeparator();
this.menuprefabs = new System.Windows.Forms.ToolStripMenuItem();
this.iteminsertprefabfile = new System.Windows.Forms.ToolStripMenuItem();
this.iteminsertpreviousprefab = new System.Windows.Forms.ToolStripMenuItem();
@ -190,7 +191,6 @@ namespace CodeImp.DoomBuilder.Windows
this.dockerspanel = new CodeImp.DoomBuilder.Controls.DockersControl();
this.dockerscollapser = new System.Windows.Forms.Timer(this.components);
this.warntimer = new System.Windows.Forms.Timer(this.components);
this.separatorDrawModes = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
@ -731,6 +731,11 @@ namespace CodeImp.DoomBuilder.Windows
this.menumode.Size = new System.Drawing.Size(50, 20);
this.menumode.Text = "&Mode";
//
// separatorDrawModes
//
this.separatorDrawModes.Name = "separatorDrawModes";
this.separatorDrawModes.Size = new System.Drawing.Size(57, 6);
//
// menuprefabs
//
this.menuprefabs.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -1563,7 +1568,6 @@ namespace CodeImp.DoomBuilder.Windows
this.warnsLabel.Text = "0";
this.warnsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.warnsLabel.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage;
this.warnsLabel.ToolTipText = "Click to open Errors and Warnings window";
this.warnsLabel.Click += new System.EventHandler(this.warnsLabel_Click);
//
// panelinfo
@ -1746,11 +1750,6 @@ namespace CodeImp.DoomBuilder.Windows
this.warntimer.Interval = 500;
this.warntimer.Tick += new System.EventHandler(this.warntimer_Tick);
//
// separatorDrawodes
//
this.separatorDrawModes.Name = "separatorDrawModes";
this.separatorDrawModes.Size = new System.Drawing.Size(149, 6);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);

View file

@ -2559,14 +2559,14 @@ namespace CodeImp.DoomBuilder.Windows
// Returns the new texture name or the same texture name when cancelled
public string BrowseTexture(IWin32Window owner, string initialvalue)
{
return TextureBrowserForm.Browse(owner, initialvalue);
return TextureBrowserForm.Browse(owner, initialvalue, false);//mxd
}
// This browses for a flat
// Returns the new flat name or the same flat name when cancelled
public string BrowseFlat(IWin32Window owner, string initialvalue)
{
return FlatBrowserForm.Browse(owner, initialvalue);
return TextureBrowserForm.Browse(owner, initialvalue, true); //mxd. was FlatBrowserForm
}
// This browses the lindef types

View file

@ -198,6 +198,30 @@
<metadata name="sectorinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="heightpanel1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="vertexinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="labelcollapsedinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="buttontoggleinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="modename.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="linedefinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="thinginfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="sectorinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="redrawtimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>319, 17</value>
</metadata>
@ -228,6 +252,9 @@
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>116</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAMAEBAAAAEAGABoAwAANgAAACAgAAABABgAqAwAAJ4DAAAwMAAAAQAYAKgcAABGEAAAKAAAABAA

View file

@ -28,366 +28,366 @@ namespace CodeImp.DoomBuilder.Windows
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.Label label1;
System.Windows.Forms.Label label2;
System.Windows.Forms.Label label3;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ResourceOptionsForm));
this.tabs = new System.Windows.Forms.TabControl();
this.wadfiletab = new System.Windows.Forms.TabPage();
this.label6 = new System.Windows.Forms.Label();
this.strictpatches = new System.Windows.Forms.CheckBox();
this.browsewad = new System.Windows.Forms.Button();
this.wadlocation = new System.Windows.Forms.TextBox();
this.directorytab = new System.Windows.Forms.TabPage();
this.directorylink = new System.Windows.Forms.LinkLabel();
this.label5 = new System.Windows.Forms.Label();
this.dir_flats = new System.Windows.Forms.CheckBox();
this.dir_textures = new System.Windows.Forms.CheckBox();
this.browsedir = new System.Windows.Forms.Button();
this.dirlocation = new System.Windows.Forms.TextBox();
this.pk3filetab = new System.Windows.Forms.TabPage();
this.pk3link = new System.Windows.Forms.LinkLabel();
this.label4 = new System.Windows.Forms.Label();
this.browsepk3 = new System.Windows.Forms.Button();
this.pk3location = new System.Windows.Forms.TextBox();
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
this.wadfiledialog = new System.Windows.Forms.OpenFileDialog();
this.dirdialog = new System.Windows.Forms.FolderBrowserDialog();
this.pk3filedialog = new System.Windows.Forms.OpenFileDialog();
this.notfortesting = new System.Windows.Forms.CheckBox();
label1 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
this.tabs.SuspendLayout();
this.wadfiletab.SuspendLayout();
this.directorytab.SuspendLayout();
this.pk3filetab.SuspendLayout();
this.SuspendLayout();
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(15, 20);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(104, 14);
label1.TabIndex = 0;
label1.Text = "WAD File Resource:";
//
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(15, 20);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(104, 14);
label2.TabIndex = 3;
label2.Text = "Directory Resource:";
//
// label3
//
label3.AutoSize = true;
label3.Location = new System.Drawing.Point(15, 20);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(98, 14);
label3.TabIndex = 3;
label3.Text = "PK3 File Resource:";
//
// tabs
//
this.tabs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabs.Controls.Add(this.wadfiletab);
this.tabs.Controls.Add(this.directorytab);
this.tabs.Controls.Add(this.pk3filetab);
this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabs.ItemSize = new System.Drawing.Size(110, 19);
this.tabs.Location = new System.Drawing.Point(9, 11);
this.tabs.Name = "tabs";
this.tabs.Padding = new System.Drawing.Point(20, 3);
this.tabs.SelectedIndex = 0;
this.tabs.Size = new System.Drawing.Size(369, 242);
this.tabs.TabIndex = 0;
//
// wadfiletab
//
this.wadfiletab.Controls.Add(this.label6);
this.wadfiletab.Controls.Add(this.strictpatches);
this.wadfiletab.Controls.Add(this.browsewad);
this.wadfiletab.Controls.Add(this.wadlocation);
this.wadfiletab.Controls.Add(label1);
this.wadfiletab.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.wadfiletab.Location = new System.Drawing.Point(4, 23);
this.wadfiletab.Name = "wadfiletab";
this.wadfiletab.Padding = new System.Windows.Forms.Padding(3);
this.wadfiletab.Size = new System.Drawing.Size(361, 215);
this.wadfiletab.TabIndex = 0;
this.wadfiletab.Text = "From WAD File";
this.wadfiletab.UseVisualStyleBackColor = true;
//
// label6
//
this.label6.Location = new System.Drawing.Point(14, 109);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(344, 58);
this.label6.TabIndex = 8;
this.label6.Text = resources.GetString("label6.Text");
//
// strictpatches
//
this.strictpatches.AutoSize = true;
this.strictpatches.Location = new System.Drawing.Point(17, 72);
this.strictpatches.Name = "strictpatches";
this.strictpatches.Size = new System.Drawing.Size(298, 18);
this.strictpatches.TabIndex = 2;
this.strictpatches.Text = "Strictly load patches between P_START and P_END only";
this.strictpatches.UseVisualStyleBackColor = true;
//
// browsewad
//
this.browsewad.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browsewad.Image = global::CodeImp.DoomBuilder.Properties.Resources.Folder;
this.browsewad.Location = new System.Drawing.Point(315, 36);
this.browsewad.Name = "browsewad";
this.browsewad.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browsewad.Size = new System.Drawing.Size(28, 23);
this.browsewad.TabIndex = 1;
this.browsewad.Text = " ";
this.browsewad.UseVisualStyleBackColor = true;
this.browsewad.Click += new System.EventHandler(this.browsewad_Click);
//
// wadlocation
//
this.wadlocation.Location = new System.Drawing.Point(17, 37);
this.wadlocation.Name = "wadlocation";
this.wadlocation.ReadOnly = true;
this.wadlocation.Size = new System.Drawing.Size(292, 20);
this.wadlocation.TabIndex = 0;
//
// directorytab
//
this.directorytab.Controls.Add(this.directorylink);
this.directorytab.Controls.Add(this.label5);
this.directorytab.Controls.Add(this.dir_flats);
this.directorytab.Controls.Add(this.dir_textures);
this.directorytab.Controls.Add(this.browsedir);
this.directorytab.Controls.Add(this.dirlocation);
this.directorytab.Controls.Add(label2);
this.directorytab.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.directorytab.Location = new System.Drawing.Point(4, 23);
this.directorytab.Name = "directorytab";
this.directorytab.Padding = new System.Windows.Forms.Padding(3);
this.directorytab.Size = new System.Drawing.Size(361, 215);
this.directorytab.TabIndex = 1;
this.directorytab.Text = "From Directory";
this.directorytab.UseVisualStyleBackColor = true;
//
// directorylink
//
this.directorylink.ActiveLinkColor = System.Drawing.Color.Firebrick;
this.directorylink.AutoSize = true;
this.directorylink.DisabledLinkColor = System.Drawing.SystemColors.GrayText;
this.directorylink.LinkArea = new System.Windows.Forms.LinkArea(0, 55);
this.directorylink.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.directorylink.LinkColor = System.Drawing.Color.Firebrick;
this.directorylink.Location = new System.Drawing.Point(14, 184);
this.directorylink.Name = "directorylink";
this.directorylink.Size = new System.Drawing.Size(311, 14);
this.directorylink.TabIndex = 9;
this.directorylink.TabStop = true;
this.directorylink.Text = "http://www.zdoom.org/wiki/Using_ZIPs_as_WAD_replacement";
this.directorylink.VisitedLinkColor = System.Drawing.Color.Firebrick;
this.directorylink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.link_Click);
//
// label5
//
this.label5.Location = new System.Drawing.Point(14, 135);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(341, 49);
this.label5.TabIndex = 8;
this.label5.Text = "The directory may use the ZDoom PK3 directory structure, or you can choose to use" +
" the options above to load texture or flat images from the directory root.";
//
// dir_flats
//
this.dir_flats.AutoSize = true;
this.dir_flats.Location = new System.Drawing.Point(17, 98);
this.dir_flats.Name = "dir_flats";
this.dir_flats.Size = new System.Drawing.Size(205, 18);
this.dir_flats.TabIndex = 3;
this.dir_flats.Text = "Load images in directory root as flats";
this.dir_flats.UseVisualStyleBackColor = true;
//
// dir_textures
//
this.dir_textures.AutoSize = true;
this.dir_textures.Location = new System.Drawing.Point(17, 72);
this.dir_textures.Name = "dir_textures";
this.dir_textures.Size = new System.Drawing.Size(224, 18);
this.dir_textures.TabIndex = 2;
this.dir_textures.Text = "Load images in directory root as textures";
this.dir_textures.UseVisualStyleBackColor = true;
//
// browsedir
//
this.browsedir.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browsedir.Image = global::CodeImp.DoomBuilder.Properties.Resources.Folder;
this.browsedir.Location = new System.Drawing.Point(315, 36);
this.browsedir.Name = "browsedir";
this.browsedir.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browsedir.Size = new System.Drawing.Size(28, 23);
this.browsedir.TabIndex = 1;
this.browsedir.UseVisualStyleBackColor = true;
this.browsedir.Click += new System.EventHandler(this.browsedir_Click);
//
// dirlocation
//
this.dirlocation.BackColor = System.Drawing.SystemColors.Control;
this.dirlocation.Location = new System.Drawing.Point(17, 37);
this.dirlocation.Name = "dirlocation";
this.dirlocation.ReadOnly = true;
this.dirlocation.Size = new System.Drawing.Size(292, 20);
this.dirlocation.TabIndex = 0;
//
// pk3filetab
//
this.pk3filetab.Controls.Add(this.pk3link);
this.pk3filetab.Controls.Add(this.label4);
this.pk3filetab.Controls.Add(this.browsepk3);
this.pk3filetab.Controls.Add(this.pk3location);
this.pk3filetab.Controls.Add(label3);
this.pk3filetab.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.pk3filetab.Location = new System.Drawing.Point(4, 23);
this.pk3filetab.Name = "pk3filetab";
this.pk3filetab.Size = new System.Drawing.Size(361, 215);
this.pk3filetab.TabIndex = 2;
this.pk3filetab.Text = "From PK3 File";
this.pk3filetab.UseVisualStyleBackColor = true;
//
// pk3link
//
this.pk3link.ActiveLinkColor = System.Drawing.Color.Firebrick;
this.pk3link.AutoSize = true;
this.pk3link.DisabledLinkColor = System.Drawing.SystemColors.GrayText;
this.pk3link.LinkArea = new System.Windows.Forms.LinkArea(0, 55);
this.pk3link.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.pk3link.LinkColor = System.Drawing.Color.Firebrick;
this.pk3link.Location = new System.Drawing.Point(14, 111);
this.pk3link.Name = "pk3link";
this.pk3link.Size = new System.Drawing.Size(311, 14);
this.pk3link.TabIndex = 7;
this.pk3link.TabStop = true;
this.pk3link.Text = "http://www.zdoom.org/wiki/Using_ZIPs_as_WAD_replacement";
this.pk3link.VisitedLinkColor = System.Drawing.Color.Firebrick;
this.pk3link.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.link_Click);
//
// label4
//
this.label4.Location = new System.Drawing.Point(15, 83);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(343, 28);
this.label4.TabIndex = 6;
this.label4.Text = "The PK3 file is expected to use the ZDoom PK3 directory structure.";
//
// browsepk3
//
this.browsepk3.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browsepk3.Image = global::CodeImp.DoomBuilder.Properties.Resources.Folder;
this.browsepk3.Location = new System.Drawing.Point(315, 36);
this.browsepk3.Name = "browsepk3";
this.browsepk3.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browsepk3.Size = new System.Drawing.Size(28, 23);
this.browsepk3.TabIndex = 1;
this.browsepk3.UseVisualStyleBackColor = true;
this.browsepk3.Click += new System.EventHandler(this.browsepk3_Click);
//
// pk3location
//
this.pk3location.Location = new System.Drawing.Point(17, 37);
this.pk3location.Name = "pk3location";
this.pk3location.ReadOnly = true;
this.pk3location.Size = new System.Drawing.Size(292, 20);
this.pk3location.TabIndex = 0;
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(266, 306);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(112, 25);
this.cancel.TabIndex = 2;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(148, 306);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(112, 25);
this.apply.TabIndex = 1;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
this.apply.Click += new System.EventHandler(this.apply_Click);
//
// wadfiledialog
//
this.wadfiledialog.Filter = "Doom WAD Files (*.wad)|*.wad";
this.wadfiledialog.Title = "Browse WAD File";
//
// dirdialog
//
this.dirdialog.Description = "Please select a directory from which to load images when editing your map...";
//
// pk3filedialog
//
this.pk3filedialog.Filter = "Doom PK3 Files (*.pk3)|*.pk3";
this.pk3filedialog.Title = "Browse PK3 File";
//
// notfortesting
//
this.notfortesting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.notfortesting.AutoSize = true;
this.notfortesting.Location = new System.Drawing.Point(12, 262);
this.notfortesting.Name = "notfortesting";
this.notfortesting.Size = new System.Drawing.Size(249, 18);
this.notfortesting.TabIndex = 3;
this.notfortesting.Text = "Exclude this resource from testing parameters";
this.notfortesting.UseVisualStyleBackColor = true;
//
// ResourceOptionsForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(386, 340);
this.Controls.Add(this.notfortesting);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
this.Controls.Add(this.tabs);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ResourceOptionsForm";
this.Opacity = 0;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Resource Options";
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.ResourceOptionsForm_HelpRequested);
this.tabs.ResumeLayout(false);
this.wadfiletab.ResumeLayout(false);
this.wadfiletab.PerformLayout();
this.directorytab.ResumeLayout(false);
this.directorytab.PerformLayout();
this.pk3filetab.ResumeLayout(false);
this.pk3filetab.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
System.Windows.Forms.Label label1;
System.Windows.Forms.Label label2;
System.Windows.Forms.Label label3;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ResourceOptionsForm));
this.tabs = new System.Windows.Forms.TabControl();
this.wadfiletab = new System.Windows.Forms.TabPage();
this.label6 = new System.Windows.Forms.Label();
this.strictpatches = new System.Windows.Forms.CheckBox();
this.browsewad = new System.Windows.Forms.Button();
this.wadlocation = new System.Windows.Forms.TextBox();
this.directorytab = new System.Windows.Forms.TabPage();
this.directorylink = new System.Windows.Forms.LinkLabel();
this.label5 = new System.Windows.Forms.Label();
this.dir_flats = new System.Windows.Forms.CheckBox();
this.dir_textures = new System.Windows.Forms.CheckBox();
this.browsedir = new System.Windows.Forms.Button();
this.dirlocation = new System.Windows.Forms.TextBox();
this.pk3filetab = new System.Windows.Forms.TabPage();
this.pk3link = new System.Windows.Forms.LinkLabel();
this.label4 = new System.Windows.Forms.Label();
this.browsepk3 = new System.Windows.Forms.Button();
this.pk3location = new System.Windows.Forms.TextBox();
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
this.wadfiledialog = new System.Windows.Forms.OpenFileDialog();
this.dirdialog = new System.Windows.Forms.FolderBrowserDialog();
this.pk3filedialog = new System.Windows.Forms.OpenFileDialog();
this.notfortesting = new System.Windows.Forms.CheckBox();
label1 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
this.tabs.SuspendLayout();
this.wadfiletab.SuspendLayout();
this.directorytab.SuspendLayout();
this.pk3filetab.SuspendLayout();
this.SuspendLayout();
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(15, 20);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(104, 14);
label1.TabIndex = 0;
label1.Text = "WAD File Resource:";
//
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(15, 20);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(104, 14);
label2.TabIndex = 3;
label2.Text = "Directory Resource:";
//
// label3
//
label3.AutoSize = true;
label3.Location = new System.Drawing.Point(15, 20);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(133, 14);
label3.TabIndex = 3;
label3.Text = "PK3 or PK7 File Resource:";
//
// tabs
//
this.tabs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabs.Controls.Add(this.wadfiletab);
this.tabs.Controls.Add(this.directorytab);
this.tabs.Controls.Add(this.pk3filetab);
this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabs.ItemSize = new System.Drawing.Size(110, 19);
this.tabs.Location = new System.Drawing.Point(9, 11);
this.tabs.Name = "tabs";
this.tabs.Padding = new System.Drawing.Point(20, 3);
this.tabs.SelectedIndex = 0;
this.tabs.Size = new System.Drawing.Size(369, 242);
this.tabs.TabIndex = 0;
//
// wadfiletab
//
this.wadfiletab.Controls.Add(this.label6);
this.wadfiletab.Controls.Add(this.strictpatches);
this.wadfiletab.Controls.Add(this.browsewad);
this.wadfiletab.Controls.Add(this.wadlocation);
this.wadfiletab.Controls.Add(label1);
this.wadfiletab.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.wadfiletab.Location = new System.Drawing.Point(4, 23);
this.wadfiletab.Name = "wadfiletab";
this.wadfiletab.Padding = new System.Windows.Forms.Padding(3);
this.wadfiletab.Size = new System.Drawing.Size(361, 215);
this.wadfiletab.TabIndex = 0;
this.wadfiletab.Text = "From WAD File";
this.wadfiletab.UseVisualStyleBackColor = true;
//
// label6
//
this.label6.Location = new System.Drawing.Point(14, 109);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(344, 58);
this.label6.TabIndex = 8;
this.label6.Text = resources.GetString("label6.Text");
//
// strictpatches
//
this.strictpatches.AutoSize = true;
this.strictpatches.Location = new System.Drawing.Point(17, 72);
this.strictpatches.Name = "strictpatches";
this.strictpatches.Size = new System.Drawing.Size(297, 18);
this.strictpatches.TabIndex = 2;
this.strictpatches.Text = "Strictly load patches between P_START and P_END only";
this.strictpatches.UseVisualStyleBackColor = true;
//
// browsewad
//
this.browsewad.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browsewad.Image = global::CodeImp.DoomBuilder.Properties.Resources.Folder;
this.browsewad.Location = new System.Drawing.Point(315, 36);
this.browsewad.Name = "browsewad";
this.browsewad.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browsewad.Size = new System.Drawing.Size(28, 23);
this.browsewad.TabIndex = 1;
this.browsewad.Text = " ";
this.browsewad.UseVisualStyleBackColor = true;
this.browsewad.Click += new System.EventHandler(this.browsewad_Click);
//
// wadlocation
//
this.wadlocation.Location = new System.Drawing.Point(17, 37);
this.wadlocation.Name = "wadlocation";
this.wadlocation.ReadOnly = true;
this.wadlocation.Size = new System.Drawing.Size(292, 20);
this.wadlocation.TabIndex = 0;
//
// directorytab
//
this.directorytab.Controls.Add(this.directorylink);
this.directorytab.Controls.Add(this.label5);
this.directorytab.Controls.Add(this.dir_flats);
this.directorytab.Controls.Add(this.dir_textures);
this.directorytab.Controls.Add(this.browsedir);
this.directorytab.Controls.Add(this.dirlocation);
this.directorytab.Controls.Add(label2);
this.directorytab.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.directorytab.Location = new System.Drawing.Point(4, 23);
this.directorytab.Name = "directorytab";
this.directorytab.Padding = new System.Windows.Forms.Padding(3);
this.directorytab.Size = new System.Drawing.Size(361, 215);
this.directorytab.TabIndex = 1;
this.directorytab.Text = "From Directory";
this.directorytab.UseVisualStyleBackColor = true;
//
// directorylink
//
this.directorylink.ActiveLinkColor = System.Drawing.Color.Firebrick;
this.directorylink.AutoSize = true;
this.directorylink.DisabledLinkColor = System.Drawing.SystemColors.GrayText;
this.directorylink.LinkArea = new System.Windows.Forms.LinkArea(0, 55);
this.directorylink.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.directorylink.LinkColor = System.Drawing.Color.Firebrick;
this.directorylink.Location = new System.Drawing.Point(14, 184);
this.directorylink.Name = "directorylink";
this.directorylink.Size = new System.Drawing.Size(310, 14);
this.directorylink.TabIndex = 9;
this.directorylink.TabStop = true;
this.directorylink.Text = "http://www.zdoom.org/wiki/Using_ZIPs_as_WAD_replacement";
this.directorylink.VisitedLinkColor = System.Drawing.Color.Firebrick;
this.directorylink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.link_Click);
//
// label5
//
this.label5.Location = new System.Drawing.Point(14, 135);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(341, 49);
this.label5.TabIndex = 8;
this.label5.Text = "The directory may use the ZDoom PK3 directory structure, or you can choose to use" +
" the options above to load texture or flat images from the directory root.";
//
// dir_flats
//
this.dir_flats.AutoSize = true;
this.dir_flats.Location = new System.Drawing.Point(17, 98);
this.dir_flats.Name = "dir_flats";
this.dir_flats.Size = new System.Drawing.Size(205, 18);
this.dir_flats.TabIndex = 3;
this.dir_flats.Text = "Load images in directory root as flats";
this.dir_flats.UseVisualStyleBackColor = true;
//
// dir_textures
//
this.dir_textures.AutoSize = true;
this.dir_textures.Location = new System.Drawing.Point(17, 72);
this.dir_textures.Name = "dir_textures";
this.dir_textures.Size = new System.Drawing.Size(224, 18);
this.dir_textures.TabIndex = 2;
this.dir_textures.Text = "Load images in directory root as textures";
this.dir_textures.UseVisualStyleBackColor = true;
//
// browsedir
//
this.browsedir.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browsedir.Image = global::CodeImp.DoomBuilder.Properties.Resources.Folder;
this.browsedir.Location = new System.Drawing.Point(315, 36);
this.browsedir.Name = "browsedir";
this.browsedir.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browsedir.Size = new System.Drawing.Size(28, 23);
this.browsedir.TabIndex = 1;
this.browsedir.UseVisualStyleBackColor = true;
this.browsedir.Click += new System.EventHandler(this.browsedir_Click);
//
// dirlocation
//
this.dirlocation.BackColor = System.Drawing.SystemColors.Control;
this.dirlocation.Location = new System.Drawing.Point(17, 37);
this.dirlocation.Name = "dirlocation";
this.dirlocation.ReadOnly = true;
this.dirlocation.Size = new System.Drawing.Size(292, 20);
this.dirlocation.TabIndex = 0;
//
// pk3filetab
//
this.pk3filetab.Controls.Add(this.pk3link);
this.pk3filetab.Controls.Add(this.label4);
this.pk3filetab.Controls.Add(this.browsepk3);
this.pk3filetab.Controls.Add(this.pk3location);
this.pk3filetab.Controls.Add(label3);
this.pk3filetab.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.pk3filetab.Location = new System.Drawing.Point(4, 23);
this.pk3filetab.Name = "pk3filetab";
this.pk3filetab.Size = new System.Drawing.Size(361, 215);
this.pk3filetab.TabIndex = 2;
this.pk3filetab.Text = "From PK3 / PK7";
this.pk3filetab.UseVisualStyleBackColor = true;
//
// pk3link
//
this.pk3link.ActiveLinkColor = System.Drawing.Color.Firebrick;
this.pk3link.AutoSize = true;
this.pk3link.DisabledLinkColor = System.Drawing.SystemColors.GrayText;
this.pk3link.LinkArea = new System.Windows.Forms.LinkArea(0, 55);
this.pk3link.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
this.pk3link.LinkColor = System.Drawing.Color.Firebrick;
this.pk3link.Location = new System.Drawing.Point(14, 117);
this.pk3link.Name = "pk3link";
this.pk3link.Size = new System.Drawing.Size(310, 14);
this.pk3link.TabIndex = 7;
this.pk3link.TabStop = true;
this.pk3link.Text = "http://www.zdoom.org/wiki/Using_ZIPs_as_WAD_replacement";
this.pk3link.VisitedLinkColor = System.Drawing.Color.Firebrick;
this.pk3link.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.link_Click);
//
// label4
//
this.label4.Location = new System.Drawing.Point(15, 83);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(343, 28);
this.label4.TabIndex = 6;
this.label4.Text = "The archive file is expected to use the ZDoom archive\r\n directory structure.";
//
// browsepk3
//
this.browsepk3.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browsepk3.Image = global::CodeImp.DoomBuilder.Properties.Resources.Folder;
this.browsepk3.Location = new System.Drawing.Point(315, 36);
this.browsepk3.Name = "browsepk3";
this.browsepk3.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browsepk3.Size = new System.Drawing.Size(28, 23);
this.browsepk3.TabIndex = 1;
this.browsepk3.UseVisualStyleBackColor = true;
this.browsepk3.Click += new System.EventHandler(this.browsepk3_Click);
//
// pk3location
//
this.pk3location.Location = new System.Drawing.Point(17, 37);
this.pk3location.Name = "pk3location";
this.pk3location.ReadOnly = true;
this.pk3location.Size = new System.Drawing.Size(292, 20);
this.pk3location.TabIndex = 0;
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(266, 306);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(112, 25);
this.cancel.TabIndex = 2;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(148, 306);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(112, 25);
this.apply.TabIndex = 1;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
this.apply.Click += new System.EventHandler(this.apply_Click);
//
// wadfiledialog
//
this.wadfiledialog.Filter = "Doom WAD Files (*.wad)|*.wad";
this.wadfiledialog.Title = "Browse WAD File";
//
// dirdialog
//
this.dirdialog.Description = "Please select a directory from which to load images when editing your map...";
//
// pk3filedialog
//
this.pk3filedialog.Filter = "Doom PK3/PK7 Files (*.pk3;*.pk7)|*.pk3;*.pk7";
this.pk3filedialog.Title = "Browse PK3 or PK7 File";
//
// notfortesting
//
this.notfortesting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.notfortesting.AutoSize = true;
this.notfortesting.Location = new System.Drawing.Point(12, 262);
this.notfortesting.Name = "notfortesting";
this.notfortesting.Size = new System.Drawing.Size(249, 18);
this.notfortesting.TabIndex = 3;
this.notfortesting.Text = "Exclude this resource from testing parameters";
this.notfortesting.UseVisualStyleBackColor = true;
//
// ResourceOptionsForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(386, 340);
this.Controls.Add(this.notfortesting);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
this.Controls.Add(this.tabs);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ResourceOptionsForm";
this.Opacity = 0;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Resource Options";
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.ResourceOptionsForm_HelpRequested);
this.tabs.ResumeLayout(false);
this.wadfiletab.ResumeLayout(false);
this.wadfiletab.PerformLayout();
this.directorytab.ResumeLayout(false);
this.directorytab.PerformLayout();
this.pk3filetab.ResumeLayout(false);
this.pk3filetab.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}

View file

@ -143,7 +143,7 @@ namespace CodeImp.DoomBuilder.Windows
(!File.Exists(pk3location.Text)))
{
// No valid pk3 file specified
MessageBox.Show(this, "Please select a valid PK3 File resource.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
MessageBox.Show(this, "Please select a valid PK3 or PK7 File resource.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
{

View file

@ -180,9 +180,6 @@
<metadata name="pk3filetab.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="pk3link.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View file

@ -28,129 +28,111 @@ namespace CodeImp.DoomBuilder.Windows
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TextureBrowserForm));
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
this.texturesets = new System.Windows.Forms.ListView();
this.namecolumn = new System.Windows.Forms.ColumnHeader();
this.countcolumn = new System.Windows.Forms.ColumnHeader();
this.smallimages = new System.Windows.Forms.ImageList(this.components);
this.browser = new CodeImp.DoomBuilder.Controls.ImageBrowserControl();
this.SuspendLayout();
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(781, 596);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(100, 25);
this.cancel.TabIndex = 3;
this.cancel.TabStop = false;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(675, 596);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(100, 25);
this.apply.TabIndex = 2;
this.apply.TabStop = false;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
this.apply.Click += new System.EventHandler(this.apply_Click);
//
// texturesets
//
this.texturesets.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.texturesets.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.namecolumn,
this.countcolumn});
this.texturesets.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.texturesets.FullRowSelect = true;
this.texturesets.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.texturesets.HideSelection = false;
this.texturesets.Location = new System.Drawing.Point(12, 9);
this.texturesets.MultiSelect = false;
this.texturesets.Name = "texturesets";
this.texturesets.Size = new System.Drawing.Size(200, 576);
this.texturesets.SmallImageList = this.smallimages;
this.texturesets.TabIndex = 0;
this.texturesets.TabStop = false;
this.texturesets.UseCompatibleStateImageBehavior = false;
this.texturesets.View = System.Windows.Forms.View.Details;
this.texturesets.SelectedIndexChanged += new System.EventHandler(this.texturesets_SelectedIndexChanged);
//
// namecolumn
//
this.namecolumn.Text = "Name";
this.namecolumn.Width = 109;
//
// countcolumn
//
this.countcolumn.Text = "Count";
this.countcolumn.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.countcolumn.Width = 51;
//
// smallimages
//
this.smallimages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("smallimages.ImageStream")));
this.smallimages.TransparentColor = System.Drawing.Color.Transparent;
this.smallimages.Images.SetKeyName(0, "KnownTextureSet2.ico");
this.smallimages.Images.SetKeyName(1, "AllTextureSet2.ico");
this.smallimages.Images.SetKeyName(2, "FileTextureSet.ico");
this.smallimages.Images.SetKeyName(3, "FolderTextureSet.ico");
this.smallimages.Images.SetKeyName(4, "PK3TextureSet.ico");
//
// browser
//
this.browser.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.browser.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browser.HideInputBox = false;
this.browser.LabelText = "Select or enter a texture name:";
this.browser.Location = new System.Drawing.Point(218, 9);
this.browser.Name = "browser";
this.browser.PreventSelection = false;
this.browser.Size = new System.Drawing.Size(663, 610);
this.browser.TabIndex = 1;
this.browser.TabStop = false;
this.browser.SelectedItemDoubleClicked += new CodeImp.DoomBuilder.Controls.ImageBrowserControl.SelectedItemDoubleClickDelegate(this.browser_SelectedItemDoubleClicked);
this.browser.SelectedItemChanged += new CodeImp.DoomBuilder.Controls.ImageBrowserControl.SelectedItemChangedDelegate(this.browser_SelectedItemChanged);
//
// TextureBrowserForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(893, 631);
this.Controls.Add(this.texturesets);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
this.Controls.Add(this.browser);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.KeyPreview = true;
this.MinimizeBox = false;
this.Name = "TextureBrowserForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Browse Textures";
this.Load += new System.EventHandler(this.TextureBrowserForm_Load);
this.Shown += new System.EventHandler(this.TextureBrowserForm_Shown);
this.Activated += new System.EventHandler(this.TextureBrowserForm_Activated);
this.Move += new System.EventHandler(this.TextureBrowserForm_Move);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TextureBrowserForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.TextureBrowserForm_HelpRequested);
this.ResizeEnd += new System.EventHandler(this.TextureBrowserForm_ResizeEnd);
this.ResumeLayout(false);
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TextureBrowserForm));
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
this.smallimages = new System.Windows.Forms.ImageList(this.components);
this.tvTextureSets = new System.Windows.Forms.TreeView();
this.browser = new CodeImp.DoomBuilder.Controls.ImageBrowserControl();
this.SuspendLayout();
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(781, 596);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(100, 25);
this.cancel.TabIndex = 3;
this.cancel.TabStop = false;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(675, 596);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(100, 25);
this.apply.TabIndex = 2;
this.apply.TabStop = false;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
this.apply.Click += new System.EventHandler(this.apply_Click);
//
// smallimages
//
this.smallimages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("smallimages.ImageStream")));
this.smallimages.TransparentColor = System.Drawing.Color.Transparent;
this.smallimages.Images.SetKeyName(0, "KnownTextureSet2.ico");
this.smallimages.Images.SetKeyName(1, "AllTextureSet2.ico");
this.smallimages.Images.SetKeyName(2, "FileTextureSet.ico");
this.smallimages.Images.SetKeyName(3, "FolderTextureSet.ico");
this.smallimages.Images.SetKeyName(4, "PK3TextureSet.ico");
this.smallimages.Images.SetKeyName(5, "FolderImage.png");
this.smallimages.Images.SetKeyName(6, "ArchiveImage.png");
//
// tvTextureSets
//
this.tvTextureSets.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.tvTextureSets.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tvTextureSets.ImageIndex = 0;
this.tvTextureSets.ImageList = this.smallimages;
this.tvTextureSets.Location = new System.Drawing.Point(12, 9);
this.tvTextureSets.Name = "tvTextureSets";
this.tvTextureSets.SelectedImageIndex = 0;
this.tvTextureSets.Size = new System.Drawing.Size(200, 576);
this.tvTextureSets.TabIndex = 4;
this.tvTextureSets.MouseEnter += new System.EventHandler(this.tvTextureSets_MouseEnter);
this.tvTextureSets.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvTextureSets_NodeMouseClick);
//
// browser
//
this.browser.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.browser.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browser.HideInputBox = false;
this.browser.LabelText = "Select or enter a texture name:";
this.browser.Location = new System.Drawing.Point(218, 9);
this.browser.Name = "browser";
this.browser.PreventSelection = false;
this.browser.Size = new System.Drawing.Size(663, 610);
this.browser.TabIndex = 1;
this.browser.TabStop = false;
this.browser.SelectedItemDoubleClicked += new CodeImp.DoomBuilder.Controls.ImageBrowserControl.SelectedItemDoubleClickDelegate(this.browser_SelectedItemDoubleClicked);
this.browser.SelectedItemChanged += new CodeImp.DoomBuilder.Controls.ImageBrowserControl.SelectedItemChangedDelegate(this.browser_SelectedItemChanged);
//
// TextureBrowserForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(893, 631);
this.Controls.Add(this.tvTextureSets);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
this.Controls.Add(this.browser);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.KeyPreview = true;
this.MinimizeBox = false;
this.Name = "TextureBrowserForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Browse Textures";
this.Load += new System.EventHandler(this.TextureBrowserForm_Load);
this.Shown += new System.EventHandler(this.TextureBrowserForm_Shown);
this.Activated += new System.EventHandler(this.TextureBrowserForm_Activated);
this.Move += new System.EventHandler(this.TextureBrowserForm_Move);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TextureBrowserForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.TextureBrowserForm_HelpRequested);
this.ResizeEnd += new System.EventHandler(this.TextureBrowserForm_ResizeEnd);
this.ResumeLayout(false);
}
@ -158,10 +140,8 @@ namespace CodeImp.DoomBuilder.Windows
private CodeImp.DoomBuilder.Controls.ImageBrowserControl browser;
private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button apply;
private System.Windows.Forms.ListView texturesets;
private System.Windows.Forms.ColumnHeader namecolumn;
private System.Windows.Forms.ImageList smallimages;
private System.Windows.Forms.ColumnHeader countcolumn;
private System.Windows.Forms.Button apply;
private System.Windows.Forms.ImageList smallimages;
private System.Windows.Forms.TreeView tvTextureSets;
}
}

View file

@ -30,6 +30,7 @@ using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Controls;
using System.IO;
#endregion
@ -37,28 +38,27 @@ namespace CodeImp.DoomBuilder.Windows
{
internal partial class TextureBrowserForm : Form
{
// Constants
private const int COLUMN_WIDTH_COUNT = 52;
// Variables
private string selectedname;
private Point lastposition;
private Size lastsize;
private ListViewGroup usedgroup;
private ListViewGroup availgroup;
private ListViewItem selectedset;
private TreeNode selectedset; //mxd
private string selecttextureonfill;
private bool browseFlats;
// Properties
public string SelectedName { get { return selectedname; } }
// Constructor
public TextureBrowserForm(string selecttexture)
public TextureBrowserForm(string selecttexture, bool browseFlats)
{
Cursor.Current = Cursors.WaitCursor;
ListViewItem item;
bool foundselecttexture = false;
TreeNode item;//mxd
long longname = Lump.MakeLongName(selecttexture ?? "");
selectedset = null;//mxd
this.browseFlats = browseFlats;
// Initialize
InitializeComponent();
@ -66,98 +66,74 @@ namespace CodeImp.DoomBuilder.Windows
// Update the used textures
General.Map.Data.UpdateUsedTextures();
// Resize columns to maximize available width
countcolumn.Width = COLUMN_WIDTH_COUNT;
namecolumn.Width = texturesets.ClientRectangle.Width - SystemInformation.VerticalScrollBarWidth - countcolumn.Width - 2;
// Fill texture sets list with normal texture sets
tvTextureSets.SuspendLayout();//mxd
//mxd. Set title
this.Text = "Browse " + (browseFlats ? "flats" : "textures");
//mxd. Fill texture sets list with normal texture sets
foreach(IFilledTextureSet ts in General.Map.Data.TextureSets)
{
item = texturesets.Items.Add(ts.Name);
item.Tag = ts;
item.ImageIndex = 0;
item.UseItemStyleForSubItems = false;
item.SubItems.Add(ts.Textures.Count.ToString(), item.ForeColor,
item.BackColor, new Font(item.Font, FontStyle.Regular));
item = tvTextureSets.Nodes.Add(ts.Name + " [" + ts.Textures.Count + "]");
item.Name = ts.Name;
item.Tag = ts;
item.ImageIndex = 0;
}
// Add container-specific texture sets
//mxd. Add container-specific texture sets
foreach(ResourceTextureSet ts in General.Map.Data.ResourceTextureSets)
{
item = texturesets.Items.Add(ts.Name);
item.Tag = ts;
item.ImageIndex = 2 + ts.Location.type;
item.UseItemStyleForSubItems = false;
item.SubItems.Add(ts.Textures.Count.ToString(), item.ForeColor,
item.BackColor, new Font(item.Font, FontStyle.Regular));
}
// Add All textures set
item = texturesets.Items.Add(General.Map.Data.AllTextureSet.Name);
item.Tag = General.Map.Data.AllTextureSet;
item.ImageIndex = 1;
item.UseItemStyleForSubItems = false;
item.SubItems.Add(General.Map.Data.AllTextureSet.Textures.Count.ToString(),
item.ForeColor, item.BackColor, new Font(item.Font, FontStyle.Regular));
// Select the last one that was selected
string selectname = General.Settings.ReadSetting("browserwindow.textureset", "");
foreach(ListViewItem i in texturesets.Items)
{
if(i.Text == selectname)
{
IFilledTextureSet set = (i.Tag as IFilledTextureSet);
foreach(ImageData img in set.Textures)
{
if(img.LongName == longname)
{
i.Selected = true;
foundselecttexture = true;
break;
}
}
break;
}
}
// If the selected texture was not found in the last-selected set, try finding it in the other sets
if(!foundselecttexture)
{
foreach(ListViewItem i in texturesets.Items)
{
IFilledTextureSet set = (i.Tag as IFilledTextureSet);
foreach(ImageData img in set.Textures)
{
if(img.LongName == longname)
{
i.Selected = true;
foundselecttexture = true;
break;
}
}
if(foundselecttexture) break;
}
}
// Texture still now found? Then just select the last used set
if(!foundselecttexture)
{
foreach(ListViewItem i in texturesets.Items)
{
if(i.Text == selectname)
{
i.Selected = true;
foundselecttexture = true;
break;
}
}
item = tvTextureSets.Nodes.Add(ts.Name + " [" + ts.Textures.Count + "]");
item.Name = ts.Name;
item.Tag = ts;
item.ImageIndex = 2 + ts.Location.type;
item.SelectedImageIndex = item.ImageIndex;
if (ts.Location.type != DataLocation.RESOURCE_WAD)
createNodes(item);
}
// WARNING: Some strange behavior of the listview here!
// When you leave this line out, the list becomes very slow.
// Also, this does not change the item selected previously.
texturesets.Items[0].Selected = true;
//mxd. Add All textures set
item = tvTextureSets.Nodes.Add(General.Map.Data.AllTextureSet.Name + " [" + General.Map.Data.AllTextureSet.Textures.Count + "]");
item.Name = General.Map.Data.AllTextureSet.Name;
item.Tag = General.Map.Data.AllTextureSet;
item.ImageIndex = 1;
item.SelectedImageIndex = item.ImageIndex;
//mxd. Select the last one that was selected
string selectname = General.Settings.ReadSetting("browserwindow.textureset", "");
TreeNode match = findNodeByName(tvTextureSets.Nodes, selectname);
if (match != null) {
IFilledTextureSet set = (match.Tag as IFilledTextureSet);
foreach (ImageData img in set.Textures) {
if (img.LongName == longname) {
selectedset = match;
break;
}
}
}
//mxd. If the selected texture was not found in the last-selected set, try finding it in the other sets
if (selectedset == null) {
foreach (TreeNode n in tvTextureSets.Nodes) {
selectedset = findTextureByLongName(n, longname);
if (selectedset != null)
break;
}
}
//mxd. Texture still now found? Then just select the last used set
if (selectedset == null && match != null)
selectedset = match;
tvTextureSets.ExpandAll();//mxd
if (selectedset != null) {//mxd
tvTextureSets.SelectedNode = selectedset;
FillImagesList();
}
// Texture to select when list is filled
selecttextureonfill = selecttexture;
@ -171,11 +147,6 @@ namespace CodeImp.DoomBuilder.Windows
lastsize = this.Size;
// Position window from configuration settings
this.SuspendLayout();
/*
this.Location = new Point(General.Settings.ReadSetting("browserwindow.positionx", this.Location.X),
General.Settings.ReadSetting("browserwindow.positiony", this.Location.Y));
*/
this.Size = new Size(General.Settings.ReadSetting("browserwindow.sizewidth", this.Size.Width),
General.Settings.ReadSetting("browserwindow.sizeheight", this.Size.Height));
this.WindowState = (FormWindowState)General.Settings.ReadSetting("browserwindow.windowstate", (int)FormWindowState.Normal);
@ -183,6 +154,120 @@ namespace CodeImp.DoomBuilder.Windows
this.ResumeLayout(true);
}
//mxd
private TreeNode findTextureByLongName(TreeNode node, long longname) {
//first search in child nodes
if (node.Nodes != null) {
TreeNode match = null;
foreach (TreeNode n in node.Nodes) {
match = findTextureByLongName(n, longname);
if (match != null)
return match;
}
}
//then - in current node
IFilledTextureSet set = (node.Tag as IFilledTextureSet);
foreach (ImageData img in set.Textures) {
if (img.LongName == longname)
return node;
}
return null;
}
//mxd
private TreeNode findNodeByName(TreeNodeCollection nodes, string selectname) {
foreach (TreeNode n in nodes) {
if (n.Name == selectname)
return n;
if (n.Nodes != null) {
TreeNode match = findNodeByName(n.Nodes, selectname);
if (match != null)
return match;
}
}
return null;
}
//mxd
private void createNodes(TreeNode root) {
ResourceTextureSet set = root.Tag as ResourceTextureSet;
if (set == null) {
General.ErrorLogger.Add(ErrorType.Error, "Resource " + root.Name + " doesn't have TextureSet!");
return;
}
int imageIndex = set.Location.type + 4;
string[] separator = new string[]{ Path.DirectorySeparatorChar.ToString() };
foreach (ImageData image in set.Textures) {
string localName = image.FullName.Replace(set.Location.location, "");
string[] parts = localName.Split(separator, StringSplitOptions.RemoveEmptyEntries);
TreeNode curNode = root;
if (parts.Length == 1) continue;
for (int i = 0; i < parts.Length - 1; i++) {
string category = parts[i];
//already got such category?
if (curNode.Nodes.Count > 0 && curNode.Nodes.ContainsKey(category)) {
curNode = curNode.Nodes[category];
} else { //create a new one
TreeNode n = new TreeNode(category);
n.Name = category;
n.ImageIndex = imageIndex;
n.SelectedImageIndex = imageIndex;
curNode.Nodes.Add(n);
curNode = n;
ResourceTextureSet ts = new ResourceTextureSet(category, set.Location);
curNode.Tag = ts;
}
//add to current and parent nodes
if (i == parts.Length - 2) {
TreeNode cn = curNode;
while (cn != root) {
ResourceTextureSet curTs = cn.Tag as ResourceTextureSet;
curTs.AddTexture(image);
cn = cn.Parent;
}
}
}
}
if (root.Nodes.Count == 1 && root.Nodes[0].Nodes.Count > 0) {
TreeNode[] children = new TreeNode[root.Nodes[0].Nodes.Count];
root.Nodes[0].Nodes.CopyTo(children, 0);
root.Nodes.Clear();
root.Nodes.AddRange(children);
}
if (root.Nodes != null) {
foreach (TreeNode n in root.Nodes)
SetItemsCount(n);
}
}
//mxd
private void SetItemsCount(TreeNode node) {
ResourceTextureSet ts = node.Tag as ResourceTextureSet;
if (ts == null) throw new Exception("Expected IFilledTextureSet, but got null...");
node.Text += " [" + ts.Textures.Count + "]";
if (General.Map.Config.MixTexturesFlats)
ts.MixTexturesAndFlats();
if(node.Nodes == null) return;
foreach (TreeNode child in node.Nodes) SetItemsCount(child);
}
// Selection changed
private void browser_SelectedItemChanged()
{
@ -219,7 +304,8 @@ namespace CodeImp.DoomBuilder.Windows
private void TextureBrowserForm_Activated(object sender, EventArgs e)
{
// Focus the textbox
browser.FocusTextbox();
//browser.FocusTextbox();
browser.FocusList(); //mxd
Cursor.Current = Cursors.Default;
}
@ -276,20 +362,20 @@ namespace CodeImp.DoomBuilder.Windows
General.Settings.WriteSetting("browserwindow.sizewidth", lastsize.Width);
General.Settings.WriteSetting("browserwindow.sizeheight", lastsize.Height);
General.Settings.WriteSetting("browserwindow.windowstate", windowstate);
// Save last selected texture set
if(texturesets.SelectedItems.Count > 0)
General.Settings.WriteSetting("browserwindow.textureset", texturesets.SelectedItems[0].Text);
//mxd. Save last selected texture set
if(tvTextureSets.SelectedNode != null)
General.Settings.WriteSetting("browserwindow.textureset", tvTextureSets.SelectedNode.Name);
// Clean up
browser.CleanUp();
}
// Static method to browse for texture
// Static method to browse for texture or flat
// Returns null when cancelled.
public static string Browse(IWin32Window parent, string select)
public static string Browse(IWin32Window parent, string select, bool browseFlats)
{
TextureBrowserForm browser = new TextureBrowserForm(select);
TextureBrowserForm browser = new TextureBrowserForm(select, browseFlats);
if(browser.ShowDialog(parent) == DialogResult.OK)
{
// Return result
@ -301,17 +387,6 @@ namespace CodeImp.DoomBuilder.Windows
return select;
}
}
// Texture set selected
private void texturesets_SelectedIndexChanged(object sender, EventArgs e)
{
// Anything slected?
if(texturesets.SelectedItems.Count > 0)
{
selectedset = texturesets.SelectedItems[0];
FillImagesList();
}
}
// Item double clicked
private void browser_SelectedItemDoubleClicked()
@ -324,17 +399,27 @@ namespace CodeImp.DoomBuilder.Windows
{
// Get the selected texture set
IFilledTextureSet set = (selectedset.Tag as IFilledTextureSet);
// Start adding
browser.BeginAdding(false);
// Add all available textures and mark the images for temporary loading
foreach(ImageData img in set.Textures)
browser.Add(img.Name, img, img, availgroup);
// Add all used textures and mark the images for permanent loading
foreach(ImageData img in set.Textures)
if(img.UsedInMap) browser.Add(img.Name, img, img, usedgroup);
// Start adding
browser.BeginAdding(false);
if (browseFlats) {
// Add all used flats
foreach (ImageData img in set.Flats)
if (img.UsedInMap) browser.Add(img.Name, img, img, usedgroup);
// Add all available flats
foreach (ImageData img in set.Flats)
browser.Add(img.Name, img, img, availgroup);
}else{
// Add all available textures and mark the images for temporary loading
foreach (ImageData img in set.Textures)
browser.Add(img.Name, img, img, availgroup);
// Add all used textures and mark the images for permanent loading
foreach (ImageData img in set.Textures)
if (img.UsedInMap) browser.Add(img.Name, img, img, usedgroup);
}
// Done adding
browser.EndAdding();
@ -356,5 +441,16 @@ namespace CodeImp.DoomBuilder.Windows
selecttextureonfill = null;
}
}
//mxd
private void tvTextureSets_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) {
selectedset = e.Node;
FillImagesList();
}
//mxd
private void tvTextureSets_MouseEnter(object sender, EventArgs e) {
tvTextureSets.Focus();
}
}
}

View file

@ -123,9 +123,6 @@
<metadata name="apply.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="texturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="smallimages.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
@ -133,8 +130,8 @@
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB+
DAAAAk1TRnQBSQFMAgEBBQEAAQkBAAEEAQABEAEAARYBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAc
DwAAAk1TRnQBSQFMAgEBBwEAAVQBAAFUAQABEAEAARYBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASwDAAEBAQABCAYAAQsYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -162,34 +159,48 @@
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD//8ABQAHDgEQAW0BbAIO
MwABDgENAWwBkAG7AgkB9wJsAWYCDjsAAQ4B6gFsAQ8BDjQAAW0HAAFDAW0BDjQAAW0B8QFtAQcBvAHw
AfECAAERAQcB7DQAA20BBwK8AfACAAJtAQ40AAFtAfADBwK8AgABEQEHAew0AAFtAfAB7wMHAbwCAAJt
AQ40AAFtAfAC7wMHAgABEQEHAew0AAFtAfAD7wIHAgACbQEONAABbQG8BO8BBwIAAREBBwHsNAAIbQEA
AQ8B7AEPNAAJDgHrAZEBDTQAAQ4BZQGQAbsFCQH3AWwCDj4AAQ7/AMMAAfcCrgFtAWwB6gJsBGY0AAH3
Bf8C9AMZAWYJAAgOEwAB9wKuAW0BbAHqAmwEZgQAAbUC/wKTAZkBBwG7AbQCGQNmBgABDgEABe8B9wEO
AwACcwHrAW4BbQFKARMBFQFDAREBDwEOAQ8DAAH3Bf8C9AMZAWYEAAG1Av8BkwGaAXoBnwGeAbsB9AHz
AWYBGQFmBQABDgHvAQAB8ALxAvIBvAEOAwABcwIcBzECSwFEAe0CAAG1Av8CkwGZAQcBuwG0AhkDZgIA
AbUC/wG7AQgCnwF+AXkC9AFsARkDZgIAAQ4B7wEHAQAB8ALxAvIB8AEOAwAB7AF6ARwBmgN6AlkBUwFS
ATEBSwHqAgABtQL/AZMBmgF6AZ8BngG7AfQB8wFmARkBZgIAAbUC/wLbAQkBCAF+AXkB/wH0AWwB8wFm
ARkBZgIAAQ4CAAHvAbwB8ALxAfIB8AEOAwAB7QF6ARwBmQV6AlkBUwExAUQB7QEAAbUC/wG7AQgCnwF+
AXkC9AFsARkDZgEHCv8BbAH0AWwBGQFmAgABDgHwAgcCvALwAfEBvAEOAwAB7QGaAXoBHAGaBXoDWQFL
AW0BAAG1Av8C2wEJAQgBfgF5Af8B9AFsAfMBZgEZAWYCBwS1AfcBtQLtApEB9AFsAfMBZgIAAQ4B8AMH
ArwC8AG8AQ4DAAEcAZoBegEcAZkHegFZAVIBSgHtAQcK/wFsAfQBbAEZAWYBtQH/AQcK/wFsAfQBbAIA
AQ4B8AQHArwB8AG8AQ4DAAEcAZoBoAF6ARwHmgJ6AXQBbQIHBLUB9wG1Au0CkQH0AWwB8wFmAbUB/wIH
BLUB9wG1Au0CkQH0AWwCAAEOAfAC7wQHAbwBBwEOAwABHAOgCBwC7QHsAXMCAAEHCv8BbAH0AWwBBwP/
AQcK/wFsAgABDgHwA+8FBwEOAwABHASgAZoGegFzBQACBwS1AfcBtQLtApEB9AFsAgcCtQIHBLUB9wG1
Au0CkQIAAQ4BvATvBAcBDgMAARwBoAHDA6ABegMcAu0BcwcAAQcK/wFsAgABBwr/AWwB9AFsAgABDgG8
Be8DBwEOAwABHAGZAsMCoAEcAe0MAAIHBLUB9wG1Au0CkQIAAgcEtQH3AbUC7QKRAfQBbAIAAQ4B9APw
A7wCBwEOBAAFHAHtHQABBwr/AWwCAAsOJwACBwS1AfcBtQLtApHgAAFCAU0BPgcAAT4DAAEoAwABQAMA
ASwDAAEBAQABAQUAAWABARYAA/8BAAL/BgAC/wYAAv8GAAH/AcMGAAHgAQEGAAHAAQEGAAGAAQEGAAHg
ASMGAAHAASMGAAHAASMGAAHAASMGAAHAASMGAAHAASMGAAHAASMGAAHAASMGAAHAASMGAAGAAQEGAAHA
AQEGAAHgAQMGAAL/BgAC/wYAAv8GABr/AQABDwb/AQABDwH4AQcC/wEAAQ8BAAEDAfABBwEAAQcBAAEP
AQABAwHgAQcBAAEDAQABAwIAAcABBwEAAQMBAAEDAgABwAEHAQABAQQAAcABBwEAAQEEAAHAAQcGAAHA
AQcGAAHAAQcCAAHAAwABwAEHAQABBwHAAwABwAEHAQABBwHwAQABwAEAAcABBwEAAf8B8AEAAcABAAHA
AQcBgQP/AfABAAHAAQcE/wHwAQAc/ws=
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/9MADUsIAAKZGgAHDgEQ
AW0BbAIOAgABUQ1SAUsFAAHvAXMBHAFuAUoBBxcAAQ4BDQFsAZABuwIJAfcCbAFmAg4BAAFSAXoBUgGg
CHoBUgGgAVIBSwMAAZkBbgN0AVIBSwFEAUoBmR0AAQ4B6gFsAQ8BDgEAAVIBegFSAaABegFYBnkBWAGg
AVIBSwIAAXMBbgF0AZkCdAFSAksBbgFEAW4BGhQAAW0HAAFDAW0BDgIAAVIBegFSAaAKcwFSAUsBAAEc
AXQBmgJSAXQBegFMBUsBcxMAAW0B8QFtAQcBvAHwAfECAAERAQcB7AIAAVIBegFSAaABcwL/AfMD9ALz
AXMBUgFLAQABmQFzAVEBdAF6AnQBTANLAUoBSwGTEwADbQEHArwB8AIAAm0BDgIAAVIBegFSAaABcwH/
AdwF2wH0AXMBUgFLAQAB7AEcAXkCdAoSEgABbQHwAwcCvAIAAREBBwHsAgABUgGaAVIB/wG8Af8GGQHz
AbwBUgFLAQACHAJ0AgcD7wH3ARwD7QESEgABbQHwAe8DBwG8AgACbQEOAgABUgGgDVICAAHtARwBdAFL
ARwI/wHtARISAAFtAfAC7wMHAgABEQEHAewCAAFSA6ABHAH/Aa4BmgG9AXUB4wGuAf8B7QHrAgAB7AFz
AXQBSwH3Af8GrgH/Ae0BEhIAAW0B8APvAgcCAAJtAQ4CAAFSAf8CoAH3Af8BrgL/AnUBrgH/Ae0B6wIA
AZMDdAHvAf8BrgGUAf8BmgGUAa4B/wHtARISAAFtAbwE7wEHAgABEQEHAewDAAFSAv8B7wH/Aa4BlAH/
AZoBlAGuAf8B7QHrAgABHAGZAcMBegHvAf8C0wH/AZoC0wH/Ae0BEhIACG0BAAEPAewBDwQAAlIB7wH/
AdMErgHTAf8B7QHrAwACHAGaAe8B/wbTAf8B7QESEgAJDgHrAZEBDQYAAe8B/wbTAf8B7QHrBAABmQF0
AQcI/wHtARISAAEOAWUBkAG7BQkB9wFsAg4FAAEHCP8B7QHrBgACBwPvAfcBHAPtHgABDgYAAgcD7wH3
ARwD7QkAApn/AKgAAfcCrgFtAWwB6gJsBGY0AAH3Bf8C9AMZAWYJAAgOEwAB9wKuAW0BbAHqAmwEZgQA
AbUC/wKTAZkBBwG7AbQCGQNmBgABDgEABe8B9wEOAwACcwHrAW4BbQFKARMBFQFDAREBDwEOAQ8DAAH3
Bf8C9AMZAWYEAAG1Av8BkwGaAXoBnwGeAbsB9AHzAWYBGQFmBQABDgHvAQAB8ALxAvIBvAEOAwABcwIc
BzECSwFEAe0CAAG1Av8CkwGZAQcBuwG0AhkDZgIAAbUC/wG7AQgCnwF+AXkC9AFsARkDZgIAAQ4B7wEH
AQAB8ALxAvIB8AEOAwAB7AF6ARwBmgN6AlkBUwFSATEBSwHqAgABtQL/AZMBmgF6AZ8BngG7AfQB8wFm
ARkBZgIAAbUC/wLbAQkBCAF+AXkB/wH0AWwB8wFmARkBZgIAAQ4CAAHvAbwB8ALxAfIB8AEOAwAB7QF6
ARwBmQV6AlkBUwExAUQB7QEAAbUC/wG7AQgCnwF+AXkC9AFsARkDZgEHCv8BbAH0AWwBGQFmAgABDgHw
AgcCvALwAfEBvAEOAwAB7QGaAXoBHAGaBXoDWQFLAW0BAAG1Av8C2wEJAQgBfgF5Af8B9AFsAfMBZgEZ
AWYCBwS1AfcBtQLtApEB9AFsAfMBZgIAAQ4B8AMHArwC8AG8AQ4DAAEcAZoBegEcAZkHegFZAVIBSgHt
AQcK/wFsAfQBbAEZAWYBtQH/AQcK/wFsAfQBbAIAAQ4B8AQHArwB8AG8AQ4DAAEcAZoBoAF6ARwHmgJ6
AXQBbQIHBLUB9wG1Au0CkQH0AWwB8wFmAbUB/wIHBLUB9wG1Au0CkQH0AWwCAAEOAfAC7wQHAbwBBwEO
AwABHAOgCBwC7QHsAXMCAAEHCv8BbAH0AWwBBwP/AQcK/wFsAgABDgHwA+8FBwEOAwABHASgAZoGegFz
BQACBwS1AfcBtQLtApEB9AFsAgcCtQIHBLUB9wG1Au0CkQIAAQ4BvATvBAcBDgMAARwBoAHDA6ABegMc
Au0BcwcAAQcK/wFsAgABBwr/AWwB9AFsAgABDgG8Be8DBwEOAwABHAGZAsMCoAEcAe0MAAIHBLUB9wG1
Au0CkQIAAgcEtQH3AbUC7QKRAfQBbAIAAQ4B9APwA7wCBwEOBAAFHAHtHQABBwr/AWwCAAsOJwACBwS1
AfcBtQLtApHgAAFCAU0BPgcAAT4DAAEoAwABQAMAASwDAAEBAQABAQUAAWABARYAA/8BAAb/AgAG/wIA
Bv8CAAH/AcMBwAEBAf4BfwIAAeABAQGAAQAB+AEfAgABwAEBAgAB4AEHAgABgAEBAgABwAEBAgAB4AEj
AgABgAEBAgABwAEjAgABgAEBAgABwAEjAgABgAMAAcABIwIAAYADAAHAASMBAAEBAYADAAHAASMBAAEB
AYADAAHAASMBAAEBAYADAAHAASMBgAEBAYADAAHAASMBwAEBAcADAAGAAQEB8AEBAeADAAHAAQEB8AEB
AfgBAQIAAeABAwHwAQMB/gF/AgAG/wIABv8CAAb/AgAa/wEAAQ8G/wEAAQ8B+AEHAv8BAAEPAQABAwHw
AQcBAAEHAQABDwEAAQMB4AEHAQABAwEAAQMCAAHAAQcBAAEDAQABAwIAAcABBwEAAQEEAAHAAQcBAAEB
BAABwAEHBgABwAEHBgABwAEHAgABwAMAAcABBwEAAQcBwAMAAcABBwEAAQcB8AEAAcABAAHAAQcBAAH/
AfABAAHAAQABwAEHAYED/wHwAQABwAEHBP8B8AEAHP8L
</value>
</data>
<metadata name="tvTextureSets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="browser.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View file

@ -1419,6 +1419,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
//make undo
General.Map.UndoRedo.CreateUndo("Delete " + rest);
General.Interface.DisplayStatus(StatusType.Info, "Deleted " + rest);
//clear selection
ClearSelection();
PreActionNoChange();
foreach (IVisualEventReceiver i in objs) i.OnDelete(); //are they deleted from BlockMap automatically?..

View file

@ -14,7 +14,6 @@ using CodeImp.DoomBuilder.VisualModes;
using CodeImp.DoomBuilder.ColorPicker.Windows;
[assembly: CLSCompliant(true)]
namespace CodeImp.DoomBuilder.ColorPicker
{
public class BuilderPlug : Plug

View file

@ -1679,7 +1679,9 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
//make undo
General.Map.UndoRedo.CreateUndo("Delete " + rest);
General.Interface.DisplayStatus(StatusType.Info, "Deleted " + rest);
//clear selection
ClearSelection();
PreActionNoChange();
foreach (IVisualEventReceiver i in objs) i.OnDelete(); //are they deleted from BlockMap automatically?..

View file

@ -7,7 +7,6 @@ using CodeImp.DoomBuilder.Controls;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Plugins;
[assembly: CLSCompliant(true)]
namespace CodeImp.DoomBuilder.TagExplorer
{
public sealed class BuilderPlug : Plug

View file

@ -9,7 +9,6 @@ using CodeImp.DoomBuilder.Actions;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.VisualModes;
[assembly: CLSCompliant(true)]
namespace CodeImp.DoomBuilder.UDMFControls
{
public sealed class BuilderPlug: Plug {