Fixed a bug in drawing geometry

@ Added a test case for drawing
@ Added some ToString functions for elements
This commit is contained in:
codeimp 2009-03-11 20:21:50 +00:00
parent a4987007d0
commit 84b92aae2b
8 changed files with 52 additions and 4 deletions

View file

@ -946,10 +946,10 @@ namespace CodeImp.DoomBuilder.Geometry
{
// Now we take the two linedefs with adjacent angles to the drawn line
List<Linedef> lines = new List<Linedef>(v.Linedefs);
lines.Sort(new LinedefAngleSorter(firstline, true, firstline.End));
lines.Sort(new LinedefAngleSorter(firstline, true, firstline.Start));
startpoints.Add(new LinedefSide(lines[0], true));
startpoints.Add(new LinedefSide(lines[0], false));
lines.Sort(new LinedefAngleSorter(firstline, false, firstline.End));
lines.Sort(new LinedefAngleSorter(firstline, false, firstline.Start));
startpoints.Add(new LinedefSide(lines[0], true));
startpoints.Add(new LinedefSide(lines[0], false));
}
@ -970,10 +970,10 @@ namespace CodeImp.DoomBuilder.Geometry
{
// Now we take the two linedefs with adjacent angles to the drawn line
List<Linedef> lines = new List<Linedef>(v.Linedefs);
lines.Sort(new LinedefAngleSorter(firstline, true, lastline.Start));
lines.Sort(new LinedefAngleSorter(firstline, true, lastline.End));
endpoints.Add(new LinedefSide(lines[0], true));
endpoints.Add(new LinedefSide(lines[0], false));
lines.Sort(new LinedefAngleSorter(firstline, false, lastline.Start));
lines.Sort(new LinedefAngleSorter(firstline, false, lastline.End));
endpoints.Add(new LinedefSide(lines[0], true));
endpoints.Add(new LinedefSide(lines[0], false));
}

View file

@ -906,6 +906,12 @@ namespace CodeImp.DoomBuilder.Map
}
}
// String representation
public override string ToString()
{
return "Linedef " + GetIndex();
}
#endregion
#region ================== Changes

View file

@ -535,6 +535,12 @@ namespace CodeImp.DoomBuilder.Map
General.Map.IsChanged = true;
}
// String representation
public override string ToString()
{
return "Sector " + GetIndex();
}
#endregion
#region ================== Changes

View file

@ -264,6 +264,12 @@ namespace CodeImp.DoomBuilder.Map
General.Map.IsChanged = true;
}
// String representation
public override string ToString()
{
return "Vertex (" + pos + ")";
}
#endregion
}
}

View file

@ -0,0 +1,30 @@
type = "Doom Builder Map Settings Configuration";
gameconfig = "ZDoom_Doom.cfg";
strictpatches = 0;
maps
{
MAP01
{
grid
{
backoffsety = 0;
backoffsetx = 0;
backscalex = 1f;
gridsize = 16;
background = "";
backsource = 0;
backscaley = 1f;
}
resources
{
}
}
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB