Added, Visual mode, GLDEFS, GLOOME: subtractive glow is now supported.

Changed, Visual mode: changed thing fog calculation logic. Should be closer to GZDoom now.
Fixed, GLDEFS parser: "height" texture parameter was not treated as optional.
Fixed, text lump parsers: in some cases incorrect line number was displayed in error and warning messages.
Fixed, Visual mode: glow effect was not applied to sectors with 3 sidedefs.
Fixed, Visual mode: in some cases glow effect was not updated when replacing textures. 
Fixed, general interface: "Full Brightness" button state was not updated during map loading.
Fixed, Drag Linedefs/Vertices/Sectors/Things modes: positions of line length labels were not updated while panning the view.
Cosmetic: added a bunch of new icons.
Cosmetic: changed Visual mode crosshair.
This commit is contained in:
MaxED 2015-08-27 20:46:49 +00:00
parent c7696b0464
commit deb65258ae
43 changed files with 727 additions and 329 deletions

View file

@ -1060,6 +1060,8 @@
<EmbeddedResource Include="Resources\CommentRegular.png" />
<EmbeddedResource Include="Resources\CommentSmile.png" />
<None Include="Resources\Comment.png" />
<None Include="Resources\About.png" />
<None Include="Resources\Configuration.png" />
<Content Include="Resources\DB2.ico" />
<None Include="Resources\GZDB2.ico" />
<None Include="Resources\fog.png" />
@ -1075,6 +1077,11 @@
<None Include="Resources\InfoPanelCollapse.png" />
<None Include="Resources\InfoPanelExpand.png" />
<None Include="Resources\GridDynamic.png" />
<None Include="Resources\Group.png" />
<None Include="Resources\GroupAdd.png" />
<None Include="Resources\GroupRemove.png" />
<None Include="Resources\GridDecrease.png" />
<None Include="Resources\GridIncrease.png" />
<Content Include="Resources\Light.png" />
<None Include="Resources\Lightbulb.png" />
<None Include="Resources\LightDisabled.png" />
@ -1090,6 +1097,9 @@
<None Include="Resources\ModelDisabled.png" />
<None Include="Resources\ModelFiltered.png" />
<Content Include="Resources\Model_selected.png" />
<None Include="Resources\Update.png" />
<None Include="Resources\Reload.png" />
<None Include="Resources\Preferences.png" />
<None Include="Resources\Replace.png" />
<None Include="Resources\SearchPrev.png" />
<None Include="Resources\SearchNext.png" />

View file

@ -7,6 +7,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
public PixelColor Color;
public int Height;
public bool Fullbright;
public bool Fullblack; // GLOOME only
public bool Subtractive; // GLOOME only
public bool CalculateTextureColor;
}
}

View file

@ -18,6 +18,12 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom
{
#region ================== Structs
private const int DEFAULT_GLOW_HEIGHT = 64;
#endregion
#region ================== Structs
private struct GldefsLightType
{
public const string POINT = "pointlight";
@ -509,16 +515,42 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom
// Add glow data
glowingflats[General.Map.Data.GetFullLongFlatName(Lump.MakeLongName(token, General.Map.Options.UseLongTextureNames))] = new GlowingFlatData {
Height = 128,
Height = DEFAULT_GLOW_HEIGHT * 2,
Fullbright = true,
Color = new PixelColor(255, 255, 255, 255),
CalculateTextureColor = true
};
}
}
else if(token == "texture")
// GLOOME subtractive flats
else if(token == "subflats" || token == "subwalls")
{
// Next sould be opening brace
if(!NextTokenIs("{")) break;
// Read flat names
while(SkipWhitespace(true))
{
token = ReadToken();
if(token == "}") break;
// Add glow data
glowingflats[General.Map.Data.GetFullLongFlatName(Lump.MakeLongName(token, General.Map.Options.UseLongTextureNames))] = new GlowingFlatData {
Height = DEFAULT_GLOW_HEIGHT * 2,
Fullblack = true,
Subtractive = true,
Color = new PixelColor(255, 0, 0, 0),
CalculateTextureColor = false
};
}
}
else if(token == "texture" || token == "subtexture")
{
int color;
int glowheight = DEFAULT_GLOW_HEIGHT;
bool subtractivetexture = (token == "subtexture");
string texturename = StripTokenQuotes(ReadToken());
if(string.IsNullOrEmpty(texturename))
{
General.ErrorLogger.Add(ErrorType.Error, "Error in '" + sourcefilename + "' at line " + GetCurrentLineNumber() + ": expected a texture name.");
@ -532,7 +564,6 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom
SkipWhitespace(true);
token = ReadToken();
int color;
if(!int.TryParse(token, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out color))
{
//probably it's a color name?
@ -556,8 +587,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom
{
// Add glow data
glowingflats[texturehash] = new GlowingFlatData {
Height = 128,
Fullbright = false,
Height = glowheight * 2,
Subtractive = subtractivetexture,
Color = PixelColor.FromInt(color).WithAlpha(255),
CalculateTextureColor = false
};
@ -565,36 +596,52 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom
continue;
}
// Should be glow height
int height;
if(!int.TryParse(token, NumberStyles.Integer, CultureInfo.InvariantCulture, out height))
// Can be glow height
SkipWhitespace(true);
token = ReadToken();
int h;
if(int.TryParse(token, NumberStyles.Integer, CultureInfo.InvariantCulture, out h))
{
General.ErrorLogger.Add(ErrorType.Error, "Error in '" + sourcefilename + "' at line " + GetCurrentLineNumber() + ": expected glow height value, but got '" + token + "'.");
// Can't pass glowheight directly cause TryParse will unconditionally set it to 0
glowheight = h;
// Now we can find a comma
if(!NextTokenIs(",", false))
{
// Add glow data
glowingflats[texturehash] = new GlowingFlatData {
Height = glowheight * 2,
Subtractive = subtractivetexture,
Color = PixelColor.FromInt(color).WithAlpha(255),
CalculateTextureColor = false
};
continue;
}
// Read the flag
SkipWhitespace(true);
token = ReadToken().ToLowerInvariant();
}
// Next is "fullbright" or "fullblack" flag
bool fullbright = (token == "fullbright");
bool fullblack = (!subtractivetexture && token == "fullblack");
if(!fullblack && !fullbright)
{
string expectedflags = (subtractivetexture ? "'fullbright'" : "'fullbright' or 'fullblack'");
General.ErrorLogger.Add(ErrorType.Error, "Error in '" + sourcefilename + "' at line " + GetCurrentLineNumber() + ": expected " + expectedflags + " flag, but got '" + token + "'.");
break;
}
// Now we can find a comma
if(!NextTokenIs(",", false))
{
// Add glow data
glowingflats[texturehash] = new GlowingFlatData {
Height = height * 2,
Fullbright = false,
Color = PixelColor.FromInt(color).WithAlpha(255),
CalculateTextureColor = false
};
continue;
}
// Next is "fullbright" flag
SkipWhitespace(true);
bool fullbright = (ReadToken().ToLowerInvariant() == "fullbright");
// Add glow data
glowingflats[texturehash] = new GlowingFlatData {
Height = height,
Height = glowheight * 2,
Fullbright = fullbright,
Fullblack = fullblack,
Subtractive = subtractivetexture,
Color = PixelColor.FromInt(color).WithAlpha(255),
CalculateTextureColor = false
};
@ -604,8 +651,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom
// Now find closing brace
while(SkipWhitespace(true))
{
string t = ReadToken();
if(string.IsNullOrEmpty(t) || t == "}") break;
token = ReadToken();
if(string.IsNullOrEmpty(token) || token == "}") break;
}
}
else if (token == "#include")

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.5466
// Runtime Version:2.0.50727.5485
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -60,6 +60,13 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap About {
get {
object obj = ResourceManager.GetObject("About", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Add {
get {
object obj = ResourceManager.GetObject("Add", resourceCulture);
@ -186,6 +193,13 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap Configuration {
get {
object obj = ResourceManager.GetObject("Configuration", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Copy {
get {
object obj = ResourceManager.GetObject("Copy", resourceCulture);
@ -305,6 +319,13 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap GridDecrease {
get {
object obj = ResourceManager.GetObject("GridDecrease", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap GridDynamic {
get {
object obj = ResourceManager.GetObject("GridDynamic", resourceCulture);
@ -312,6 +333,34 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap GridIncrease {
get {
object obj = ResourceManager.GetObject("GridIncrease", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Group {
get {
object obj = ResourceManager.GetObject("Group", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap GroupAdd {
get {
object obj = ResourceManager.GetObject("GroupAdd", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap GroupRemove {
get {
object obj = ResourceManager.GetObject("GroupRemove", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap GZDB_Logo_small {
get {
object obj = ResourceManager.GetObject("GZDB_Logo_small", resourceCulture);
@ -599,6 +648,13 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap Preferences {
get {
object obj = ResourceManager.GetObject("Preferences", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Properties {
get {
object obj = ResourceManager.GetObject("Properties", resourceCulture);
@ -627,6 +683,13 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap Reload {
get {
object obj = ResourceManager.GetObject("Reload", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Replace {
get {
object obj = ResourceManager.GetObject("Replace", resourceCulture);
@ -907,6 +970,13 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap Update {
get {
object obj = ResourceManager.GetObject("Update", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap ViewBrightness {
get {
object obj = ResourceManager.GetObject("ViewBrightness", resourceCulture);

View file

@ -514,4 +514,34 @@
<data name="GridDynamic" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GridDynamic.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="About" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\About.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Configuration" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Configuration.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Preferences" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Preferences.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Reload" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Reload.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Update" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Update.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Group" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Group.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GroupAdd" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GroupAdd.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GroupRemove" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GroupRemove.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GridDecrease" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GridDecrease.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GridIncrease" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GridIncrease.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -29,6 +29,10 @@ namespace CodeImp.DoomBuilder.Rendering
#region ================== Constants
public const float BYTE_TO_FLOAT = 0.00392156862745098f;
//mxd. Some color constants, full alpha
public const int INT_BLACK = -16777216;
public const int INT_WHITE = -1;
#endregion
@ -166,6 +170,18 @@ namespace CodeImp.DoomBuilder.Rendering
b = (byte)(Math.Min(a.b + b.b, 255))
};
}
//mxd. This subtracts two colors
public static PixelColor Subtract(PixelColor a, PixelColor b)
{
return new PixelColor
{
a = (byte)(Math.Max(a.a , b.a)), // Not sure about that...
r = (byte)(Math.Max(a.r - b.r, 0)),
g = (byte)(Math.Max(a.g - b.g, 0)),
b = (byte)(Math.Max(a.b - b.b, 0))
};
}
// This modulates two colors
public static PixelColor Modulate(PixelColor a, PixelColor b)
@ -187,6 +203,12 @@ namespace CodeImp.DoomBuilder.Rendering
b = (byte)((ab * bb) * 255.0f)
};
}
//mxd. Handy while debugging
public override string ToString()
{
return "[A=" + a + ", R=" + r + ", G=" + g + ", B=" + b + "]";
}
#endregion
}

View file

@ -40,7 +40,7 @@ namespace CodeImp.DoomBuilder.Rendering
private const int RENDER_PASSES = 4;
private const float PROJ_NEAR_PLANE = 1f;
private const float CROSSHAIR_SCALE = 0.06f;
//private const float CROSSHAIR_SCALE = 0.06f;
private const float FOG_RANGE = 0.9f;
internal const float GZDOOM_VERTICAL_VIEW_STRETCH = 1.2f;
internal const float GZDOOM_INVERTED_VERTICAL_VIEW_STRETCH = 1.0f / GZDOOM_VERTICAL_VIEW_STRETCH;
@ -187,31 +187,26 @@ namespace CodeImp.DoomBuilder.Rendering
// Determine coordinates
float width = windowsize.Width;
float height = windowsize.Height;
float size = height * CROSSHAIR_SCALE;
RectangleF rect = new RectangleF((width - size) / 2, (height - size) / 2, size, size);
RectangleF rect = new RectangleF((float)Math.Round((width - texturesize.Width) * 0.5f), (float)Math.Round((height - texturesize.Height) * 0.5f), texturesize.Width, texturesize.Height);
// Make vertices
crosshairverts = new FlatVertex[4];
crosshairverts[0].x = rect.Left;
crosshairverts[0].y = rect.Top;
crosshairverts[0].c = -1;
crosshairverts[0].u = 1f / texturesize.Width;
crosshairverts[0].v = 1f / texturesize.Height;
crosshairverts[1].x = rect.Right;
crosshairverts[1].y = rect.Top;
crosshairverts[1].c = -1;
crosshairverts[1].u = 1f - 1f / texturesize.Width;
crosshairverts[1].v = 1f / texturesize.Height;
crosshairverts[1].u = 1.0f;
crosshairverts[2].x = rect.Left;
crosshairverts[2].y = rect.Bottom;
crosshairverts[2].c = -1;
crosshairverts[2].u = 1f / texturesize.Width;
crosshairverts[2].v = 1f - 1f / texturesize.Height;
crosshairverts[2].v = 1.0f;
crosshairverts[3].x = rect.Right;
crosshairverts[3].y = rect.Bottom;
crosshairverts[3].c = -1;
crosshairverts[3].u = 1f - 1f / texturesize.Width;
crosshairverts[3].v = 1f - 1f / texturesize.Height;
crosshairverts[3].u = 1.0f;
crosshairverts[3].v = 1.0f;
}
#endregion
@ -808,7 +803,7 @@ namespace CodeImp.DoomBuilder.Rendering
// Determine the shader pass we want to use for this object
int wantedshaderpass = (((g == highlighted) && showhighlight) || (g.Selected && showselection)) ? highshaderpass : shaderpass;
//mxd
//mxd. Render fog?
if( !(!General.Settings.GZDrawFog || fullbrightness || sector.Sector.Brightness > 247) )
wantedshaderpass += 8;
@ -833,7 +828,7 @@ namespace CodeImp.DoomBuilder.Rendering
{
graphics.Shaders.World3D.World = world;
graphics.Shaders.World3D.LightColor = sector.Sector.FogColor;
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, GetFogEnd(sector.Sector, true));
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, sector.FogDistance);
}
graphics.Shaders.World3D.SetHighlightColor(CalculateHighlightColor((g == highlighted) && showhighlight, (g.Selected && showselection)).ToArgb());
@ -968,7 +963,8 @@ namespace CodeImp.DoomBuilder.Rendering
{
graphics.Shaders.World3D.World = world;
graphics.Shaders.World3D.LightColor = t.Thing.Sector.FogColor;
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, GetFogEnd(t.Thing.Sector, (litcolor.ToArgb() != 0)));
float fogdistance = (litcolor.ToArgb() != 0 ? VisualSector.MAXIMUM_FOG_DISTANCE : t.FogDistance);
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, fogdistance);
}
graphics.Shaders.World3D.ApplySettings();
@ -1155,9 +1151,9 @@ namespace CodeImp.DoomBuilder.Rendering
if (wantedshaderpass > 7)
{
graphics.Shaders.World3D.World = world;
graphics.Shaders.World3D.LightColor = t.Thing.Sector.FogColor;
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, GetFogEnd(t.Thing.Sector, (litcolor.ToArgb() != 0)));
float fogdistance = (litcolor.ToArgb() != 0 ? VisualSector.MAXIMUM_FOG_DISTANCE : t.FogDistance);
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, fogdistance);
}
for(int i = 0; i < group.Key.Model.Meshes.Count; i++)
@ -1204,24 +1200,6 @@ namespace CodeImp.DoomBuilder.Rendering
return litColor;
}
//mxd. This returns distance, at which fog color completely replaces texture color for given sector
private static float GetFogEnd(Sector s, bool skipwhennofog)
{
float brightness = Math.Max(30, s.Brightness);
if (s.HasFogColor)
{
if(s.UsesOutsideFog && General.Map.Data.MapInfo.OutsideFogDensity > 0)
return General.Map.Data.MapInfo.OutsideFogDensity;
if(!s.UsesOutsideFog && General.Map.Data.MapInfo.FogDensity > 0)
return General.Map.Data.MapInfo.FogDensity;
return brightness * 11.0f;
}
if(skipwhennofog) return 2805f; //255 * 11
return (float)Math.Pow(2.0f, brightness / 11.0f);
}
// This calculates the highlight/selection color
private Color4 CalculateHighlightColor(bool ishighlighted, bool isselected)
{
@ -1368,7 +1346,7 @@ namespace CodeImp.DoomBuilder.Rendering
graphics.Shaders.Display2D.Begin();
graphics.Shaders.Display2D.SetSettings(1.0f, 1.0f, 0.0f, 1.0f, true);
graphics.Shaders.Display2D.BeginPass(1);
graphics.Device.DrawUserPrimitives<FlatVertex>(PrimitiveType.TriangleStrip, 0, 2, crosshairverts);
graphics.Device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 0, 2, crosshairverts);
graphics.Shaders.Display2D.EndPass();
graphics.Shaders.Display2D.End();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

View file

@ -30,6 +30,8 @@ namespace CodeImp.DoomBuilder.VisualModes
{
#region ================== Constants
public const float MAXIMUM_FOG_DISTANCE = 2805f; //mxd. 255 * 11. Straight from GZDoom source.
#endregion
#region ================== Variables
@ -40,6 +42,9 @@ namespace CodeImp.DoomBuilder.VisualModes
private Dictionary<Sidedef, List<VisualGeometry>> sidedefgeometry;
private VertexBuffer geobuffer;
private bool updategeo;
//mxd. Rendering
protected float fogdistance; // Distance, at which fog color completely replaces texture color of this thing
// Original sector
private Sector sector;
@ -55,6 +60,7 @@ namespace CodeImp.DoomBuilder.VisualModes
internal List<VisualGeometry> AllGeometry { get { return allgeometry; } }
internal VertexBuffer GeometryBuffer { get { return geobuffer; } }
internal bool NeedsUpdateGeo { get { return updategeo; } set { updategeo |= value; } }
public float FogDistance { get { return fogdistance; } } //mxd
public bool IsDisposed { get { return isdisposed; } }
public Sector Sector { get { return sector; } }

View file

@ -65,6 +65,7 @@ namespace CodeImp.DoomBuilder.VisualModes
private float cameradistance;
private int cagecolor;
protected bool sizeless; //mxd. Used to render visual things with 0 width and height
protected float fogdistance; //mxd. Distance, at which fog color completely replaces texture color of this thing
// Selected?
protected bool selected;
@ -109,6 +110,7 @@ namespace CodeImp.DoomBuilder.VisualModes
internal int VertexColor { get { return vertices.Length > 0 ? vertices[0].c : 0;} }
public int CameraDistance3D { get { return cameraDistance3D; } }
public bool Sizeless { get { return sizeless; } }
public float FogDistance { get { return fogdistance; } }
public Vector3 Center {
get {
if (isGldefsLight) return position_v3 + lightOffset;
@ -119,6 +121,7 @@ namespace CodeImp.DoomBuilder.VisualModes
public float LocalCenterZ { get { return thingheight / 2f; } } //mxd
public Vector3 PositionV3 { get { return position_v3; } }
public Vector3[] BoundingBox { get { return boundingBox; } }
//mxd. light properties
public DynamicLightType LightType { get { return lightType; } }
public float LightRadius { get { return lightRadius; } }

View file

@ -635,6 +635,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// itemgridinc
//
this.itemgridinc.Image = global::CodeImp.DoomBuilder.Properties.Resources.GridIncrease;
this.itemgridinc.Name = "itemgridinc";
this.itemgridinc.Size = new System.Drawing.Size(219, 22);
this.itemgridinc.Tag = "builder_griddec";
@ -643,6 +644,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// itemgriddec
//
this.itemgriddec.Image = global::CodeImp.DoomBuilder.Properties.Resources.GridDecrease;
this.itemgriddec.Name = "itemgriddec";
this.itemgriddec.Size = new System.Drawing.Size(219, 22);
this.itemgriddec.Tag = "builder_gridinc";
@ -674,18 +676,21 @@ namespace CodeImp.DoomBuilder.Windows
//
// addToGroup
//
this.addToGroup.Image = global::CodeImp.DoomBuilder.Properties.Resources.GroupAdd;
this.addToGroup.Name = "addToGroup";
this.addToGroup.Size = new System.Drawing.Size(219, 22);
this.addToGroup.Text = "Add Selection to Group";
//
// selectGroup
//
this.selectGroup.Image = global::CodeImp.DoomBuilder.Properties.Resources.Group;
this.selectGroup.Name = "selectGroup";
this.selectGroup.Size = new System.Drawing.Size(219, 22);
this.selectGroup.Text = "Select Group";
//
// clearGroup
//
this.clearGroup.Image = global::CodeImp.DoomBuilder.Properties.Resources.GroupRemove;
this.clearGroup.Name = "clearGroup";
this.clearGroup.Size = new System.Drawing.Size(219, 22);
this.clearGroup.Text = "Clear Group";
@ -987,6 +992,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// iteminsertprefabfile
//
this.iteminsertprefabfile.Image = global::CodeImp.DoomBuilder.Properties.Resources.Prefab;
this.iteminsertprefabfile.Name = "iteminsertprefabfile";
this.iteminsertprefabfile.Size = new System.Drawing.Size(199, 22);
this.iteminsertprefabfile.Tag = "builder_insertprefabfile";
@ -995,6 +1001,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// iteminsertpreviousprefab
//
this.iteminsertpreviousprefab.Image = global::CodeImp.DoomBuilder.Properties.Resources.Prefab2;
this.iteminsertpreviousprefab.Name = "iteminsertpreviousprefab";
this.iteminsertpreviousprefab.Size = new System.Drawing.Size(199, 22);
this.iteminsertpreviousprefab.Tag = "builder_insertpreviousprefab";
@ -1036,6 +1043,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// itemreloadresources
//
this.itemreloadresources.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reload;
this.itemreloadresources.Name = "itemreloadresources";
this.itemreloadresources.Size = new System.Drawing.Size(246, 22);
this.itemreloadresources.Tag = "builder_reloadresources";
@ -1044,6 +1052,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// itemReloadModedef
//
this.itemReloadModedef.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reload;
this.itemReloadModedef.Name = "itemReloadModedef";
this.itemReloadModedef.Size = new System.Drawing.Size(246, 22);
this.itemReloadModedef.Tag = "builder_gzreloadmodeldef";
@ -1052,6 +1061,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// itemReloadGldefs
//
this.itemReloadGldefs.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reload;
this.itemReloadGldefs.Name = "itemReloadGldefs";
this.itemReloadGldefs.Size = new System.Drawing.Size(246, 22);
this.itemReloadGldefs.Tag = "builder_gzreloadgldefs";
@ -1075,6 +1085,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// configurationToolStripMenuItem
//
this.configurationToolStripMenuItem.Image = global::CodeImp.DoomBuilder.Properties.Resources.Configuration;
this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem";
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(246, 22);
this.configurationToolStripMenuItem.Tag = "builder_configuration";
@ -1083,6 +1094,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// preferencesToolStripMenuItem
//
this.preferencesToolStripMenuItem.Image = global::CodeImp.DoomBuilder.Properties.Resources.Preferences;
this.preferencesToolStripMenuItem.Name = "preferencesToolStripMenuItem";
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(246, 22);
this.preferencesToolStripMenuItem.Tag = "builder_preferences";
@ -1167,6 +1179,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// itemhelpcheckupdates
//
this.itemhelpcheckupdates.Image = global::CodeImp.DoomBuilder.Properties.Resources.Update;
this.itemhelpcheckupdates.Name = "itemhelpcheckupdates";
this.itemhelpcheckupdates.Size = new System.Drawing.Size(232, 22);
this.itemhelpcheckupdates.Text = "&Check for updates...";
@ -1180,6 +1193,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// itemhelpabout
//
this.itemhelpabout.Image = global::CodeImp.DoomBuilder.Properties.Resources.About;
this.itemhelpabout.Name = "itemhelpabout";
this.itemhelpabout.Size = new System.Drawing.Size(232, 22);
this.itemhelpabout.Text = "&About GZDoom Builder...";

View file

@ -2066,6 +2066,7 @@ namespace CodeImp.DoomBuilder.Windows
linedefcolorpresets.Visible = General.Settings.ToolbarFilter && maploaded; //mxd
separatorfilters.Visible = General.Settings.ToolbarViewModes && maploaded; //mxd
buttonfullbrightness.Visible = General.Settings.ToolbarViewModes && maploaded; //mxd
buttonfullbrightness.Checked = Renderer.FullBrightness; //mxd
buttontogglegrid.Visible = General.Settings.ToolbarViewModes && maploaded; //mxd
buttontogglegrid.Checked = General.Settings.RenderGrid; //mxd
buttontogglecomments.Visible = General.Settings.ToolbarViewModes && maploaded; //mxd
@ -2929,6 +2930,7 @@ namespace CodeImp.DoomBuilder.Windows
menuview.Visible = (General.Map != null); //mxd
// Menu items
itemfullbrightness.Checked = Renderer.FullBrightness; //mxd
itemtogglegrid.Checked = General.Settings.RenderGrid; //mxd
itemtoggleinfo.Checked = IsInfoPanelExpanded;
itemtogglecomments.Enabled = (General.Map != null && General.Map.UDMF); //mxd

View file

@ -16,6 +16,7 @@
#region ================== Namespaces
using System;
using System.Globalization;
using System.Text;
using System.IO;
@ -45,6 +46,7 @@ namespace CodeImp.DoomBuilder.ZDoom
private int errorline;
private string errordesc;
private string errorsource;
private long prevstreamposition; //mxd. Text stream position storted before poerforming ReadToken.
#endregion
@ -213,6 +215,9 @@ namespace CodeImp.DoomBuilder.ZDoom
//mxd. Return empty string when the end of the stream has been reached
if(datastream.Position == datastream.Length) return string.Empty;
//mxd. Store starting position
prevstreamposition = datastream.Position;
string token = "";
bool quotedstring = false;
@ -294,6 +299,9 @@ namespace CodeImp.DoomBuilder.ZDoom
{
// Return null when the end of the stream has been reached
if(datastream.Position == datastream.Length) return null;
//mxd. Store starting position
prevstreamposition = datastream.Position;
string token = "";
bool quotedstring = false;
@ -461,9 +469,9 @@ namespace CodeImp.DoomBuilder.ZDoom
//mxd
protected internal int GetCurrentLineNumber()
{
long position = datastream.Position;
long position = Math.Min(prevstreamposition, datastream.Position);
long readpos = 0;
int linenumber = 1;
int linenumber = 0;
// Find the line on which we found this error
datastream.Seek(0, SeekOrigin.Begin);

View file

@ -558,6 +558,21 @@
<ItemGroup>
<None Include="Resources\Show3.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Join.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Merge.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Flip.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\SelectThingsInSectors.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\PlaceThings.png" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -581,8 +581,19 @@ namespace CodeImp.DoomBuilder.BuilderModes
public override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
if(panning) return; //mxd. Skip all this jazz while panning
Update();
//mxd. Skip most of update jazz while panning
if(panning)
{
// Update labels
int index = 0;
foreach (Linedef l in unstablelines)
labels[index++].Move(l.Start.Position, l.End.Position);
}
else
{
Update();
}
}
// When a key is released
public override void OnKeyUp(KeyEventArgs e)

View file

@ -292,10 +292,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
bool absolute;
//mxd. Apply GLDEFS override?
if(General.Map.Data.GlowingFlats.ContainsKey(s.LongFloorTexture) && General.Map.Data.GlowingFlats[s.LongFloorTexture].Fullbright)
if(General.Map.Data.GlowingFlats.ContainsKey(s.LongFloorTexture)
&& (General.Map.Data.GlowingFlats[s.LongFloorTexture].Fullbright || General.Map.Data.GlowingFlats[s.LongFloorTexture].Fullblack))
{
color = -1;
light = 255;
light = (General.Map.Data.GlowingFlats[s.LongFloorTexture].Fullbright ? 255 : 0);
absolute = true;
}
else
@ -343,10 +344,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
bool absolute;
//mxd. Apply GLDEFS override?
if(General.Map.Data.GlowingFlats.ContainsKey(s.LongCeilTexture) && General.Map.Data.GlowingFlats[s.LongCeilTexture].Fullbright)
if(General.Map.Data.GlowingFlats.ContainsKey(s.LongCeilTexture)
&& (General.Map.Data.GlowingFlats[s.LongCeilTexture].Fullbright || General.Map.Data.GlowingFlats[s.LongCeilTexture].Fullblack))
{
color = -1;
light = 255;
light = (General.Map.Data.GlowingFlats[s.LongCeilTexture].Fullbright ? 255 : 0);
absolute = true;
}
else

View file

@ -36,10 +36,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.selectsinglesideditem = new System.Windows.Forms.ToolStripMenuItem();
this.selectdoublesideditem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
this.fliplinedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.flipsidedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.curvelinedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator();
this.splitlinedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.updatelightfogitem = new System.Windows.Forms.ToolStripMenuItem();
@ -49,58 +46,61 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.alignCeilingToFrontItem = new System.Windows.Forms.ToolStripMenuItem();
this.alignCeilingToBackItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarLinesItem = new System.Windows.Forms.ToolStripMenuItem();
this.sectorsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.placethingss = new System.Windows.Forms.ToolStripMenuItem();
this.selectInSectorsItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.joinsectorsitem = new System.Windows.Forms.ToolStripMenuItem();
this.mergesectorsitem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.flipsectorlinedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.makedooritem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarSectors = new System.Windows.Forms.ToolStripMenuItem();
this.thingsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.selectInSectorsItem = new System.Windows.Forms.ToolStripMenuItem();
this.filterSelectionItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.alignToWallItem = new System.Windows.Forms.ToolStripMenuItem();
this.pointAtCursorItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarThingsItem = new System.Windows.Forms.ToolStripMenuItem();
this.vertsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.placethingsv = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarVertsItem = new System.Windows.Forms.ToolStripMenuItem();
this.globalstrip = new System.Windows.Forms.ToolStrip();
this.manualstrip = new System.Windows.Forms.ToolStrip();
this.seperatorcopypaste = new System.Windows.Forms.ToolStripSeparator();
this.separatorsectors1 = new System.Windows.Forms.ToolStripSeparator();
this.separatorsectors2 = new System.Windows.Forms.ToolStripSeparator();
this.gradientModeMenu = new System.Windows.Forms.ToolStripComboBox();
this.gradientInterpolationMenu = new System.Windows.Forms.ToolStripComboBox();
this.separatorsectors3 = new System.Windows.Forms.ToolStripSeparator();
this.fileMenuStrip = new System.Windows.Forms.MenuStrip();
this.exportStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
this.buttoncopyproperties = new System.Windows.Forms.ToolStripButton();
this.buttonpasteproperties = new System.Windows.Forms.ToolStripButton();
this.buttonpastepropertiesoptions = new System.Windows.Forms.ToolStripButton();
this.seperatorcopypaste = new System.Windows.Forms.ToolStripSeparator();
this.buttonselectionnumbers = new System.Windows.Forms.ToolStripButton();
this.buttonselectioneffects = new System.Windows.Forms.ToolStripButton();
this.separatorsectors1 = new System.Windows.Forms.ToolStripSeparator();
this.buttonMakeDoor = new System.Windows.Forms.ToolStripButton();
this.separatorsectors2 = new System.Windows.Forms.ToolStripSeparator();
this.buttonbrightnessgradient = new System.Windows.Forms.ToolStripButton();
this.buttonfloorgradient = new System.Windows.Forms.ToolStripButton();
this.buttonceilinggradient = new System.Windows.Forms.ToolStripButton();
this.buttonflipselectionh = new System.Windows.Forms.ToolStripButton();
this.buttonflipselectionv = new System.Windows.Forms.ToolStripButton();
this.buttoncurvelinedefs = new System.Windows.Forms.ToolStripButton();
this.gradientModeMenu = new System.Windows.Forms.ToolStripComboBox();
this.gradientInterpolationMenu = new System.Windows.Forms.ToolStripComboBox();
this.separatorsectors3 = new System.Windows.Forms.ToolStripSeparator();
this.buttonMarqueSelectTouching = new System.Windows.Forms.ToolStripButton();
this.buttonDragThingsInSelectedSectors = new System.Windows.Forms.ToolStripButton();
this.buttonAlignThingsToWall = new System.Windows.Forms.ToolStripButton();
this.buttonTextureOffsetLock = new System.Windows.Forms.ToolStripButton();
this.fileMenuStrip = new System.Windows.Forms.MenuStrip();
this.exportStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
this.fliplinedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.flipsidedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.curvelinedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.selectSimilarLinesItem = new System.Windows.Forms.ToolStripMenuItem();
this.placethingss = new System.Windows.Forms.ToolStripMenuItem();
this.selectInSectorsItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.joinsectorsitem = new System.Windows.Forms.ToolStripMenuItem();
this.mergesectorsitem = new System.Windows.Forms.ToolStripMenuItem();
this.flipsectorlinedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.makedooritem = new System.Windows.Forms.ToolStripMenuItem();
this.selectSimilarSectors = new System.Windows.Forms.ToolStripMenuItem();
this.selectInSectorsItem = new System.Windows.Forms.ToolStripMenuItem();
this.filterSelectionItem = new System.Windows.Forms.ToolStripMenuItem();
this.alignToWallItem = new System.Windows.Forms.ToolStripMenuItem();
this.pointAtCursorItem = new System.Windows.Forms.ToolStripMenuItem();
this.selectSimilarThingsItem = new System.Windows.Forms.ToolStripMenuItem();
this.placethingsv = new System.Windows.Forms.ToolStripMenuItem();
this.selectSimilarVertsItem = new System.Windows.Forms.ToolStripMenuItem();
this.menustrip.SuspendLayout();
this.manualstrip.SuspendLayout();
this.fileMenuStrip.SuspendLayout();
@ -146,6 +146,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//
// placethingsl
//
this.placethingsl.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PlaceThings;
this.placethingsl.Name = "placethingsl";
this.placethingsl.Size = new System.Drawing.Size(245, 22);
this.placethingsl.Tag = "placethings";
@ -154,6 +155,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//
// selectInSectorsItem3
//
this.selectInSectorsItem3.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.SelectThingsInSectors;
this.selectInSectorsItem3.Name = "selectInSectorsItem3";
this.selectInSectorsItem3.Size = new System.Drawing.Size(245, 22);
this.selectInSectorsItem3.Tag = "thingsselectinsectors";
@ -185,35 +187,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(242, 6);
//
// fliplinedefsitem
//
this.fliplinedefsitem.Name = "fliplinedefsitem";
this.fliplinedefsitem.Size = new System.Drawing.Size(245, 22);
this.fliplinedefsitem.Tag = "fliplinedefs";
this.fliplinedefsitem.Text = "&Flip Linedefs";
this.fliplinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// flipsidedefsitem
//
this.flipsidedefsitem.Name = "flipsidedefsitem";
this.flipsidedefsitem.Size = new System.Drawing.Size(245, 22);
this.flipsidedefsitem.Tag = "flipsidedefs";
this.flipsidedefsitem.Text = "F&lip Sidedefs";
this.flipsidedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(242, 6);
//
// curvelinedefsitem
//
this.curvelinedefsitem.Name = "curvelinedefsitem";
this.curvelinedefsitem.Size = new System.Drawing.Size(245, 22);
this.curvelinedefsitem.Tag = "curvelinesmode";
this.curvelinedefsitem.Text = "&Curve Linedefs...";
this.curvelinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
@ -283,15 +261,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(242, 6);
//
// selectSimilarLinesItem
//
this.selectSimilarLinesItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarLinesItem.Name = "selectSimilarLinesItem";
this.selectSimilarLinesItem.Size = new System.Drawing.Size(245, 22);
this.selectSimilarLinesItem.Tag = "selectsimilar";
this.selectSimilarLinesItem.Text = "Select Similar...";
this.selectSimilarLinesItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// sectorsmenu
//
this.sectorsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -311,84 +280,27 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.sectorsmenu.Text = "&Sectors";
this.sectorsmenu.Visible = false;
//
// placethingss
//
this.placethingss.Name = "placethingss";
this.placethingss.Size = new System.Drawing.Size(245, 22);
this.placethingss.Tag = "placethings";
this.placethingss.Text = "&Place Things...";
this.placethingss.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectInSectorsItem2
//
this.selectInSectorsItem2.Name = "selectInSectorsItem2";
this.selectInSectorsItem2.Size = new System.Drawing.Size(245, 22);
this.selectInSectorsItem2.Tag = "thingsselectinsectors";
this.selectInSectorsItem2.Text = "&Select Things in Selected Sectors";
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(242, 6);
//
// joinsectorsitem
//
this.joinsectorsitem.Name = "joinsectorsitem";
this.joinsectorsitem.Size = new System.Drawing.Size(245, 22);
this.joinsectorsitem.Tag = "joinsectors";
this.joinsectorsitem.Text = "&Join Sectors";
this.joinsectorsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// mergesectorsitem
//
this.mergesectorsitem.Name = "mergesectorsitem";
this.mergesectorsitem.Size = new System.Drawing.Size(245, 22);
this.mergesectorsitem.Tag = "mergesectors";
this.mergesectorsitem.Text = "&Merge Sectors";
this.mergesectorsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(242, 6);
//
// flipsectorlinedefsitem
//
this.flipsectorlinedefsitem.Name = "flipsectorlinedefsitem";
this.flipsectorlinedefsitem.Size = new System.Drawing.Size(245, 22);
this.flipsectorlinedefsitem.Tag = "fliplinedefs";
this.flipsectorlinedefsitem.Text = "&Flip Linedefs";
this.flipsectorlinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(242, 6);
//
// makedooritem
//
this.makedooritem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Door;
this.makedooritem.Name = "makedooritem";
this.makedooritem.Size = new System.Drawing.Size(245, 22);
this.makedooritem.Tag = "makedoor";
this.makedooritem.Text = "Make &Door";
this.makedooritem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(242, 6);
this.toolStripSeparator4.Visible = false;
//
// selectSimilarSectors
//
this.selectSimilarSectors.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarSectors.Name = "selectSimilarSectors";
this.selectSimilarSectors.Size = new System.Drawing.Size(245, 22);
this.selectSimilarSectors.Tag = "selectsimilar";
this.selectSimilarSectors.Text = "Select Similar...";
this.selectSimilarSectors.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// thingsmenu
//
this.thingsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -404,60 +316,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.thingsmenu.Text = "Things";
this.thingsmenu.Visible = false;
//
// selectInSectorsItem
//
this.selectInSectorsItem.Name = "selectInSectorsItem";
this.selectInSectorsItem.Size = new System.Drawing.Size(245, 22);
this.selectInSectorsItem.Tag = "thingsselectinsectors";
this.selectInSectorsItem.Text = "&Select Things in Selected Sectors";
this.selectInSectorsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// filterSelectionItem
//
this.filterSelectionItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.FilterThings;
this.filterSelectionItem.Name = "filterSelectionItem";
this.filterSelectionItem.Size = new System.Drawing.Size(245, 22);
this.filterSelectionItem.Tag = "filterselectedthings";
this.filterSelectionItem.Text = "Filter Selection...";
this.filterSelectionItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(242, 6);
//
// alignToWallItem
//
this.alignToWallItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.AlignThings;
this.alignToWallItem.Name = "alignToWallItem";
this.alignToWallItem.Size = new System.Drawing.Size(245, 22);
this.alignToWallItem.Tag = "thingaligntowall";
this.alignToWallItem.Text = "&Align To Closest Linedef";
this.alignToWallItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// pointAtCursorItem
//
this.pointAtCursorItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ThingPointAtCursor;
this.pointAtCursorItem.Name = "pointAtCursorItem";
this.pointAtCursorItem.Size = new System.Drawing.Size(245, 22);
this.pointAtCursorItem.Tag = "thinglookatcursor";
this.pointAtCursorItem.Text = "&Point to Cursor";
this.pointAtCursorItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(242, 6);
//
// selectSimilarThingsItem
//
this.selectSimilarThingsItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarThingsItem.Name = "selectSimilarThingsItem";
this.selectSimilarThingsItem.Size = new System.Drawing.Size(245, 22);
this.selectSimilarThingsItem.Tag = "selectsimilar";
this.selectSimilarThingsItem.Text = "Select Similar...";
this.selectSimilarThingsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// vertsmenu
//
this.vertsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -469,28 +337,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.vertsmenu.Text = "Vertices";
this.vertsmenu.Visible = false;
//
// placethingsv
//
this.placethingsv.Name = "placethingsv";
this.placethingsv.Size = new System.Drawing.Size(153, 22);
this.placethingsv.Tag = "placethings";
this.placethingsv.Text = "&Place Things...";
this.placethingsv.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(150, 6);
//
// selectSimilarVertsItem
//
this.selectSimilarVertsItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarVertsItem.Name = "selectSimilarVertsItem";
this.selectSimilarVertsItem.Size = new System.Drawing.Size(153, 22);
this.selectSimilarVertsItem.Tag = "selectsimilar";
this.selectSimilarVertsItem.Text = "Select Similar...";
this.selectSimilarVertsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// globalstrip
//
this.globalstrip.Location = new System.Drawing.Point(0, 48);
@ -530,6 +381,72 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.manualstrip.TabIndex = 2;
this.manualstrip.Text = "toolStrip1";
//
// seperatorcopypaste
//
this.seperatorcopypaste.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.seperatorcopypaste.Name = "seperatorcopypaste";
this.seperatorcopypaste.Size = new System.Drawing.Size(6, 25);
//
// separatorsectors1
//
this.separatorsectors1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors1.Name = "separatorsectors1";
this.separatorsectors1.Size = new System.Drawing.Size(6, 25);
//
// separatorsectors2
//
this.separatorsectors2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors2.Name = "separatorsectors2";
this.separatorsectors2.Size = new System.Drawing.Size(6, 25);
//
// gradientModeMenu
//
this.gradientModeMenu.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.gradientModeMenu.Name = "gradientModeMenu";
this.gradientModeMenu.Size = new System.Drawing.Size(144, 25);
this.gradientModeMenu.ToolTipText = "Brightness Gradient Target";
this.gradientModeMenu.DropDownClosed += new System.EventHandler(this.gradientMode_DropDownClosed);
//
// gradientInterpolationMenu
//
this.gradientInterpolationMenu.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.gradientInterpolationMenu.Name = "gradientInterpolationMenu";
this.gradientInterpolationMenu.Size = new System.Drawing.Size(108, 25);
this.gradientInterpolationMenu.ToolTipText = "Brightness and Height Gradient Interpolation Mode";
this.gradientInterpolationMenu.DropDownClosed += new System.EventHandler(this.gradientMode_DropDownClosed);
//
// separatorsectors3
//
this.separatorsectors3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors3.Name = "separatorsectors3";
this.separatorsectors3.Size = new System.Drawing.Size(6, 25);
//
// fileMenuStrip
//
this.fileMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exportStripMenuItem});
this.fileMenuStrip.Location = new System.Drawing.Point(0, 0);
this.fileMenuStrip.Name = "fileMenuStrip";
this.fileMenuStrip.Size = new System.Drawing.Size(794, 24);
this.fileMenuStrip.TabIndex = 3;
this.fileMenuStrip.Text = "menuStrip1";
//
// exportStripMenuItem
//
this.exportStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem5});
this.exportStripMenuItem.Name = "exportStripMenuItem";
this.exportStripMenuItem.Size = new System.Drawing.Size(52, 20);
this.exportStripMenuItem.Text = "Export";
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(226, 22);
this.toolStripMenuItem5.Tag = "exporttoobj";
this.toolStripMenuItem5.Text = "Selection to Wavefront .obj...";
this.toolStripMenuItem5.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttoncopyproperties
//
this.buttoncopyproperties.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -563,12 +480,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonpastepropertiesoptions.Text = "Choose Properties to Paste";
this.buttonpastepropertiesoptions.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// seperatorcopypaste
//
this.seperatorcopypaste.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.seperatorcopypaste.Name = "seperatorcopypaste";
this.seperatorcopypaste.Size = new System.Drawing.Size(6, 25);
//
// buttonselectionnumbers
//
this.buttonselectionnumbers.CheckOnClick = true;
@ -591,12 +502,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonselectioneffects.Text = "View Tags and Effects";
this.buttonselectioneffects.Click += new System.EventHandler(this.buttonselectioneffects_Click);
//
// separatorsectors1
//
this.separatorsectors1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors1.Name = "separatorsectors1";
this.separatorsectors1.Size = new System.Drawing.Size(6, 25);
//
// buttonMakeDoor
//
this.buttonMakeDoor.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -608,12 +513,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonMakeDoor.Text = "Make Door From Selection";
this.buttonMakeDoor.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// separatorsectors2
//
this.separatorsectors2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors2.Name = "separatorsectors2";
this.separatorsectors2.Size = new System.Drawing.Size(6, 25);
//
// buttonbrightnessgradient
//
this.buttonbrightnessgradient.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -681,28 +580,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttoncurvelinedefs.Text = "Curve Linedefs";
this.buttoncurvelinedefs.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// gradientModeMenu
//
this.gradientModeMenu.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.gradientModeMenu.Name = "gradientModeMenu";
this.gradientModeMenu.Size = new System.Drawing.Size(144, 25);
this.gradientModeMenu.ToolTipText = "Brightness Gradient Target";
this.gradientModeMenu.DropDownClosed += new System.EventHandler(this.gradientMode_DropDownClosed);
//
// gradientInterpolationMenu
//
this.gradientInterpolationMenu.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.gradientInterpolationMenu.Name = "gradientInterpolationMenu";
this.gradientInterpolationMenu.Size = new System.Drawing.Size(108, 25);
this.gradientInterpolationMenu.ToolTipText = "Brightness and Height Gradient Interpolation Mode";
this.gradientInterpolationMenu.DropDownClosed += new System.EventHandler(this.gradientMode_DropDownClosed);
//
// separatorsectors3
//
this.separatorsectors3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors3.Name = "separatorsectors3";
this.separatorsectors3.Size = new System.Drawing.Size(6, 25);
//
// buttonMarqueSelectTouching
//
this.buttonMarqueSelectTouching.CheckOnClick = true;
@ -752,31 +629,166 @@ namespace CodeImp.DoomBuilder.BuilderModes
"tant while sector is dragged";
this.buttonTextureOffsetLock.Click += new System.EventHandler(this.buttonTextureOffsetLock_Click);
//
// fileMenuStrip
// fliplinedefsitem
//
this.fileMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exportStripMenuItem});
this.fileMenuStrip.Location = new System.Drawing.Point(0, 0);
this.fileMenuStrip.Name = "fileMenuStrip";
this.fileMenuStrip.Size = new System.Drawing.Size(794, 24);
this.fileMenuStrip.TabIndex = 3;
this.fileMenuStrip.Text = "menuStrip1";
this.fliplinedefsitem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Flip;
this.fliplinedefsitem.Name = "fliplinedefsitem";
this.fliplinedefsitem.Size = new System.Drawing.Size(245, 22);
this.fliplinedefsitem.Tag = "fliplinedefs";
this.fliplinedefsitem.Text = "&Flip Linedefs";
this.fliplinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// exportStripMenuItem
// flipsidedefsitem
//
this.exportStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem5});
this.exportStripMenuItem.Name = "exportStripMenuItem";
this.exportStripMenuItem.Size = new System.Drawing.Size(52, 20);
this.exportStripMenuItem.Text = "Export";
this.flipsidedefsitem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Flip;
this.flipsidedefsitem.Name = "flipsidedefsitem";
this.flipsidedefsitem.Size = new System.Drawing.Size(245, 22);
this.flipsidedefsitem.Tag = "flipsidedefs";
this.flipsidedefsitem.Text = "F&lip Sidedefs";
this.flipsidedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripMenuItem5
// curvelinedefsitem
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(226, 22);
this.toolStripMenuItem5.Tag = "exporttoobj";
this.toolStripMenuItem5.Text = "Selection to Wavefront .obj...";
this.toolStripMenuItem5.Click += new System.EventHandler(this.InvokeTaggedAction);
this.curvelinedefsitem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.CurveLines;
this.curvelinedefsitem.Name = "curvelinedefsitem";
this.curvelinedefsitem.Size = new System.Drawing.Size(245, 22);
this.curvelinedefsitem.Tag = "curvelinesmode";
this.curvelinedefsitem.Text = "&Curve Linedefs...";
this.curvelinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectSimilarLinesItem
//
this.selectSimilarLinesItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarLinesItem.Name = "selectSimilarLinesItem";
this.selectSimilarLinesItem.Size = new System.Drawing.Size(245, 22);
this.selectSimilarLinesItem.Tag = "selectsimilar";
this.selectSimilarLinesItem.Text = "Select Similar...";
this.selectSimilarLinesItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// placethingss
//
this.placethingss.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PlaceThings;
this.placethingss.Name = "placethingss";
this.placethingss.Size = new System.Drawing.Size(245, 22);
this.placethingss.Tag = "placethings";
this.placethingss.Text = "&Place Things...";
this.placethingss.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectInSectorsItem2
//
this.selectInSectorsItem2.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.SelectThingsInSectors;
this.selectInSectorsItem2.Name = "selectInSectorsItem2";
this.selectInSectorsItem2.Size = new System.Drawing.Size(245, 22);
this.selectInSectorsItem2.Tag = "thingsselectinsectors";
this.selectInSectorsItem2.Text = "&Select Things in Selected Sectors";
//
// joinsectorsitem
//
this.joinsectorsitem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Join;
this.joinsectorsitem.Name = "joinsectorsitem";
this.joinsectorsitem.Size = new System.Drawing.Size(245, 22);
this.joinsectorsitem.Tag = "joinsectors";
this.joinsectorsitem.Text = "&Join Sectors";
this.joinsectorsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// mergesectorsitem
//
this.mergesectorsitem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Merge;
this.mergesectorsitem.Name = "mergesectorsitem";
this.mergesectorsitem.Size = new System.Drawing.Size(245, 22);
this.mergesectorsitem.Tag = "mergesectors";
this.mergesectorsitem.Text = "&Merge Sectors";
this.mergesectorsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// flipsectorlinedefsitem
//
this.flipsectorlinedefsitem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Flip;
this.flipsectorlinedefsitem.Name = "flipsectorlinedefsitem";
this.flipsectorlinedefsitem.Size = new System.Drawing.Size(245, 22);
this.flipsectorlinedefsitem.Tag = "fliplinedefs";
this.flipsectorlinedefsitem.Text = "&Flip Linedefs";
this.flipsectorlinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// makedooritem
//
this.makedooritem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Door;
this.makedooritem.Name = "makedooritem";
this.makedooritem.Size = new System.Drawing.Size(245, 22);
this.makedooritem.Tag = "makedoor";
this.makedooritem.Text = "Make &Door";
this.makedooritem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectSimilarSectors
//
this.selectSimilarSectors.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarSectors.Name = "selectSimilarSectors";
this.selectSimilarSectors.Size = new System.Drawing.Size(245, 22);
this.selectSimilarSectors.Tag = "selectsimilar";
this.selectSimilarSectors.Text = "Select Similar...";
this.selectSimilarSectors.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectInSectorsItem
//
this.selectInSectorsItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.SelectThingsInSectors;
this.selectInSectorsItem.Name = "selectInSectorsItem";
this.selectInSectorsItem.Size = new System.Drawing.Size(245, 22);
this.selectInSectorsItem.Tag = "thingsselectinsectors";
this.selectInSectorsItem.Text = "&Select Things in Selected Sectors";
this.selectInSectorsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// filterSelectionItem
//
this.filterSelectionItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.FilterThings;
this.filterSelectionItem.Name = "filterSelectionItem";
this.filterSelectionItem.Size = new System.Drawing.Size(245, 22);
this.filterSelectionItem.Tag = "filterselectedthings";
this.filterSelectionItem.Text = "Filter Selection...";
this.filterSelectionItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// alignToWallItem
//
this.alignToWallItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.AlignThings;
this.alignToWallItem.Name = "alignToWallItem";
this.alignToWallItem.Size = new System.Drawing.Size(245, 22);
this.alignToWallItem.Tag = "thingaligntowall";
this.alignToWallItem.Text = "&Align To Closest Linedef";
this.alignToWallItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// pointAtCursorItem
//
this.pointAtCursorItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ThingPointAtCursor;
this.pointAtCursorItem.Name = "pointAtCursorItem";
this.pointAtCursorItem.Size = new System.Drawing.Size(245, 22);
this.pointAtCursorItem.Tag = "thinglookatcursor";
this.pointAtCursorItem.Text = "&Point to Cursor";
this.pointAtCursorItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectSimilarThingsItem
//
this.selectSimilarThingsItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarThingsItem.Name = "selectSimilarThingsItem";
this.selectSimilarThingsItem.Size = new System.Drawing.Size(245, 22);
this.selectSimilarThingsItem.Tag = "selectsimilar";
this.selectSimilarThingsItem.Text = "Select Similar...";
this.selectSimilarThingsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// placethingsv
//
this.placethingsv.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PlaceThings;
this.placethingsv.Name = "placethingsv";
this.placethingsv.Size = new System.Drawing.Size(153, 22);
this.placethingsv.Tag = "placethings";
this.placethingsv.Text = "&Place Things...";
this.placethingsv.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectSimilarVertsItem
//
this.selectSimilarVertsItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarVertsItem.Name = "selectSimilarVertsItem";
this.selectSimilarVertsItem.Size = new System.Drawing.Size(153, 22);
this.selectSimilarVertsItem.Tag = "selectsimilar";
this.selectSimilarVertsItem.Text = "Select Similar...";
this.selectSimilarVertsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// MenusForm
//

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.5420
// Runtime Version:2.0.50727.5485
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -172,6 +172,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
}
internal static System.Drawing.Bitmap Flip {
get {
object obj = ResourceManager.GetObject("Flip", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap FlipSelectionH {
get {
object obj = ResourceManager.GetObject("FlipSelectionH", resourceCulture);
@ -228,6 +235,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
}
internal static System.Drawing.Bitmap Join {
get {
object obj = ResourceManager.GetObject("Join", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap List {
get {
object obj = ResourceManager.GetObject("List", resourceCulture);
@ -242,6 +256,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
}
internal static System.Drawing.Bitmap Merge {
get {
object obj = ResourceManager.GetObject("Merge", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap MoveThingsInSectors {
get {
object obj = ResourceManager.GetObject("MoveThingsInSectors", resourceCulture);
@ -263,6 +284,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
}
internal static System.Drawing.Bitmap PlaceThings {
get {
object obj = ResourceManager.GetObject("PlaceThings", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Reset {
get {
object obj = ResourceManager.GetObject("Reset", resourceCulture);
@ -277,6 +305,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
}
internal static System.Drawing.Bitmap SelectThingsInSectors {
get {
object obj = ResourceManager.GetObject("SelectThingsInSectors", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap SelectTouching {
get {
object obj = ResourceManager.GetObject("SelectTouching", resourceCulture);

View file

@ -118,6 +118,9 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Join" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Join.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FloorAlign" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FloorAlign.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -145,6 +148,9 @@
<data name="PasteProperties" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PasteProperties.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="List" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\List.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawGridMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawGridMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -172,8 +178,8 @@
<data name="Save" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Save.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="List" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\List.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="SelectThingsInSectors" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SelectThingsInSectors.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CeilsGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CeilsGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -187,9 +193,15 @@
<data name="MoveThingsInSectors" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MoveThingsInSectors.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Merge" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Merge.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ThingPointAtCursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ThingPointAtCursor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PlaceThings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PlaceThings.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Text" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Text.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -223,6 +235,9 @@
<data name="ColorPick" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ColorPick.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Flip" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Flip.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FlipSelectionH" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FlipSelectionH.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

View file

@ -701,12 +701,29 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
mode.CreateUndo("Paste sector properties");
mode.SetActionResult("Pasted sector properties.");
//mxd. Glow effect may require SectorData update
bool oldfloortextureglows = (SectorProperties.CopySettings.FloorTexture && General.Map.Data.GlowingFlats.ContainsKey(level.sector.LongFloorTexture));
bool oldceiltextureglows = (SectorProperties.CopySettings.CeilingTexture && General.Map.Data.GlowingFlats.ContainsKey(level.sector.LongCeilTexture));
BuilderPlug.Me.CopiedSectorProps.Apply(level.sector);
//mxd. Glow effect may require SectorData update
if(oldfloortextureglows || oldceiltextureglows
|| (SectorProperties.CopySettings.FloorTexture && General.Map.Data.GlowingFlats.ContainsKey(level.sector.LongFloorTexture))
|| (SectorProperties.CopySettings.CeilingTexture && General.Map.Data.GlowingFlats.ContainsKey(level.sector.LongCeilTexture)))
{
mode.RebuildElementData();
SectorData sd = mode.GetSectorData(level.sector);
sd.UpdateForced();
}
if(mode.VisualSectorExists(level.sector))
{
BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
vs.UpdateSectorGeometry(true);
}
mode.ShowTargetInfo();
}
}

View file

@ -19,15 +19,16 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.GZBuilder.Data;
using CodeImp.DoomBuilder.GZBuilder.Tools;
using CodeImp.DoomBuilder.IO;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.VisualModes;
using System.Globalization;
#endregion
@ -257,7 +258,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(sd.CeilingGlow != null || sd.FloorGlow != null)
{
for(int i = 0; i < verts.Count; i++)
{
if(verts[i].c == PixelColor.INT_WHITE) continue; // Fullbright verts are not affected by glows.
verts[i] = InterpolateVertexColor(verts[i], sd);
}
}
return verts;
@ -276,9 +280,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
float cz = data.Ceiling.plane.GetZ(v.x, v.y);
float delta = ((v.z - cgz) / (cz - cgz)) * 0.9f;
PixelColor vc = PixelColor.FromInt(v.c);
v.c = InterpolationTools.InterpolateColor(PixelColor.Add(vc, data.CeilingGlow.Color), vc, delta);
v.c = InterpolationTools.InterpolateColor(GetGlowColor(data.CeilingGlow, vc), vc, delta);
}
}
@ -292,14 +295,20 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
float fz = data.Floor.plane.GetZ(v.x, v.y);
float delta = ((v.z - fz) / (fgz - fz)) * 0.9f;
PixelColor vc = PixelColor.FromInt(v.c);
v.c = InterpolationTools.InterpolateColor(vc, PixelColor.Add(vc, data.FloorGlow.Color), delta);
v.c = InterpolationTools.InterpolateColor(vc, GetGlowColor(data.FloorGlow, vc), delta);
}
}
return v;
}
//mxd
private static PixelColor GetGlowColor(GlowingFlatData data, PixelColor vertexcolor)
{
if(data.Subtractive) return PixelColor.Subtract(vertexcolor, data.Color);
return PixelColor.Add(vertexcolor, data.Color);
}
// This splits a polygon with a plane and returns the other part as a new polygon
// The polygon is expected to be convex and clockwise

View file

@ -865,7 +865,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
sd.AddEffectThingVertexSlope(slopeceilingthings, false);
}
}
else if(General.Map.Data.GlowingFlats.ContainsKey(s.LongFloorTexture) || General.Map.Data.GlowingFlats.ContainsKey(s.LongCeilTexture))
if(General.Map.Data.GlowingFlats.ContainsKey(s.LongFloorTexture) || General.Map.Data.GlowingFlats.ContainsKey(s.LongCeilTexture))
{
SectorData sd = GetSectorData(s);
sd.AddEffectGlowingFlat(s);

View file

@ -213,6 +213,22 @@ namespace CodeImp.DoomBuilder.BuilderModes
ceiling = ceiling ?? new VisualCeiling(mode, this);
if(ceiling.Setup(data.Ceiling, null))
base.AddGeometry(ceiling);
//mxd. Calculate fogdistance
float brightness = Math.Max(30, Sector.Brightness);
if(Sector.HasFogColor)
{
if(Sector.UsesOutsideFog && General.Map.Data.MapInfo.OutsideFogDensity > 0)
fogdistance = General.Map.Data.MapInfo.OutsideFogDensity;
else if(!Sector.UsesOutsideFog && General.Map.Data.MapInfo.FogDensity > 0)
fogdistance = General.Map.Data.MapInfo.FogDensity;
else
fogdistance = brightness * 11.0f;
}
else
{
fogdistance = MAXIMUM_FOG_DISTANCE;
}
// Create 3D floors
for(int i = 0; i < data.ExtraFloors.Count; i++)

View file

@ -99,6 +99,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public bool Setup()
{
int sectorcolor = new PixelColor(255, 255, 255, 255).ToInt();
fogdistance = VisualSector.MAXIMUM_FOG_DISTANCE; //mxd
//mxd. Check thing size
float thingradius = Thing.Size; // Thing.Size has ThingRadius arg override applied
@ -127,14 +128,40 @@ namespace CodeImp.DoomBuilder.BuilderModes
SectorData sd = mode.GetSectorData(Thing.Sector);
floor = sd.Floor.plane; //mxd
ceiling = sd.Ceiling.plane; //mxd
SectorLevel level = sd.GetLevelAboveOrAt(new Vector3D(Thing.Position.x, Thing.Position.y, Thing.Position.z + sd.Floor.plane.GetZ(Thing.Position))); //mxd. Let's use point on floor plane instead of Thing.Sector.FloorHeight;
if(nointeraction && level == null && sd.LightLevels.Count > 0) level = sd.LightLevels[sd.LightLevels.Count - 1]; //mxd. Use the light level of the highest surface when a thing is above highest sector level.
SectorLevel level = sd.GetLevelAboveOrAt(new Vector3D(Thing.Position.x, Thing.Position.y, Thing.Position.z + sd.Floor.plane.GetZ(Thing.Position)));
//mxd. Let's use point on floor plane instead of Thing.Sector.FloorHeight;
if(nointeraction && level == null && sd.LightLevels.Count > 0) level = sd.LightLevels[sd.LightLevels.Count - 1];
//mxd. Use the light level of the highest surface when a thing is above highest sector level.
if(level != null)
{
// Use sector brightness for color shading
PixelColor areabrightness = PixelColor.FromInt(mode.CalculateBrightness(level.brightnessbelow));
PixelColor areacolor = PixelColor.Modulate(level.colorbelow, areabrightness);
sectorcolor = areacolor.WithAlpha(255).ToInt();
//mxd. Calculate fogdistance
int brightness = Math.Max((byte)30, areabrightness.r); // R, G and B of areabrightness are the same
if(Thing.Sector.HasFogColor)
{
if(Thing.Sector.UsesOutsideFog && General.Map.Data.MapInfo.OutsideFogDensity > 0)
fogdistance = General.Map.Data.MapInfo.OutsideFogDensity;
else if(!Thing.Sector.UsesOutsideFog && General.Map.Data.MapInfo.FogDensity > 0)
fogdistance = General.Map.Data.MapInfo.FogDensity;
else
fogdistance = brightness * 11.0f;
}
// Thing is affected by floor glow
else if(level.affectedbyglow)
{
fogdistance = (float)Math.Pow(2.0f, brightness / 9.0f);
}
// Thing is not affected by floor glow
else
{
fogdistance = (float)Math.Pow(2.0f, brightness / 9.0f) * 2.0f;
}
}
}

View file

@ -1,5 +1,6 @@
#region === Copyright (c) 2010 Pascal van der Heiden ===
using System;
using System.Collections.Generic;
using CodeImp.DoomBuilder.GZBuilder.Data;
using CodeImp.DoomBuilder.Geometry;
@ -362,24 +363,34 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(l.brightnessbelow == -1) l.brightnessbelow = pl.brightnessbelow;
}
//mxd. Apply glow effects?
if(CeilingGlow != null && CeilingGlow.Fullbright)
//mxd. Apply ceiling glow effect?
if(CeilingGlow != null)
{
ceiling.color = -1;
if(CeilingGlow.Fullbright) ceiling.color = PixelColor.INT_WHITE;
else if(CeilingGlow.Fullblack) ceiling.color = PixelColor.INT_BLACK;
}
//mxd. Apply floor glow effect?
if(FloorGlow != null)
{
if(FloorGlow.Fullbright) floor.color = -1;
floor.brightnessbelow = ((FloorGlow.Fullbright ? 255 : (FloorGlow.Color.r + FloorGlow.Color.g + FloorGlow.Color.b) / 3) + sector.Brightness) / 2;
// Update floor color
if(FloorGlow.Fullbright) floor.color = PixelColor.INT_WHITE;
else if(FloorGlow.Fullblack) floor.color = PixelColor.INT_BLACK;
// Update brightness
floor.brightnessbelow = (FloorGlow.Fullbright ? 255 : Math.Max(128, floor.brightnessbelow));
if(floor.colorbelow.ToInt() == 0)
{
byte bb = (byte)floor.brightnessbelow;
floor.colorbelow = PixelColor.Add(floor.colorbelow, new PixelColor(255, bb, bb, bb));
floor.colorbelow = new PixelColor(255, bb, bb, bb);
}
}
//mxd
floor.affectedbyglow = (FloorGlow != null);
ceiling.affectedbyglow = (CeilingGlow != null);
floorchanged = false;
ceilingchanged = false;
updated = true;

View file

@ -35,6 +35,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public PixelColor colorbelow;
public bool disablelighting; //mxd
public bool restrictlighting; //mxd
public bool affectedbyglow; //mxd
// Constructor
public SectorLevel(Sector s, SectorLevelType type)

View file

@ -262,8 +262,25 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
mode.CreateUndo("Paste ceiling '" + BuilderPlug.Me.CopiedFlat + "'");
mode.SetActionResult("Pasted flat '" + BuilderPlug.Me.CopiedFlat + "' on ceiling.");
//mxd. Glow effect may require SectorData and geometry update
bool prevtextureglows = General.Map.Data.GlowingFlats.ContainsKey(Sector.Sector.LongCeilTexture);
SetTexture(BuilderPlug.Me.CopiedFlat);
//mxd. Glow effect may require SectorData and geometry update
if(prevtextureglows && !General.Map.Data.GlowingFlats.ContainsKey(Sector.Sector.LongCeilTexture))
{
SectorData sd = mode.GetSectorData(level.sector);
sd.UpdateForced();
if(mode.VisualSectorExists(level.sector))
{
BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
vs.UpdateSectorGeometry(false);
}
}
//mxd. 3D floors may need updating...
OnTextureChanged();
}

View file

@ -264,8 +264,25 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
mode.CreateUndo("Paste floor '" + BuilderPlug.Me.CopiedFlat + "'");
mode.SetActionResult("Pasted flat '" + BuilderPlug.Me.CopiedFlat + "' on floor.");
//mxd. Glow effect may require SectorData and geometry update
bool prevtextureglows = General.Map.Data.GlowingFlats.ContainsKey(Sector.Sector.LongFloorTexture);
SetTexture(BuilderPlug.Me.CopiedFlat);
//mxd. Glow effect may require SectorData and geometry update
if(prevtextureglows && !General.Map.Data.GlowingFlats.ContainsKey(Sector.Sector.LongFloorTexture))
{
SectorData sd = mode.GetSectorData(level.sector);
sd.UpdateForced();
if(mode.VisualSectorExists(level.sector))
{
BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
vs.UpdateSectorGeometry(false);
}
}
//mxd. 3D floors may need updating...
OnTextureChanged();
}