BarotraumaServer compiles
Cleanup + fixes coming up next
This commit is contained in:
@@ -139,24 +139,24 @@ namespace Barotrauma.RuinGeneration
|
||||
}
|
||||
}
|
||||
|
||||
struct Line
|
||||
struct Line
|
||||
{
|
||||
public readonly Vector2 A, B;
|
||||
|
||||
public readonly RuinStructureType Type;
|
||||
|
||||
public Line(Vector2 a, Vector2 b, RuinStructureType type)
|
||||
{
|
||||
public readonly Vector2 A, B;
|
||||
Debug.Assert(a.X <= b.X);
|
||||
Debug.Assert(a.Y <= b.Y);
|
||||
|
||||
public readonly RuinStructureType Type;
|
||||
A = a;
|
||||
B = b;
|
||||
Type = type;
|
||||
}
|
||||
}
|
||||
|
||||
public Line(Vector2 a, Vector2 b, RuinStructureType type)
|
||||
{
|
||||
Debug.Assert(a.X <= b.X);
|
||||
Debug.Assert(a.Y <= b.Y);
|
||||
|
||||
A = a;
|
||||
B = b;
|
||||
Type = type;
|
||||
}
|
||||
}
|
||||
|
||||
class Ruin
|
||||
partial class Ruin
|
||||
{
|
||||
private List<BTRoom> rooms;
|
||||
private List<Corridor> corridors;
|
||||
@@ -449,24 +449,5 @@ namespace Barotrauma.RuinGeneration
|
||||
|
||||
return shapes;
|
||||
}
|
||||
|
||||
public void Draw(SpriteBatch spriteBatch)
|
||||
{
|
||||
//foreach (BTRoom room in leaves)
|
||||
//{
|
||||
// GUI.DrawRectangle(spriteBatch, room.Rect, Color.White);
|
||||
//}
|
||||
|
||||
//foreach (Corridor corr in corridors)
|
||||
//{
|
||||
// GUI.DrawRectangle(spriteBatch, corr.Rect, Color.Blue);
|
||||
//}
|
||||
|
||||
foreach (Line line in walls)
|
||||
{
|
||||
GUI.DrawLine(spriteBatch, new Vector2(line.A.X, -line.A.Y), new Vector2(line.B.X, -line.B.Y), Color.Red, 0.0f, 10);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,10 @@ using Voronoi2;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
class WrappingWall : IDisposable
|
||||
partial class WrappingWall : IDisposable
|
||||
{
|
||||
public const float WallWidth = 20000.0f;
|
||||
|
||||
private VertexBuffer wallVertices, bodyVertices;
|
||||
|
||||
private Vector2 midPos;
|
||||
private int slot;
|
||||
|
||||
@@ -23,16 +21,6 @@ namespace Barotrauma
|
||||
|
||||
private List<VoronoiCell> cells;
|
||||
|
||||
public VertexBuffer WallVertices
|
||||
{
|
||||
get { return wallVertices; }
|
||||
}
|
||||
|
||||
public VertexBuffer BodyVertices
|
||||
{
|
||||
get { return bodyVertices; }
|
||||
}
|
||||
|
||||
public Vector2 Offset
|
||||
{
|
||||
get { return offset; }
|
||||
@@ -110,20 +98,7 @@ namespace Barotrauma
|
||||
cells.Add(wallCell);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetWallVertices(VertexPositionTexture[] vertices)
|
||||
{
|
||||
wallVertices = new VertexBuffer(GameMain.Instance.GraphicsDevice, VertexPositionTexture.VertexDeclaration, vertices.Length, BufferUsage.WriteOnly);
|
||||
wallVertices.SetData(vertices);
|
||||
}
|
||||
|
||||
public void SetBodyVertices(VertexPositionColor[] vertices)
|
||||
{
|
||||
bodyVertices = new VertexBuffer(GameMain.Instance.GraphicsDevice, VertexPositionColor.VertexDeclaration, vertices.Length, BufferUsage.WriteOnly);
|
||||
bodyVertices.SetData(vertices);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void UpdateWallShift(Vector2 pos, WrappingWall[,] walls)
|
||||
{
|
||||
if (pos.X < walls[0, 1].midPos.X && walls[0,0].midPos.X > pos.X)
|
||||
@@ -186,6 +161,7 @@ namespace Barotrauma
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
#if CLIENT
|
||||
if (wallVertices != null)
|
||||
{
|
||||
wallVertices.Dispose();
|
||||
@@ -196,6 +172,7 @@ namespace Barotrauma
|
||||
bodyVertices.Dispose();
|
||||
bodyVertices = null;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user