Skip to content

Commit

Permalink
Implement quad drawing.
Browse files Browse the repository at this point in the history
Most effects seem to work now
  • Loading branch information
PJB3005 committed Aug 13, 2021
1 parent 7c8f808 commit 4a438ca
Show file tree
Hide file tree
Showing 4 changed files with 255 additions and 73 deletions.
5 changes: 4 additions & 1 deletion Drizzle.Lingo.Runtime/Data/LingoPoint.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Numerics;

namespace Drizzle.Lingo.Runtime
{
Expand All @@ -11,6 +12,8 @@ public struct LingoPoint : IEquatable<LingoPoint>
public LingoDecimal loch;
public LingoDecimal locv;

public Vector2 AsVector2 => new((float)loch.Value, (float)locv.Value);

public LingoPoint(int loch, int locv)
{
this.loch = loch;
Expand Down Expand Up @@ -65,7 +68,7 @@ public LingoPoint(LingoDecimal loch, LingoDecimal locv)

public static LingoPoint operator -(LingoPoint a)
{
return new LingoPoint(a.loch, a.locv);
return new LingoPoint(-a.loch, -a.locv);
}

public int inside(LingoRect rect)
Expand Down
Loading

0 comments on commit 4a438ca

Please sign in to comment.