Added capability for rendering the NiGHTS path

This commit is contained in:
MascaraSnake 2016-01-12 00:26:00 +01:00
parent 70beb450d2
commit 4611851122
36 changed files with 294 additions and 96 deletions

View file

@ -819,6 +819,7 @@ autoclearsidetextures = true;
storeselectededittab = true;
rendercomments = true;
rendergrid = true;
rendernightspath = true;
defaultceilheight = 128;
defaultfloorheight = 0;
defaultbrightness = 255;

View file

@ -703,6 +703,7 @@
<ItemGroup>
<None Include="Resources\ZBLogo.bmp" />
<None Include="Resources\ZBLogo.png" />
<None Include="Resources\axis1.png" />
<Content Include="ZB.ico" />
<None Include="Resources\zonebuilder.png" />
<None Include="Resources\ZoneBuilder.bmp" />

View file

@ -119,6 +119,7 @@ namespace CodeImp.DoomBuilder.Config
private bool checkforupdates;
private bool rendercomments;
private bool rendergrid;
private bool rendernightspath;
private bool dynamicgridsize;
private int ignoredremoterevision;
@ -211,7 +212,8 @@ namespace CodeImp.DoomBuilder.Config
internal bool CheckForUpdates { get { return checkforupdates; } set { checkforupdates = value; } } //mxd
public bool RenderComments { get { return rendercomments; } internal set { rendercomments = value; } } //mxd
public bool RenderGrid { get { return rendergrid; } internal set { rendergrid = value; } } //mxd
public bool DynamicGridSize { get { return dynamicgridsize; } internal set { dynamicgridsize = value; } } //mxd
public bool RenderNiGHTSPath { get { return rendernightspath; } internal set { rendernightspath = value; } }
public bool DynamicGridSize { get { return dynamicgridsize; } internal set { dynamicgridsize = value; } } //mxd
internal int IgnoredRemoteRevision { get { return ignoredremoterevision; } set { ignoredremoterevision = value; } } //mxd
//mxd. Left here for compatibility reasons...
@ -326,7 +328,8 @@ namespace CodeImp.DoomBuilder.Config
checkforupdates = cfg.ReadSetting("checkforupdates", false); //mxd
rendercomments = cfg.ReadSetting("rendercomments", true); //mxd
rendergrid = cfg.ReadSetting("rendergrid", true); //mxd
dynamicgridsize = cfg.ReadSetting("dynamicgridsize", true); //mxd
rendernightspath = cfg.ReadSetting("rendernightspath", true);
dynamicgridsize = cfg.ReadSetting("dynamicgridsize", true); //mxd
ignoredremoterevision = cfg.ReadSetting("ignoredremoterevision", 0); //mxd
//mxd. Sector defaults
@ -425,7 +428,8 @@ namespace CodeImp.DoomBuilder.Config
cfg.WriteSetting("checkforupdates", checkforupdates); //mxd
cfg.WriteSetting("rendercomments", rendercomments); //mxd
cfg.WriteSetting("rendergrid", rendergrid); //mxd
cfg.WriteSetting("dynamicgridsize", dynamicgridsize); //mxd
cfg.WriteSetting("rendernightspath", rendernightspath); //mxd
cfg.WriteSetting("dynamicgridsize", dynamicgridsize); //mxd
cfg.WriteSetting("ignoredremoterevision", ignoredremoterevision); //mxd
//mxd. Sector defaults

View file

@ -109,6 +109,9 @@ namespace CodeImp.DoomBuilder.IO
public override int Custom3DFloorType { get { return 160; } }
public override int ColormapType { get { return -1; } }
public override int FlatAlignmentType { get { return -1; } }
public override int AxisType { get { return -1; } }
public override int AxisTransferLineType { get { return -1; } }
#endregion

View file

@ -109,6 +109,8 @@ namespace CodeImp.DoomBuilder.IO
public override int Custom3DFloorType { get { return 160; } }
public override int ColormapType { get { return -1; } }
public override int FlatAlignmentType { get { return -1; } }
public override int AxisType { get { return -1; } }
public override int AxisTransferLineType { get { return -1; } }
#endregion

View file

@ -79,5 +79,7 @@ namespace CodeImp.DoomBuilder.IO
int Custom3DFloorType { get; }
int ColormapType { get; }
int FlatAlignmentType { get; }
int AxisType { get; }
int AxisTransferLineType { get; }
}
}

View file

@ -100,6 +100,9 @@ namespace CodeImp.DoomBuilder.IO
public abstract int Custom3DFloorType { get; }
public abstract int ColormapType { get; }
public abstract int FlatAlignmentType { get; }
public abstract int AxisType { get; }
public abstract int AxisTransferLineType { get; }
#endregion

View file

@ -157,6 +157,8 @@ namespace CodeImp.DoomBuilder.IO
public override int MinThingHeight { get { return 0; } }
public override int ColormapType { get { return 606; } }
public override int FlatAlignmentType { get { return 7; } }
public override int AxisType { get { return 1700; } }
public override int AxisTransferLineType { get { return 1702; } }
#endregion
#region ================== Reading

View file

@ -159,6 +159,8 @@ namespace CodeImp.DoomBuilder.IO
public override int Custom3DFloorType { get { return 160; } }
public override int ColormapType { get { return -1; } }
public override int FlatAlignmentType { get { return -1; } }
public override int AxisType { get { return -1; } }
public override int AxisTransferLineType { get { return -1; } }
#endregion

View file

@ -392,7 +392,22 @@ namespace CodeImp.DoomBuilder.Map
if(selecteditem.List != null) selecteditem.List.Remove(selecteditem);
selecteditem = null;
}
public int GetFlagsValue()
{
int flags = 0;
foreach (KeyValuePair<string, bool> f in Flags)
{
int fnum;
if (f.Value && int.TryParse(f.Key, out fnum)) flags |= fnum;
}
//SRB2 stores Z position in upper 12 bits of flags. Add Z position to flags.
if (General.Map.SRB2) flags |= (UInt16)Position.z << 4;
return flags;
}
#endregion
#region ================== Changes

View file

@ -110,6 +110,16 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap axis1 {
get {
object obj = ResourceManager.GetObject("axis1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>

View file

@ -550,4 +550,7 @@
<data name="ZBLogo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ZBLogo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="axis1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\axis1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -68,7 +68,8 @@ namespace CodeImp.DoomBuilder.Rendering
void PlotVerticesSet(ICollection<Vertex> vertices);
void RenderThing(Thing t, PixelColor c, float alpha);
void RenderThingSet(ICollection<Thing> things, float alpha);
void RenderRectangle(RectangleF rect, float bordersize, PixelColor c, bool transformrect);
void RenderNiGHTSPath();
void RenderRectangle(RectangleF rect, float bordersize, PixelColor c, bool transformrect);
void RenderRectangleFilled(RectangleF rect, PixelColor c, bool transformrect);
void RenderRectangleFilled(RectangleF rect, PixelColor c, bool transformrect, ImageData texture);
void RenderLine(Vector2D start, Vector2D end, float thickness, PixelColor c, bool transformcoords);

View file

@ -58,13 +58,16 @@ namespace CodeImp.DoomBuilder.Rendering
private const int FONT_HEIGHT = 0;
internal const int NUM_VIEW_MODES = 4;
#endregion
#region ================== Variables
private const int CIRCLE_PRECISION = 360;
// Rendertargets
private Texture backtex;
#endregion
#region ================== Variables
// Rendertargets
private Texture backtex;
private Texture plottertex;
private Texture thingstex;
private Texture overlaytex;
@ -1428,8 +1431,49 @@ namespace CodeImp.DoomBuilder.Rendering
public void RenderThingSet(ICollection<Thing> things, float alpha)
{
RenderThingsBatch(things, alpha, false, new PixelColor());
}
}
public void RenderNiGHTSPath()
{
if (!General.Settings.RenderNiGHTSPath) return;
ICollection<Thing> things = General.Map.Map.Things;
List<Thing> axes = new List<Thing>();
List<Thing> axistransferlines = new List<Thing>();
foreach (Thing t in things)
{
if (t.Type % 4096 == General.Map.FormatInterface.AxisType) axes.Add(t);
if (t.Type % 4096 == General.Map.FormatInterface.AxisTransferLineType) axistransferlines.Add(t);
}
axistransferlines.Sort((x, y) => x.GetFlagsValue().CompareTo(y.GetFlagsValue()));
//Render axis transfer lines.
int i = 0;
int size = axistransferlines.Count;
while (i < size - 1)
{
int iNext = i;
while (iNext < size - 1 && axistransferlines[++iNext].GetFlagsValue() <= axistransferlines[i].GetFlagsValue()) ;
if (iNext < size && axistransferlines[iNext].GetFlagsValue() == axistransferlines[i].GetFlagsValue() + 1)
{
RenderLine((Vector2D)axistransferlines[i].Position, (Vector2D)axistransferlines[iNext].Position, 1f, General.Colors.Highlight, true);
/* Start looking for partners for the one beyond iNext. */
i = iNext + 1;
}
else
{
/* No partner, so start looking for partners for iNext. */
i = iNext;
}
}
//Render axes.
foreach (Thing axis in axes)
{
RenderCircle((Vector2D)axis.Position, (float)(axis.AngleDoom & 0x3FFF), 1f, General.Colors.Highlight, true);
}
}
#endregion
#region ================== Surface
@ -1835,63 +1879,108 @@ namespace CodeImp.DoomBuilder.Rendering
// This renders a line with given color
public void RenderLine(Vector2D start, Vector2D end, float thickness, PixelColor c, bool transformcoords)
{
FlatVertex[] verts = new FlatVertex[4];
// Calculate positions
if(transformcoords)
{
start = start.GetTransformed(translatex, translatey, scale, -scale);
end = end.GetTransformed(translatex, translatey, scale, -scale);
}
// Calculate offsets
Vector2D delta = end - start;
Vector2D dn = delta.GetNormal() * thickness;
// Make vertices
verts[0].x = start.x - dn.x + dn.y;
verts[0].y = start.y - dn.y - dn.x;
verts[0].z = 0.0f;
verts[0].c = c.ToInt();
verts[1].x = start.x - dn.x - dn.y;
verts[1].y = start.y - dn.y + dn.x;
verts[1].z = 0.0f;
verts[1].c = c.ToInt();
verts[2].x = end.x + dn.x + dn.y;
verts[2].y = end.y + dn.y - dn.x;
verts[2].z = 0.0f;
verts[2].c = c.ToInt();
verts[3].x = end.x + dn.x - dn.y;
verts[3].y = end.y + dn.y + dn.x;
verts[3].z = 0.0f;
verts[3].c = c.ToInt();
// Set renderstates for rendering
graphics.Device.SetRenderState(RenderState.CullMode, Cull.None);
graphics.Device.SetRenderState(RenderState.ZEnable, false);
graphics.Device.SetRenderState(RenderState.AlphaBlendEnable, false);
graphics.Device.SetRenderState(RenderState.AlphaTestEnable, false);
graphics.Device.SetRenderState(RenderState.TextureFactor, -1);
graphics.Device.SetRenderState(RenderState.FogEnable, false);
SetWorldTransformation(false);
graphics.Device.SetTexture(0, General.Map.Data.WhiteTexture.Texture);
graphics.Shaders.Display2D.Texture1 = General.Map.Data.WhiteTexture.Texture;
graphics.Shaders.Display2D.SetSettings(1f, 1f, 0f, 1f, General.Settings.ClassicBilinear);
// Draw
graphics.Shaders.Display2D.Begin();
graphics.Shaders.Display2D.BeginPass(0);
graphics.Device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 0, 2, verts);
graphics.Shaders.Display2D.EndPass();
graphics.Shaders.Display2D.End();
RenderLineVerts(new FlatVertex[][] { CreateLineVerts(start, end, thickness, c, transformcoords) });
}
#endregion
public void RenderLines(Vector2D[] starts, Vector2D[] ends, float thickness, PixelColor c, bool transformcoords)
{
if (starts.Length != ends.Length) return;
FlatVertex[][] verts = new FlatVertex[starts.Length][];
for (int i = 0; i < starts.Length; i++)
{
verts[i] = CreateLineVerts(starts[i], ends[i], thickness, c, transformcoords);
}
#region ================== Geometry
RenderLineVerts(verts);
}
// This renders the linedefs of a sector with special color
public void PlotSector(Sector s, PixelColor c)
private FlatVertex[] CreateLineVerts(Vector2D start, Vector2D end, float thickness, PixelColor c, bool transformcoords)
{
FlatVertex[] verts = new FlatVertex[4];
// Calculate positions
if (transformcoords)
{
start = start.GetTransformed(translatex, translatey, scale, -scale);
end = end.GetTransformed(translatex, translatey, scale, -scale);
}
// Calculate offsets
Vector2D delta = end - start;
Vector2D dn = delta.GetNormal() * thickness;
// Make vertices
verts[0].x = start.x - dn.x + dn.y;
verts[0].y = start.y - dn.y - dn.x;
verts[0].z = 0.0f;
verts[0].c = c.ToInt();
verts[1].x = start.x - dn.x - dn.y;
verts[1].y = start.y - dn.y + dn.x;
verts[1].z = 0.0f;
verts[1].c = c.ToInt();
verts[2].x = end.x + dn.x + dn.y;
verts[2].y = end.y + dn.y - dn.x;
verts[2].z = 0.0f;
verts[2].c = c.ToInt();
verts[3].x = end.x + dn.x - dn.y;
verts[3].y = end.y + dn.y + dn.x;
verts[3].z = 0.0f;
verts[3].c = c.ToInt();
return verts;
}
private void RenderLineVerts(FlatVertex[][] verts)
{
// Set renderstates for rendering
graphics.Device.SetRenderState(RenderState.CullMode, Cull.None);
graphics.Device.SetRenderState(RenderState.ZEnable, false);
graphics.Device.SetRenderState(RenderState.AlphaBlendEnable, false);
graphics.Device.SetRenderState(RenderState.AlphaTestEnable, false);
graphics.Device.SetRenderState(RenderState.TextureFactor, -1);
graphics.Device.SetRenderState(RenderState.FogEnable, false);
SetWorldTransformation(false);
graphics.Device.SetTexture(0, General.Map.Data.WhiteTexture.Texture);
graphics.Shaders.Display2D.Texture1 = General.Map.Data.WhiteTexture.Texture;
graphics.Shaders.Display2D.SetSettings(1f, 1f, 0f, 1f, General.Settings.ClassicBilinear);
// Draw
graphics.Shaders.Display2D.Begin();
foreach (FlatVertex[] v in verts)
{
graphics.Shaders.Display2D.BeginPass(0);
graphics.Device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 0, 2, v);
graphics.Shaders.Display2D.EndPass();
}
graphics.Shaders.Display2D.End();
}
// This renders a circle with given color
public void RenderCircle(Vector2D center, float radius, float thickness, PixelColor c, bool transformcoords)
{
Vector2D[] points = new Vector2D[CIRCLE_PRECISION];
for (int i = 0; i < CIRCLE_PRECISION; i++)
{
float fAngle = i * 2 * (float)Math.PI / CIRCLE_PRECISION;
points[i].x = center.x + ((float)Math.Cos(fAngle) * radius);
points[i].y = center.y + ((float)Math.Sin(fAngle) * radius);
}
Vector2D[] starts = new Vector2D[CIRCLE_PRECISION];
Vector2D[] ends = new Vector2D[CIRCLE_PRECISION];
for (int i = 0; i < CIRCLE_PRECISION; i++)
{
starts[i] = points[i];
ends[i] = points[(i + 1) % CIRCLE_PRECISION];
}
RenderLines(starts, ends, thickness, c, transformcoords);
}
#endregion
#region ================== Geometry
// This renders the linedefs of a sector with special color
public void PlotSector(Sector s, PixelColor c)
{
// Go for all sides in the sector
foreach(Sidedef sd in s.Sidedefs)

View file

@ -394,6 +394,17 @@ togglegrid
default = 262215; //Alt-G
}
//mxd
togglenightspath
{
title = "Toggle NiGHTS Path";
category = "classic";
description = "Toggles NiGHTS path rendering in classic modes.";
allowkeys = false;
allowmouse = false;
allowscroll = false;
}
//mxd
toggledynamicgrid
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

View file

@ -255,7 +255,8 @@ namespace CodeImp.DoomBuilder.Windows
this.modecontrolsloolbar = new System.Windows.Forms.ToolStrip();
this.itemtogglecomments = new System.Windows.Forms.ToolStripMenuItem();
this.itemdynamicgridsize = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.itemrendernightspath = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
@ -736,6 +737,7 @@ namespace CodeImp.DoomBuilder.Windows
this.seperatorviewviews,
this.itemfullbrightness,
this.itemtogglegrid,
this.itemrendernightspath,
this.itemtogglecomments,
this.toolStripSeparator4,
this.menuzoom,
@ -2427,10 +2429,22 @@ namespace CodeImp.DoomBuilder.Windows
this.itemdynamicgridsize.Tag = "builder_toggledynamicgrid";
this.itemdynamicgridsize.Text = "Dynamic Grid Size";
this.itemdynamicgridsize.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
//
// itemrendernightspath
//
this.itemrendernightspath.Checked = true;
this.itemrendernightspath.CheckOnClick = true;
this.itemrendernightspath.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemrendernightspath.Image = global::CodeImp.DoomBuilder.Properties.Resources.axis1;
this.itemrendernightspath.Name = "itemrendernightspath";
this.itemrendernightspath.Size = new System.Drawing.Size(215, 22);
this.itemrendernightspath.Tag = "builder_togglenightspath";
this.itemrendernightspath.Text = "&Show NiGHTS Path";
this.itemrendernightspath.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(1012, 693);
this.Controls.Add(this.dockerspanel);
@ -2689,6 +2703,7 @@ namespace CodeImp.DoomBuilder.Windows
private ToolStripButton buttontogglegrid;
private ToolStripButton buttontoggledynamicgrid;
private ToolStripMenuItem itemdynamicgridsize;
private ToolStripMenuItem itemrendernightspath;
private ToolStripMenuItem itemtogglecomments;
}
}

View file

@ -2016,7 +2016,9 @@ namespace CodeImp.DoomBuilder.Windows
buttonfullbrightness.Checked = Renderer.FullBrightness; //mxd
buttontogglegrid.Visible = General.Settings.ToolbarViewModes && maploaded; //mxd
buttontogglegrid.Checked = General.Settings.RenderGrid; //mxd
buttontogglecomments.Visible = General.Settings.ToolbarViewModes && maploaded && General.Map.UDMF; //mxd
itemrendernightspath.Visible = maploaded && General.Map.SRB2;
itemrendernightspath.Checked = General.Settings.RenderNiGHTSPath;
buttontogglecomments.Visible = General.Settings.ToolbarViewModes && maploaded && General.Map.UDMF; //mxd
buttontogglecomments.Checked = General.Settings.RenderComments; //mxd
separatorfullbrightness.Visible = General.Settings.ToolbarViewModes && maploaded; //mxd
buttonviewbrightness.Visible = General.Settings.ToolbarViewModes && maploaded;
@ -2804,8 +2806,19 @@ namespace CodeImp.DoomBuilder.Windows
General.Interface.RedrawDisplay();
}
//mxd
[BeginAction("toggledynamicgrid")]
[BeginAction("togglenightspath")]
protected void ToggleNiGHTSPath()
{
General.Settings.RenderNiGHTSPath = !General.Settings.RenderNiGHTSPath;
itemrendernightspath.Checked = General.Settings.RenderNiGHTSPath;
General.Interface.DisplayStatus(StatusType.Action, "NiGHTS path rendering is " + (General.Settings.RenderNiGHTSPath ? "ENABLED" : "DISABLED"));
// Redraw display to show changes
General.Interface.RedrawDisplay();
}
//mxd
[BeginAction("toggledynamicgrid")]
protected void ToggleDynamicGrid()
{
General.Settings.DynamicGridSize = !General.Settings.DynamicGridSize;

View file

@ -373,6 +373,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
renderer.Finish();
}

View file

@ -245,7 +245,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
// Render overlay

View file

@ -129,7 +129,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
}
@ -162,7 +163,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(unselectedthings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(selectedthings, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
// Redraw overlay

View file

@ -148,7 +148,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
}
@ -182,7 +183,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(unselectedthings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(selectedthings, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
// Redraw overlay

View file

@ -312,11 +312,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(unselectedthings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(selectedthings, Presentation.THINGS_ALPHA);
renderer.RenderNiGHTSPath();
// Draw the dragged item highlighted
// This is important to know, because this item is used
// for snapping to the grid and snapping to nearest items
renderer.RenderThing(dragitem, General.Colors.Highlight, Presentation.THINGS_ALPHA);
// Draw the dragged item highlighted
// This is important to know, because this item is used
// for snapping to the grid and snapping to nearest items
renderer.RenderThing(dragitem, General.Colors.Highlight, Presentation.THINGS_ALPHA);
// Done
renderer.Finish();

View file

@ -117,7 +117,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
}
@ -150,7 +151,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(unselectedthings, Presentation.THINGS_ALPHA);
renderer.RenderThingSet(selectedthings, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
// Redraw overlay

View file

@ -562,7 +562,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
// Normal update

View file

@ -1566,7 +1566,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
if(highlighted is Thing) renderer.RenderThing((highlighted as Thing), General.Colors.Highlight, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
// Render selection

View file

@ -137,8 +137,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
//foreach(ErrorResult result in selection) result.RenderThingsSelection(renderer); //mxd
renderer.Finish();
renderer.RenderNiGHTSPath();
//foreach(ErrorResult result in selection) result.RenderThingsSelection(renderer); //mxd
renderer.Finish();
}
// Render overlay

View file

@ -140,7 +140,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(renderer.StartThings(true))
{
renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA);
if(BuilderPlug.Me.FindReplaceForm.Finder != null)
renderer.RenderNiGHTSPath();
if (BuilderPlug.Me.FindReplaceForm.Finder != null)
BuilderPlug.Me.FindReplaceForm.Finder.RenderThingsSelection(renderer, selection);
renderer.Finish();
}

View file

@ -877,7 +877,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
// Render overlay

View file

@ -413,7 +413,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
// Render selection

View file

@ -346,7 +346,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
// Render overlay

View file

@ -754,7 +754,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
// Render overlay

View file

@ -190,7 +190,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
for(int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.RenderAssociations(renderer, association[i], eventlines);
renderer.RenderNiGHTSPath();
for (int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.RenderAssociations(renderer, association[i], eventlines);
if((highlighted != null) && !highlighted.IsDisposed)
{

View file

@ -157,7 +157,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA);
renderer.Finish();
renderer.RenderNiGHTSPath();
renderer.Finish();
}
// Render selection

View file

@ -307,8 +307,9 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_BACK_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderNiGHTSPath();
lock (BuilderPlug.Me.SoundEnvironments)
lock (BuilderPlug.Me.SoundEnvironments)
{
foreach(SoundEnvironment se in BuilderPlug.Me.SoundEnvironments)
{

View file

@ -278,7 +278,8 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode
{
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_BACK_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_HIDDEN_ALPHA);
foreach(Thing thing in huntingThings)
renderer.RenderNiGHTSPath();
foreach (Thing thing in huntingThings)
{
renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA);
}