mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-03-12 22:01:31 +00:00
Added exceptions for Thing types on which the Object Flip flag has no effect
This commit is contained in:
parent
2fa219a5c7
commit
f54af8087f
7 changed files with 32 additions and 48 deletions
|
@ -35,11 +35,6 @@ namespace CodeImp.DoomBuilder.IO
|
|||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
protected Dictionary<int, int[]> threeDFloorTypes;
|
||||
protected Dictionary<int, int[]> slopeTypes;
|
||||
protected Dictionary<int, int[]> slopeCopyTypes;
|
||||
protected Dictionary<int, int[]> vertexSlopeTypes;
|
||||
protected Dictionary<int, float> translucentLineTypes;
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
@ -52,6 +47,8 @@ namespace CodeImp.DoomBuilder.IO
|
|||
slopeCopyTypes = new Dictionary<int, int[]>() { { 118, new int[2] { -1, -1 } } };
|
||||
vertexSlopeTypes = new Dictionary<int, int[]>() { };
|
||||
translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } };
|
||||
unflippableTypes = new List<int>();
|
||||
startTypes = new List<int>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -100,19 +97,12 @@ namespace CodeImp.DoomBuilder.IO
|
|||
public override int MaxThingAngle { get { return short.MaxValue; } }
|
||||
public override int MinThingAngle { get { return short.MinValue; } }
|
||||
public override Dictionary<MapElementType, Dictionary<string, UniversalType>> UIFields { get { return uifields; } } //mxd
|
||||
public override Dictionary<int, int[]> ThreeDFloorTypes { get { return threeDFloorTypes; } }
|
||||
public override Dictionary<int, int[]> SlopeTypes { get { return slopeTypes; } }
|
||||
public override Dictionary<int, int[]> SlopeCopyTypes { get { return slopeCopyTypes; } }
|
||||
public override Dictionary<int, int[]> VertexSlopeTypes { get { return vertexSlopeTypes; } }
|
||||
public override Dictionary<int, float> TranslucentLineTypes { get { return translucentLineTypes; } }
|
||||
public override int SlopeVertexType { get { return 9500; } }
|
||||
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
|
||||
|
||||
#region ================== Reading
|
||||
|
|
|
@ -35,11 +35,6 @@ namespace CodeImp.DoomBuilder.IO
|
|||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
protected Dictionary<int, int[]> threeDFloorTypes;
|
||||
protected Dictionary<int, int[]> slopeTypes;
|
||||
protected Dictionary<int, int[]> slopeCopyTypes;
|
||||
protected Dictionary<int, int[]> vertexSlopeTypes;
|
||||
protected Dictionary<int, float> translucentLineTypes;
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
@ -52,6 +47,8 @@ namespace CodeImp.DoomBuilder.IO
|
|||
slopeCopyTypes = new Dictionary<int, int[]>() { { 118, new int[2] { -1, -1 } } };
|
||||
vertexSlopeTypes = new Dictionary<int, int[]>() { };
|
||||
translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } };
|
||||
unflippableTypes = new List<int>();
|
||||
startTypes = new List<int>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -100,18 +97,12 @@ namespace CodeImp.DoomBuilder.IO
|
|||
public override int MaxThingAngle { get { return short.MaxValue; } }
|
||||
public override int MinThingAngle { get { return short.MinValue; } }
|
||||
public override Dictionary<MapElementType, Dictionary<string, UniversalType>> UIFields { get { return uifields; } } //mxd
|
||||
public override Dictionary<int, int[]> ThreeDFloorTypes { get { return threeDFloorTypes; } }
|
||||
public override Dictionary<int, int[]> SlopeTypes { get { return slopeTypes; } }
|
||||
public override Dictionary<int, int[]> SlopeCopyTypes { get { return slopeCopyTypes; } }
|
||||
public override Dictionary<int, int[]> VertexSlopeTypes { get { return vertexSlopeTypes; } }
|
||||
public override Dictionary<int, float> TranslucentLineTypes { get { return translucentLineTypes; } }
|
||||
public override int SlopeVertexType { get { return 9500; } }
|
||||
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
|
||||
|
||||
#region ================== Reading
|
||||
|
|
|
@ -81,5 +81,7 @@ namespace CodeImp.DoomBuilder.IO
|
|||
int FlatAlignmentType { get; }
|
||||
int AxisType { get; }
|
||||
int AxisTransferLineType { get; }
|
||||
List<int> UnflippableTypes { get; }
|
||||
List<int> StartTypes { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,11 +45,18 @@ namespace CodeImp.DoomBuilder.IO
|
|||
//mxd
|
||||
protected Dictionary<MapElementType, Dictionary<string, UniversalType>> uifields;
|
||||
|
||||
#endregion
|
||||
protected Dictionary<int, int[]> threeDFloorTypes;
|
||||
protected Dictionary<int, int[]> slopeTypes;
|
||||
protected Dictionary<int, int[]> slopeCopyTypes;
|
||||
protected Dictionary<int, int[]> vertexSlopeTypes;
|
||||
protected Dictionary<int, float> translucentLineTypes;
|
||||
protected List<int> unflippableTypes;
|
||||
protected List<int> startTypes;
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
#region ================== Properties
|
||||
|
||||
public abstract int MaxSidedefs { get; }
|
||||
public abstract int MaxSidedefs { get; }
|
||||
public abstract int MaxVertices { get; }
|
||||
public abstract int MaxLinedefs { get; }
|
||||
public abstract int MaxSectors { get; }
|
||||
|
@ -91,19 +98,19 @@ namespace CodeImp.DoomBuilder.IO
|
|||
public abstract int MaxThingAngle { get; }
|
||||
public abstract int MinThingAngle { get; }
|
||||
public abstract Dictionary<MapElementType, Dictionary<string, UniversalType>> UIFields { get; } //mxd
|
||||
public abstract Dictionary<int, int[]> ThreeDFloorTypes { get; }
|
||||
public abstract Dictionary<int, int[]> SlopeTypes { get; }
|
||||
public abstract Dictionary<int, int[]> SlopeCopyTypes { get; }
|
||||
public abstract Dictionary<int, int[]> VertexSlopeTypes { get; }
|
||||
public abstract Dictionary<int, float> TranslucentLineTypes { get; }
|
||||
public Dictionary<int, int[]> ThreeDFloorTypes { get { return threeDFloorTypes; } }
|
||||
public Dictionary<int, int[]> SlopeTypes { get { return slopeTypes; } }
|
||||
public Dictionary<int, int[]> SlopeCopyTypes { get { return slopeCopyTypes; } }
|
||||
public Dictionary<int, int[]> VertexSlopeTypes { get { return vertexSlopeTypes; } }
|
||||
public Dictionary<int, float> TranslucentLineTypes { get { return translucentLineTypes; } }
|
||||
public abstract int SlopeVertexType { get; }
|
||||
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; }
|
||||
|
||||
|
||||
public List<int> UnflippableTypes { get { return unflippableTypes; } }
|
||||
public List<int> StartTypes { get { return startTypes; } }
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
|
|
@ -143,6 +143,9 @@ namespace CodeImp.DoomBuilder.IO
|
|||
{ 908, 0.1f },
|
||||
};
|
||||
|
||||
unflippableTypes = new List<int>() { 604, 605, 606, 607, 608, 609, 1700, 1701, 1702, 1704, 1705, 1713 };
|
||||
|
||||
startTypes = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 };
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -38,11 +38,6 @@ namespace CodeImp.DoomBuilder.IO
|
|||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
protected Dictionary<int, int[]> threeDFloorTypes;
|
||||
protected Dictionary<int, int[]> slopeTypes;
|
||||
protected Dictionary<int, int[]> slopeCopyTypes;
|
||||
protected Dictionary<int, int[]> vertexSlopeTypes;
|
||||
protected Dictionary<int, float> translucentLineTypes;
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
@ -57,6 +52,9 @@ namespace CodeImp.DoomBuilder.IO
|
|||
slopeCopyTypes = new Dictionary<int, int[]>() { { 118, new int[2] { -1, -1 } } };
|
||||
vertexSlopeTypes = new Dictionary<int, int[]>() { };
|
||||
translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } };
|
||||
unflippableTypes = new List<int>();
|
||||
startTypes = new List<int>();
|
||||
|
||||
// Make configuration
|
||||
Configuration config = new Configuration();
|
||||
|
||||
|
@ -150,18 +148,12 @@ namespace CodeImp.DoomBuilder.IO
|
|||
public override int MaxThingAngle { get { return int.MaxValue; } }
|
||||
public override int MinThingAngle { get { return int.MinValue; } }
|
||||
public override Dictionary<MapElementType, Dictionary<string, UniversalType>> UIFields { get { return uifields; } } //mxd
|
||||
public override Dictionary<int, int[]> ThreeDFloorTypes { get { return threeDFloorTypes; } }
|
||||
public override Dictionary<int, int[]> SlopeTypes { get { return slopeTypes; } }
|
||||
public override Dictionary<int, int[]> SlopeCopyTypes { get { return slopeCopyTypes; } }
|
||||
public override Dictionary<int, int[]> VertexSlopeTypes { get { return vertexSlopeTypes; } }
|
||||
public override Dictionary<int, float> TranslucentLineTypes { get { return translucentLineTypes; } }
|
||||
public override int SlopeVertexType { get { return 9500; } }
|
||||
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
|
||||
|
||||
#region ================== Reading
|
||||
|
|
|
@ -125,12 +125,11 @@ namespace CodeImp.DoomBuilder.Map
|
|||
get
|
||||
{
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfo(Type);
|
||||
return (ti.Hangs && !IsReverse) || (!ti.Hangs && IsReverse);
|
||||
return ti.Hangs ^ IsReverse;
|
||||
}
|
||||
}
|
||||
public bool IsReverse { get { return General.Map.SRB2 && IsFlagSet("2"); } }
|
||||
|
||||
|
||||
public bool IsReverse { get { return General.Map.SRB2 && !Unflippable && IsFlagSet("2"); } }
|
||||
public bool Unflippable { get { return General.Map.FormatInterface.UnflippableTypes.Contains(Type); } }
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
|
Loading…
Reference in a new issue