- improved game config guessing to better detect UDMF when map is opened

- added game config detection pattern to Doom Legacy game config
- insert thing feature added, including automatic thing defaults
- fixed typo in all game configs (defaulthingflags -> defaultthingflags)
This commit is contained in:
codeimp 2008-06-10 11:32:06 +00:00
parent 66052a82f7
commit c37b28e15f
34 changed files with 237 additions and 78 deletions

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -106,6 +106,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -101,6 +101,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 1; E1M2 = 1; E1M3 = 1; E1M4 = 1; E1M5 = 1; E1M6 = 1; E1M7 = 1; E1M8 = 1; E1M9 = 1;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -101,6 +101,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -101,9 +101,11 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 1; E1M2 = 1; E1M3 = 1; E1M4 = 1; E1M5 = 1; E1M6 = 1; E1M7 = 1; E1M8 = 1; E1M9 = 1;
E1M1 = 1; E1M2 = 1; E1M3 = 1; E1M4 = 1; E1M5 = 1; E1M6 = 1; E1M7 = 1; E1M8 = 1; E1M9 = 1;
E2M1 = 1; E2M2 = 1; E2M3 = 1; E2M4 = 1; E2M5 = 1; E2M6 = 1; E2M7 = 1; E2M8 = 1; E2M9 = 1;
E3M1 = 1; E3M2 = 1; E3M3 = 1; E3M4 = 1; E3M5 = 1; E3M6 = 1; E3M7 = 1; E3M8 = 1; E3M9 = 1;
E4M1 = 1; E4M2 = 1; E4M3 = 1; E4M4 = 1; E4M5 = 1; E4M6 = 1; E4M7 = 1; E4M8 = 1; E4M9 = 1;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -101,6 +101,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -101,6 +101,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 3;
BEHAVIOR = 2;
E1M1 = 1; E1M2 = 1; E1M3 = 1; E1M4 = 1; E1M5 = 1; E1M6 = 1; E1M7 = 1; E1M8 = 1; E1M9 = 1;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -106,6 +106,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 3;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -101,6 +101,19 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;
E2M1 = 2; E2M2 = 2; E2M3 = 2; E2M4 = 2; E2M5 = 2; E2M6 = 2; E2M7 = 2; E2M8 = 2; E2M9 = 2;
E3M1 = 2; E3M2 = 2; E3M3 = 2; E3M4 = 2; E3M5 = 2; E3M6 = 2; E3M7 = 2; E3M8 = 2; E3M9 = 2;
E4M1 = 2; E4M2 = 2; E4M3 = 2; E4M4 = 2; E4M5 = 2; E4M6 = 2; E4M7 = 2; E4M8 = 2; E4M9 = 2;
MAP01 = 1; MAP02 = 1; MAP03 = 1; MAP04 = 1; MAP05 = 1; MAP06 = 1; MAP07 = 1; MAP08 = 1; MAP09 = 1; MAP10 = 1;
MAP11 = 1; MAP12 = 1; MAP13 = 1; MAP14 = 1; MAP15 = 1; MAP16 = 1; MAP17 = 1; MAP18 = 1; MAP19 = 1; MAP20 = 1;
MAP21 = 1; MAP22 = 1; MAP23 = 1; MAP24 = 1; MAP25 = 1; MAP26 = 1; MAP27 = 1; MAP28 = 1; MAP29 = 1; MAP30 = 1;
MAP31 = 1; MAP32 = 1; MAP33 = 2; MAP34 = 2; MAP35 = 2; MAP36 = 2; MAP37 = 2; MAP38 = 2; MAP39 = 2; MAP40 = 2;
MAP41 = 2;
}

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -101,6 +101,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -106,6 +106,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -111,6 +111,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 3;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -101,6 +101,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -101,6 +101,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 1; E1M2 = 1; E1M3 = 1; E1M4 = 1; E1M5 = 1; E1M6 = 1; E1M7 = 1; E1M8 = 1; E1M9 = 1;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -106,6 +106,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -37,7 +37,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -112,6 +112,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 3;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -37,7 +37,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
skill1;
skill2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -111,6 +111,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 3;
E1M1 = 1; E1M2 = 1; E1M3 = 1; E1M4 = 1; E1M5 = 1; E1M6 = 1; E1M7 = 1; E1M8 = 1; E1M9 = 1;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -111,6 +111,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 3;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -111,6 +111,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 3;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -36,7 +36,7 @@ defaultflatscale = 1.0f;
start3dmode = 32000;
// Default flags for first new thing
defaulthingflags
defaultthingflags
{
1;
2;
@ -101,6 +101,8 @@ Used to guess the game for which a WAD file is made.
gamedetect
{
TEXTMAP = 2;
ENDMAP = 2;
EXTENDED = 2;
BEHAVIOR = 2;
E1M1 = 2; E1M2 = 2; E1M3 = 2; E1M4 = 2; E1M5 = 2; E1M6 = 2; E1M7 = 2; E1M8 = 2; E1M9 = 2;

View file

@ -1,5 +1,3 @@
- "Insert Thing" control
- Make "Make Sector" mode
- On mousemove (?) already show the sector outline it will create
- On click make the sector

View file

@ -412,6 +412,33 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Actions
// This creates a new vertex at the mouse position
[BeginAction("insertitem", BaseAction = true)]
public virtual void InsertVertex()
{
// Mouse in window?
if(mouseinside)
{
// Create vertex at mouse position
Vertex v = General.Map.Map.CreateVertex(mousemappos);
// Snap to grid enabled?
if(General.Interface.SnapToGrid)
{
// Snap to grid
v.SnapToGrid();
}
else
{
// Snap to map format accuracy
v.SnapToAccuracy();
}
// Redraw screen
General.Interface.RedrawDisplay();
}
}
[BeginAction("deleteitem", BaseAction = true)]
public void DeleteItem()
{

View file

@ -531,6 +531,33 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Actions
// This creates a new vertex at the mouse position
[BeginAction("insertitem", BaseAction = true)]
public virtual void InsertVertex()
{
// Mouse in window?
if(mouseinside)
{
// Create vertex at mouse position
Vertex v = General.Map.Map.CreateVertex(mousemappos);
// Snap to grid enabled?
if(General.Interface.SnapToGrid)
{
// Snap to grid
v.SnapToGrid();
}
else
{
// Snap to map format accuracy
v.SnapToAccuracy();
}
// Redraw screen
General.Interface.RedrawDisplay();
}
}
[BeginAction("deleteitem", BaseAction = true)]
public void DeleteItem()
{

View file

@ -374,6 +374,39 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Actions
// This creates a new thing at the mouse position
[BeginAction("insertitem", BaseAction = true)]
public virtual void InsertThing()
{
// Mouse in window?
if(mouseinside)
{
// Create things at mouse position
Thing t = General.Map.Map.CreateThing();
General.Settings.ApplyDefaultThingSettings(t);
t.Move(mousemappos);
t.UpdateConfiguration();
// Update things filter so that it includes this thing
General.Map.ThingsFilter.Update();
// Snap to grid enabled?
if(General.Interface.SnapToGrid)
{
// Snap to grid
t.SnapToGrid();
}
else
{
// Snap to map format accuracy
t.SnapToAccuracy();
}
// Redraw screen
General.Interface.RedrawDisplay();
}
}
[BeginAction("deleteitem", BaseAction = true)]
public void DeleteItem()
{
@ -405,7 +438,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RedrawDisplay();
}
}
#endregion
}
}

View file

@ -385,6 +385,33 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Actions
// This creates a new vertex at the mouse position
[BeginAction("insertitem", BaseAction = true)]
public virtual void InsertVertex()
{
// Mouse in window?
if(mouseinside)
{
// Create vertex at mouse position
Vertex v = General.Map.Map.CreateVertex(mousemappos);
// Snap to grid enabled?
if(General.Interface.SnapToGrid)
{
// Snap to grid
v.SnapToGrid();
}
else
{
// Snap to map format accuracy
v.SnapToAccuracy();
}
// Redraw screen
General.Interface.RedrawDisplay();
}
}
[BeginAction("deleteitem", BaseAction = true)]
public void DeleteItem()
{

View file

@ -175,7 +175,7 @@ joinsectors
mergesectors
{
title = "Sectors: merge";
title = "Sectors: Merge";
description = "Joins two or more selected sectors together and removes the shared linedefs.";
allowkeys = true;
allowmouse = true;

View file

@ -65,6 +65,7 @@ namespace CodeImp.DoomBuilder.Config
private IDictionary flatranges;
// Things
private List<string> defaultthingflags;
private Dictionary<string, string> thingflags;
private List<ThingCategory> thingcategories;
private Dictionary<int, ThingTypeInfo> things;
@ -119,6 +120,7 @@ namespace CodeImp.DoomBuilder.Config
public IDictionary FlatRanges { get { return flatranges; } }
// Things
public ICollection<string> DefaultThingFlags { get { return defaultthingflags; } }
public IDictionary<string, string> ThingFlags { get { return thingflags; } }
public List<ThingCategory> ThingCategories { get { return thingcategories; } }
public ICollection<ThingTypeInfo> Things { get { return things.Values; } }
@ -158,6 +160,7 @@ namespace CodeImp.DoomBuilder.Config
// Initialize
this.cfg = cfg;
this.thingflags = new Dictionary<string, string>();
this.defaultthingflags = new List<string>();
this.thingcategories = new List<ThingCategory>();
this.things = new Dictionary<int, ThingTypeInfo>();
this.linedefflags = new Dictionary<string, string>();
@ -205,6 +208,7 @@ namespace CodeImp.DoomBuilder.Config
// Things
LoadThingFlags();
LoadDefaultThingFlags();
LoadThingCategories();
// Linedefs
@ -499,35 +503,31 @@ namespace CodeImp.DoomBuilder.Config
private void LoadThingFlags()
{
IDictionary dic;
int bitflagscheck = 0;
int bitvalue;
// Get linedef flags
dic = cfg.ReadSetting("thingflags", new Hashtable());
foreach(DictionaryEntry de in dic)
{
/*
// Try paring the bit value
if(int.TryParse(de.Key.ToString(),
NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite,
CultureInfo.InvariantCulture, out bitvalue))
{
// Check for conflict and add to list
if((bitvalue & bitflagscheck) == 0)
thingflags.Add(bitvalue, de.Value.ToString());
else
General.WriteLogLine("WARNING: Structure 'thingflags' contains conflicting bit flag keys. Make sure all keys are unique integers and powers of 2!");
thingflags.Add(de.Key.ToString(), de.Value.ToString());
}
// Update bit flags checking value
bitflagscheck |= bitvalue;
// Default thing flags
private void LoadDefaultThingFlags()
{
IDictionary dic;
// Get linedef flags
dic = cfg.ReadSetting("defaultthingflags", new Hashtable());
foreach(DictionaryEntry de in dic)
{
// Check if flag exists
if(thingflags.ContainsKey(de.Key.ToString()))
{
defaultthingflags.Add(de.Key.ToString());
}
else
{
General.WriteLogLine("WARNING: Structure 'thingflags' contains invalid keys!");
General.WriteLogLine("WARNING: Structure 'defaultthingflags' contains unknown thing flags!");
}
*/
thingflags.Add(de.Key.ToString(), de.Value.ToString());
}
}

View file

@ -64,6 +64,8 @@ namespace CodeImp.DoomBuilder.Config
private int defaultceilheight = 128;
private string defaultfloortexture;
private string defaultceiltexture;
private int defaultthingtype = 1;
private float defaultthingangle = 0.0f;
#endregion
@ -86,6 +88,8 @@ namespace CodeImp.DoomBuilder.Config
public int DefaultBrightness { get { return defaultbrightness; } set { defaultbrightness = value; } }
public int DefaultFloorHeight { get { return defaultfloorheight; } set { defaultfloorheight = value; } }
public int DefaultCeilingHeight { get { return defaultceilheight; } set { defaultceilheight = value; } }
public int DefaultThingType { get { return defaultthingtype; } set { defaultthingtype = value; } }
public float DefaultThingAngle { get { return defaultthingangle; } set { defaultthingangle = value; } }
#endregion
@ -236,6 +240,18 @@ namespace CodeImp.DoomBuilder.Config
// WriteSetting
internal bool WriteSetting(string setting, object settingvalue) { return cfg.WriteSetting(setting, settingvalue); }
internal bool WriteSetting(string setting, object settingvalue, string pathseperator) { return cfg.WriteSetting(setting, settingvalue, pathseperator); }
#endregion
#region ================== Default Settings
// This applies default settings to a thing
public void ApplyDefaultThingSettings(Thing t)
{
t.Type = defaultthingtype;
t.Rotate(defaultthingangle);
foreach(string f in General.Map.Config.DefaultThingFlags) t.Flags[f] = true;
}
// This attempts to find the default drawing settings
public void FindDefaultDrawSettings()

View file

@ -525,35 +525,6 @@ namespace CodeImp.DoomBuilder.Editing
#region ================== Actions
/// <summary>
/// This creates a new vertex at the mouse position (insertvertex action).
/// </summary>
[BeginAction("insertvertex", BaseAction = true)]
public virtual void InsertVertex()
{
// Mouse in window?
if(mouseinside)
{
// Create vertex at mouse position
Vertex v = General.Map.Map.CreateVertex(mousemappos);
// Snap to grid enabled?
if(General.Interface.SnapToGrid)
{
// Snap to grid
v.SnapToGrid();
}
else
{
// Snap to map format accuracy
v.SnapToAccuracy();
}
// Redraw screen
General.Interface.RedrawDisplay();
}
}
#endregion
}
}

View file

@ -101,6 +101,7 @@ namespace CodeImp.DoomBuilder.Map
this.map = map;
this.mainlistitem = listitem;
this.flags = new Dictionary<string, bool>();
this.args = new int[NUM_ARGS];
// We have no destructor
GC.SuppressFinalize(this);

View file

@ -224,10 +224,10 @@ centerinscreen
allowscroll = true;
}
insertvertex
insertitem
{
title = "2D: Insert Vertex";
description = "Creates a new vertex at the current mouse position.";
title = "2D: Insert Item";
description = "Creates a new vertex or thing at the current mouse position.";
allowkeys = true;
allowmouse = true;
allowscroll = true;

View file

@ -179,6 +179,12 @@ namespace CodeImp.DoomBuilder.Windows
result = false;
break;
}
// If this lumps must exist, and is found
else if(((int)lmp.Value == 3) && (lumpresult != null))
{
// Good result.
result = true;
}
// If this lumps must exist, and it is missing
else if(((int)lmp.Value == 3) && (lumpresult == null))
{

View file

@ -366,6 +366,10 @@ namespace CodeImp.DoomBuilder.Windows
t.UpdateConfiguration();
}
// Set as defaults
General.Settings.DefaultThingType = typeid.GetResult(General.Settings.DefaultThingType);
General.Settings.DefaultThingAngle = Angle2D.DegToRad((float)angle.GetResult((int)Angle2D.RadToDeg(General.Settings.DefaultThingAngle) - 90) + 90);
// Done
General.Map.IsChanged = true;
this.DialogResult = DialogResult.OK;