Compare commits
2 Commits
c08defc656
...
f7567686b3
Author | SHA1 | Date | |
---|---|---|---|
f7567686b3 | |||
4c2437e1ac |
@ -91,18 +91,24 @@ namespace SemiColinGames {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("DEBUG")]
|
[System.Diagnostics.Conditional("DEBUG")]
|
||||||
public static void AddLine(Point start, Point end, Color color) {
|
public static void AddPoint(Point p, Color color) {
|
||||||
if (lineIdx >= MAX_LINE_VERTICES) {
|
AddLine(p.X, p.Y - 2, p.X, p.Y + 1, color);
|
||||||
return;
|
AddLine(p.X - 2, p.Y, p.X + 1, p.Y, color);
|
||||||
}
|
|
||||||
lineVertices[lineIdx] = new VertexPositionColor(new Vector3(start.X, start.Y, 0), color);
|
|
||||||
lineVertices[lineIdx + 1] = new VertexPositionColor(new Vector3(end.X, end.Y, 0), color);
|
|
||||||
lineIdx += 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("DEBUG")]
|
[System.Diagnostics.Conditional("DEBUG")]
|
||||||
public static void AddLine(int p1x, int p1y, int p2x, int p2y, Color color) {
|
public static void AddLine(int p1x, int p1y, int p2x, int p2y, Color color) {
|
||||||
AddLine(new Point(p1x, p1y), new Point(p2x, p2y), color);
|
if (lineIdx >= MAX_LINE_VERTICES) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
lineVertices[lineIdx] = new VertexPositionColor(new Vector3(p1x, p1y, 0), color);
|
||||||
|
lineVertices[lineIdx + 1] = new VertexPositionColor(new Vector3(p2x, p2y, 0), color);
|
||||||
|
lineIdx += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.Conditional("DEBUG")]
|
||||||
|
public static void AddLine(Point start, Point end, Color color) {
|
||||||
|
AddLine(start.X, start.Y, end.X, end.Y, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("DEBUG")]
|
[System.Diagnostics.Conditional("DEBUG")]
|
||||||
|
Loading…
Reference in New Issue
Block a user