mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Fixed a bug in drawing geometry
@ Added a test case for drawing @ Added some ToString functions for elements
This commit is contained in:
parent
a4987007d0
commit
84b92aae2b
8 changed files with 52 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -905,6 +905,12 @@ namespace CodeImp.DoomBuilder.Map
|
|||
sd.Marked = newside.Marked;
|
||||
}
|
||||
}
|
||||
|
||||
// String representation
|
||||
public override string ToString()
|
||||
{
|
||||
return "Linedef " + GetIndex();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -534,6 +534,12 @@ namespace CodeImp.DoomBuilder.Map
|
|||
|
||||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
// String representation
|
||||
public override string ToString()
|
||||
{
|
||||
return "Sector " + GetIndex();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -264,6 +264,12 @@ namespace CodeImp.DoomBuilder.Map
|
|||
General.Map.IsChanged = true;
|
||||
}
|
||||
|
||||
// String representation
|
||||
public override string ToString()
|
||||
{
|
||||
return "Vertex (" + pos + ")";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
30
Tests/Drawing/AutoCloseFail1.dbs
Normal file
30
Tests/Drawing/AutoCloseFail1.dbs
Normal 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
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
BIN
Tests/Drawing/AutoCloseFail1.wad
Normal file
BIN
Tests/Drawing/AutoCloseFail1.wad
Normal file
Binary file not shown.
BIN
Tests/Drawing/AutoCloseFail1a.png
Normal file
BIN
Tests/Drawing/AutoCloseFail1a.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
BIN
Tests/Drawing/AutoCloseFail1b.png
Normal file
BIN
Tests/Drawing/AutoCloseFail1b.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 71 KiB |
Loading…
Reference in a new issue