2014-09-18 22:06:35 +00:00
|
|
|
|
#region ================== Namespaces
|
|
|
|
|
|
|
|
|
|
using System;
|
2014-12-22 21:36:49 +00:00
|
|
|
|
using System.Collections.Generic;
|
2014-09-18 22:06:35 +00:00
|
|
|
|
using System.Drawing;
|
2014-12-22 21:36:49 +00:00
|
|
|
|
using CodeImp.DoomBuilder.GZBuilder.Tools;
|
|
|
|
|
using CodeImp.DoomBuilder.Geometry;
|
2014-09-18 22:06:35 +00:00
|
|
|
|
using CodeImp.DoomBuilder.Map;
|
|
|
|
|
using CodeImp.DoomBuilder.VisualModes;
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.BuilderModes
|
|
|
|
|
{
|
2014-12-22 21:36:49 +00:00
|
|
|
|
// A struct, which contains information about visual sides connected to start and end of given visual side
|
|
|
|
|
internal class SortedVisualSide
|
|
|
|
|
{
|
|
|
|
|
internal readonly BaseVisualGeometrySidedef Side;
|
|
|
|
|
internal readonly Vector2D Start;
|
|
|
|
|
internal readonly Vector2D End;
|
|
|
|
|
internal Rectangle Bounds;
|
2014-12-23 12:32:08 +00:00
|
|
|
|
internal Rectangle GlobalBounds;
|
2014-12-22 21:36:49 +00:00
|
|
|
|
internal readonly Dictionary<SortedVisualSide, bool> NextSides;
|
|
|
|
|
internal readonly Dictionary<SortedVisualSide, bool> PreviousSides;
|
|
|
|
|
internal readonly int Index;
|
2015-01-12 18:18:48 +00:00
|
|
|
|
internal int GroupIndex = -1;
|
2014-12-22 21:36:49 +00:00
|
|
|
|
private static int index;
|
|
|
|
|
|
|
|
|
|
//Initial texture coordinates
|
|
|
|
|
private readonly float OffsetX;
|
|
|
|
|
private readonly float OffsetY;
|
2015-03-10 18:49:29 +00:00
|
|
|
|
private readonly float ControlSideOffsetX;
|
|
|
|
|
private readonly float ControlSideOffsetY;
|
2014-12-22 21:36:49 +00:00
|
|
|
|
private readonly float ScaleX;
|
|
|
|
|
private readonly float ScaleY;
|
|
|
|
|
|
|
|
|
|
internal SortedVisualSide(BaseVisualGeometrySidedef side)
|
|
|
|
|
{
|
|
|
|
|
Side = side;
|
|
|
|
|
Bounds = BuilderModesTools.GetSidedefPartSize(side);
|
|
|
|
|
Index = index++;
|
|
|
|
|
|
|
|
|
|
if (side.Sidedef.Line.Front == side.Sidedef)
|
|
|
|
|
{
|
|
|
|
|
Start = side.Sidedef.Line.Start.Position;
|
|
|
|
|
End = side.Sidedef.Line.End.Position;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Start = side.Sidedef.Line.End.Position;
|
|
|
|
|
End = side.Sidedef.Line.Start.Position;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch (side.GeometryType)
|
|
|
|
|
{
|
|
|
|
|
case VisualGeometryType.WALL_UPPER:
|
|
|
|
|
OffsetX = UDMFTools.GetFloat(side.Sidedef.Fields, "offsetx_top");
|
|
|
|
|
OffsetY = UDMFTools.GetFloat(side.Sidedef.Fields, "offsety_top");
|
|
|
|
|
ScaleX = UDMFTools.GetFloat(side.Sidedef.Fields, "scalex_top", 1.0f);
|
|
|
|
|
ScaleY = UDMFTools.GetFloat(side.Sidedef.Fields, "scaley_top", 1.0f);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case VisualGeometryType.WALL_MIDDLE:
|
|
|
|
|
OffsetX = UDMFTools.GetFloat(side.Sidedef.Fields, "offsetx_mid");
|
|
|
|
|
OffsetY = UDMFTools.GetFloat(side.Sidedef.Fields, "offsety_mid");
|
|
|
|
|
ScaleX = UDMFTools.GetFloat(side.Sidedef.Fields, "scalex_mid", 1.0f);
|
|
|
|
|
ScaleY = UDMFTools.GetFloat(side.Sidedef.Fields, "scaley_mid", 1.0f);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case VisualGeometryType.WALL_MIDDLE_3D:
|
|
|
|
|
Sidedef cs = side.GetControlLinedef().Front;
|
2015-03-10 18:49:29 +00:00
|
|
|
|
ControlSideOffsetX = cs.OffsetX + UDMFTools.GetFloat(cs.Fields, "offsetx_mid");
|
|
|
|
|
OffsetX = UDMFTools.GetFloat(side.Sidedef.Fields, "offsetx_mid");
|
|
|
|
|
ControlSideOffsetY = cs.OffsetY + UDMFTools.GetFloat(cs.Fields, "offsety_mid");
|
|
|
|
|
OffsetY = UDMFTools.GetFloat(side.Sidedef.Fields, "offsety_mid");
|
2014-12-22 21:36:49 +00:00
|
|
|
|
ScaleX = UDMFTools.GetFloat(cs.Fields, "scalex_mid", 1.0f);
|
|
|
|
|
ScaleY = UDMFTools.GetFloat(cs.Fields, "scaley_mid", 1.0f);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case VisualGeometryType.WALL_LOWER:
|
|
|
|
|
OffsetX = UDMFTools.GetFloat(side.Sidedef.Fields, "offsetx_bottom");
|
|
|
|
|
OffsetY = UDMFTools.GetFloat(side.Sidedef.Fields, "offsety_bottom");
|
|
|
|
|
ScaleX = UDMFTools.GetFloat(side.Sidedef.Fields, "scalex_bottom", 1.0f);
|
|
|
|
|
ScaleY = UDMFTools.GetFloat(side.Sidedef.Fields, "scaley_bottom", 1.0f);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
NextSides = new Dictionary<SortedVisualSide, bool>();
|
|
|
|
|
PreviousSides = new Dictionary<SortedVisualSide, bool>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal void OnTextureFit(FitTextureOptions options)
|
|
|
|
|
{
|
|
|
|
|
options.Bounds = Bounds;
|
2014-12-23 12:32:08 +00:00
|
|
|
|
options.GlobalBounds = GlobalBounds;
|
2014-12-22 21:36:49 +00:00
|
|
|
|
options.InitialOffsetX = OffsetX;
|
|
|
|
|
options.InitialOffsetY = OffsetY;
|
2015-03-10 18:49:29 +00:00
|
|
|
|
options.ControlSideOffsetX = ControlSideOffsetX;
|
|
|
|
|
options.ControlSideOffsetY = ControlSideOffsetY;
|
2014-12-22 21:36:49 +00:00
|
|
|
|
options.InitialScaleX = ScaleX;
|
|
|
|
|
options.InitialScaleY = ScaleY;
|
|
|
|
|
|
|
|
|
|
Side.OnTextureFit(options);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal static class BuilderModesTools
|
2014-09-18 22:06:35 +00:00
|
|
|
|
{
|
|
|
|
|
#region ================== Sidedef
|
|
|
|
|
|
2014-12-22 21:36:49 +00:00
|
|
|
|
internal static Rectangle GetSidedefPartSize(BaseVisualGeometrySidedef side)
|
2014-09-18 22:06:35 +00:00
|
|
|
|
{
|
2014-12-22 21:36:49 +00:00
|
|
|
|
if(side.GeometryType == VisualGeometryType.WALL_MIDDLE_3D)
|
2014-09-18 22:06:35 +00:00
|
|
|
|
{
|
2014-12-22 21:36:49 +00:00
|
|
|
|
Rectangle rect = new Rectangle(0, 0, Math.Max(1, (int)Math.Round(side.Sidedef.Line.Length)), 0);
|
2014-09-18 22:06:35 +00:00
|
|
|
|
Linedef cl = side.GetControlLinedef();
|
2014-12-22 21:36:49 +00:00
|
|
|
|
|
2014-12-03 23:15:26 +00:00
|
|
|
|
if(cl.Front != null && cl.Front.Sector != null)
|
|
|
|
|
{
|
2014-12-22 21:36:49 +00:00
|
|
|
|
// Use floor height for vavoom-type 3d floors, because FloorHeight should be > CeilHeight for this type of 3d floor.
|
2014-09-22 14:33:15 +00:00
|
|
|
|
if (cl.Args[1] == 0)
|
|
|
|
|
{
|
2014-12-22 21:36:49 +00:00
|
|
|
|
rect.Y = -cl.Front.Sector.FloorHeight;
|
2014-09-22 14:33:15 +00:00
|
|
|
|
rect.Height = cl.Front.Sector.FloorHeight - cl.Front.Sector.CeilHeight;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-12-22 21:36:49 +00:00
|
|
|
|
rect.Y = -cl.Front.Sector.CeilHeight;
|
2014-09-22 14:33:15 +00:00
|
|
|
|
rect.Height = cl.Front.GetMiddleHeight();
|
|
|
|
|
}
|
2014-12-03 23:15:26 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-12-22 21:36:49 +00:00
|
|
|
|
rect.Y = -side.Sidedef.Sector.CeilHeight;
|
2014-09-18 22:06:35 +00:00
|
|
|
|
rect.Height = side.Sidedef.GetMiddleHeight();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return rect;
|
|
|
|
|
}
|
|
|
|
|
|
2014-12-22 21:36:49 +00:00
|
|
|
|
return GetSidedefPartSize(side.Sidedef, side.GeometryType);
|
2014-09-18 22:06:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Rectangle GetSidedefPartSize(Sidedef side, VisualGeometryType type)
|
|
|
|
|
{
|
2014-12-22 21:36:49 +00:00
|
|
|
|
Rectangle rect = new Rectangle(0, 0, Math.Max(1, (int)Math.Round(side.Line.Length)), 0);
|
2014-09-18 22:06:35 +00:00
|
|
|
|
|
|
|
|
|
switch(type)
|
|
|
|
|
{
|
|
|
|
|
case VisualGeometryType.WALL_LOWER:
|
2014-12-22 21:36:49 +00:00
|
|
|
|
if (side.LowRequired())
|
|
|
|
|
{
|
|
|
|
|
rect.Y = -side.Other.Sector.FloorHeight;
|
|
|
|
|
rect.Height = side.GetLowHeight();
|
|
|
|
|
}
|
2014-09-18 22:06:35 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case VisualGeometryType.WALL_UPPER:
|
2014-12-22 21:36:49 +00:00
|
|
|
|
if(side.HighRequired())
|
2014-09-18 22:06:35 +00:00
|
|
|
|
{
|
2014-12-22 21:36:49 +00:00
|
|
|
|
rect.Y = -side.Sector.CeilHeight;
|
2014-09-18 22:06:35 +00:00
|
|
|
|
rect.Height = side.GetHighHeight();
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case VisualGeometryType.WALL_MIDDLE:
|
2014-12-22 21:36:49 +00:00
|
|
|
|
if(side.MiddleRequired())
|
|
|
|
|
{
|
|
|
|
|
rect.Y = -side.Sector.CeilHeight;
|
|
|
|
|
}
|
|
|
|
|
else if (side.Other.Sector != null) // Double-sided
|
|
|
|
|
{
|
|
|
|
|
rect.Y = -Math.Min(side.Sector.CeilHeight, side.Other.Sector.CeilHeight);
|
|
|
|
|
}
|
2014-09-18 22:06:35 +00:00
|
|
|
|
rect.Height = side.GetMiddleHeight();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
throw new NotImplementedException("GetSidedefPartSize: got unsupported geometry type: '" + type + "'");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return rect;
|
|
|
|
|
}
|
|
|
|
|
|
2014-12-22 21:36:49 +00:00
|
|
|
|
public static List<SortedVisualSide> SortVisualSides(IEnumerable<BaseVisualGeometrySidedef> tosort)
|
|
|
|
|
{
|
|
|
|
|
List<SortedVisualSide> result = new List<SortedVisualSide>();
|
|
|
|
|
|
|
|
|
|
// Sort by texture
|
|
|
|
|
Dictionary<long, List<BaseVisualGeometrySidedef>> sidesbytexture = new Dictionary<long, List<BaseVisualGeometrySidedef>>();
|
|
|
|
|
foreach (BaseVisualGeometrySidedef side in tosort)
|
|
|
|
|
{
|
|
|
|
|
long texturelong;
|
2015-03-10 18:49:29 +00:00
|
|
|
|
if(side is VisualLower) texturelong = side.Sidedef.LongLowTexture;
|
|
|
|
|
else if(side is VisualUpper) texturelong = side.Sidedef.LongHighTexture;
|
|
|
|
|
else if(side is VisualMiddle3D) texturelong = side.GetControlLinedef().Front.LongMiddleTexture;
|
2014-12-22 21:36:49 +00:00
|
|
|
|
else texturelong = side.Sidedef.LongMiddleTexture;
|
|
|
|
|
|
|
|
|
|
if(texturelong == MapSet.EmptyLongName) continue; //not interested...
|
|
|
|
|
|
|
|
|
|
if(!sidesbytexture.ContainsKey(texturelong)) sidesbytexture.Add(texturelong, new List<BaseVisualGeometrySidedef>());
|
|
|
|
|
sidesbytexture[texturelong].Add(side);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Connect sides
|
|
|
|
|
foreach (KeyValuePair<long, List<BaseVisualGeometrySidedef>> pair in sidesbytexture)
|
|
|
|
|
{
|
2014-12-23 12:32:08 +00:00
|
|
|
|
// Create strips
|
2015-01-12 18:18:48 +00:00
|
|
|
|
Dictionary<int, List<SortedVisualSide>> strips = ConnectSides(pair.Value);
|
2014-12-23 12:32:08 +00:00
|
|
|
|
|
|
|
|
|
// Calculate global bounds...
|
2015-01-12 18:18:48 +00:00
|
|
|
|
foreach(List<SortedVisualSide> group in strips.Values)
|
2014-12-23 12:32:08 +00:00
|
|
|
|
{
|
2015-01-12 18:18:48 +00:00
|
|
|
|
int minx = int.MaxValue;
|
|
|
|
|
int maxx = int.MinValue;
|
|
|
|
|
int miny = int.MaxValue;
|
|
|
|
|
int maxy = int.MinValue;
|
2014-12-23 12:32:08 +00:00
|
|
|
|
|
2015-01-12 18:18:48 +00:00
|
|
|
|
foreach(SortedVisualSide side in group)
|
|
|
|
|
{
|
|
|
|
|
if(side.Bounds.X < minx) minx = side.Bounds.X;
|
|
|
|
|
if(side.Bounds.X + side.Bounds.Width > maxx) maxx = side.Bounds.X + side.Bounds.Width;
|
|
|
|
|
if(side.Bounds.Y < miny) miny = side.Bounds.Y;
|
|
|
|
|
if(side.Bounds.Y + side.Bounds.Height > maxy) maxy = side.Bounds.Y + side.Bounds.Height;
|
|
|
|
|
}
|
2014-12-23 12:32:08 +00:00
|
|
|
|
|
2015-01-12 18:18:48 +00:00
|
|
|
|
Rectangle bounds = new Rectangle(minx, miny, maxx - minx, maxy - miny);
|
2014-12-23 12:32:08 +00:00
|
|
|
|
|
2015-01-12 18:18:48 +00:00
|
|
|
|
// Normalize Y-offset
|
|
|
|
|
int offsety = bounds.Y;
|
|
|
|
|
bounds.Y = 0;
|
|
|
|
|
|
|
|
|
|
// Apply changes
|
|
|
|
|
foreach(SortedVisualSide side in group)
|
|
|
|
|
{
|
|
|
|
|
side.Bounds.Y -= offsety;
|
|
|
|
|
side.GlobalBounds = bounds;
|
|
|
|
|
}
|
2014-12-23 12:32:08 +00:00
|
|
|
|
|
2015-01-12 18:18:48 +00:00
|
|
|
|
// Add to result
|
|
|
|
|
result.AddRange(group);
|
|
|
|
|
}
|
2014-12-22 21:36:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-12 18:18:48 +00:00
|
|
|
|
// Connect sides, left to right and sort them into connected groups
|
2014-12-22 21:36:49 +00:00
|
|
|
|
// NextSides - sides connected to the right (Start) vertex,
|
|
|
|
|
// PreviousSides - sides connected to the left (End) vertex
|
2015-01-12 18:18:48 +00:00
|
|
|
|
private static Dictionary<int, List<SortedVisualSide>> ConnectSides(List<BaseVisualGeometrySidedef> allsides)
|
2014-12-22 21:36:49 +00:00
|
|
|
|
{
|
2015-01-12 18:18:48 +00:00
|
|
|
|
Dictionary<int, List<SortedVisualSide>> result = new Dictionary<int, List<SortedVisualSide>>();
|
2014-12-22 21:36:49 +00:00
|
|
|
|
List<SortedVisualSide> sides = new List<SortedVisualSide>(allsides.Count);
|
2015-01-12 18:18:48 +00:00
|
|
|
|
int groupindex = 0;
|
|
|
|
|
|
2014-12-22 21:36:49 +00:00
|
|
|
|
foreach (BaseVisualGeometrySidedef side in allsides)
|
|
|
|
|
{
|
|
|
|
|
sides.Add(new SortedVisualSide(side));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach(SortedVisualSide curside in sides)
|
|
|
|
|
{
|
2015-01-12 18:18:48 +00:00
|
|
|
|
if(curside.GroupIndex == -1) curside.GroupIndex = groupindex++;
|
|
|
|
|
|
2014-12-22 21:36:49 +00:00
|
|
|
|
// Find sides connected to the end of curside
|
|
|
|
|
foreach(SortedVisualSide nextside in sides)
|
|
|
|
|
{
|
|
|
|
|
if(curside.Index == nextside.Index) continue;
|
|
|
|
|
if(nextside.Start == curside.End && nextside.End != curside.Start)
|
|
|
|
|
{
|
|
|
|
|
// Add both ways
|
2015-01-12 18:18:48 +00:00
|
|
|
|
if(!nextside.PreviousSides.ContainsKey(curside))
|
|
|
|
|
{
|
|
|
|
|
nextside.PreviousSides.Add(curside, false);
|
|
|
|
|
nextside.GroupIndex = curside.GroupIndex;
|
|
|
|
|
}
|
|
|
|
|
if(!curside.NextSides.ContainsKey(nextside))
|
|
|
|
|
{
|
|
|
|
|
curside.NextSides.Add(nextside, false);
|
|
|
|
|
nextside.GroupIndex = curside.GroupIndex;
|
|
|
|
|
}
|
2014-12-22 21:36:49 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Find sides connected to the start of curside
|
|
|
|
|
foreach(SortedVisualSide prevside in sides)
|
|
|
|
|
{
|
|
|
|
|
if(curside.Index == prevside.Index) continue;
|
|
|
|
|
if(prevside.End == curside.Start && prevside.Start != curside.End)
|
|
|
|
|
{
|
|
|
|
|
// Add both ways
|
2015-01-12 18:18:48 +00:00
|
|
|
|
if(!prevside.NextSides.ContainsKey(curside))
|
|
|
|
|
{
|
|
|
|
|
prevside.NextSides.Add(curside, false);
|
|
|
|
|
prevside.GroupIndex = curside.GroupIndex;
|
|
|
|
|
}
|
|
|
|
|
if(!curside.PreviousSides.ContainsKey(prevside))
|
|
|
|
|
{
|
|
|
|
|
curside.PreviousSides.Add(prevside, false);
|
|
|
|
|
prevside.GroupIndex = curside.GroupIndex;
|
|
|
|
|
}
|
2014-12-22 21:36:49 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-12 18:18:48 +00:00
|
|
|
|
// Add to collection
|
|
|
|
|
if(!result.ContainsKey(curside.GroupIndex)) result.Add(curside.GroupIndex, new List<SortedVisualSide>());
|
|
|
|
|
result[curside.GroupIndex].Add(curside);
|
2014-12-22 21:36:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Try to find the left-most side
|
2015-01-12 18:18:48 +00:00
|
|
|
|
foreach(KeyValuePair<int, List<SortedVisualSide>> pair in result)
|
2014-12-22 21:36:49 +00:00
|
|
|
|
{
|
2015-01-12 18:18:48 +00:00
|
|
|
|
SortedVisualSide start = pair.Value[0];
|
|
|
|
|
foreach(SortedVisualSide side in pair.Value)
|
2014-12-22 21:36:49 +00:00
|
|
|
|
{
|
2015-01-12 18:18:48 +00:00
|
|
|
|
if(side.PreviousSides.Count == 0) {
|
|
|
|
|
start = side;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2014-12-22 21:36:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-01-12 18:18:48 +00:00
|
|
|
|
// Set horizontal offsets...
|
|
|
|
|
ApplyHorizontalOffset(start, null, true, new Dictionary<int, bool>());
|
|
|
|
|
}
|
2014-12-22 21:36:49 +00:00
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void ApplyHorizontalOffset(SortedVisualSide side, SortedVisualSide prevside, bool forward, Dictionary<int, bool> processed)
|
|
|
|
|
{
|
|
|
|
|
// Set offset
|
|
|
|
|
if (!processed.ContainsKey(side.Index))
|
|
|
|
|
{
|
|
|
|
|
if (prevside != null)
|
|
|
|
|
{
|
|
|
|
|
if (forward)
|
|
|
|
|
side.Bounds.X = prevside.Bounds.X + (int)Math.Round(prevside.Side.Sidedef.Line.Length);
|
|
|
|
|
else
|
|
|
|
|
side.Bounds.X = prevside.Bounds.X - (int)Math.Round(side.Side.Sidedef.Line.Length);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
processed.Add(side.Index, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Repeat for NextSides
|
|
|
|
|
foreach (KeyValuePair<SortedVisualSide, bool> pair in side.NextSides)
|
|
|
|
|
{
|
|
|
|
|
if (!processed.ContainsKey(pair.Key.Index))
|
|
|
|
|
ApplyHorizontalOffset(pair.Key, side, true, processed);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Repeat for PreviousSides
|
|
|
|
|
foreach(KeyValuePair<SortedVisualSide, bool> pair in side.PreviousSides)
|
|
|
|
|
{
|
|
|
|
|
if(!processed.ContainsKey(pair.Key.Index))
|
|
|
|
|
ApplyHorizontalOffset(pair.Key, side, false, processed);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-18 22:06:35 +00:00
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|