mirror of
https://github.com/MaddyThorson/StrawberryBF.git
synced 2024-11-29 17:08:55 +08:00
Batcher helpers
This commit is contained in:
parent
ce684b1d16
commit
8747ae1cab
|
@ -34,6 +34,23 @@ namespace Strawberry
|
||||||
Rect(rect.X, rect.Y, rect.Width, rect.Height, color);
|
Rect(rect.X, rect.Y, rect.Width, rect.Height, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Tri(Vector a, Vector b, Vector c, Color color)
|
||||||
|
{
|
||||||
|
PushTri(.Shape, null,
|
||||||
|
.Shape(a, color),
|
||||||
|
.Shape(b, color),
|
||||||
|
.Shape(c, color));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Quad(Vector a, Vector b, Vector c, Vector d, Color color)
|
||||||
|
{
|
||||||
|
PushQuad(.Shape, null,
|
||||||
|
.Shape(a, color),
|
||||||
|
.Shape(b, color),
|
||||||
|
.Shape(c, color),
|
||||||
|
.Shape(d, color));
|
||||||
|
}
|
||||||
|
|
||||||
public void Tex(Texture texture, float x, float y)
|
public void Tex(Texture texture, float x, float y)
|
||||||
{
|
{
|
||||||
PushQuad(.TextureTint, texture,
|
PushQuad(.TextureTint, texture,
|
||||||
|
|
|
@ -99,5 +99,10 @@ namespace Strawberry
|
||||||
{
|
{
|
||||||
return Point(a.X / b.X, a.Y / b.Y);
|
return Point(a.X / b.X, a.Y / b.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static public Point operator*(Point a, Facings f)
|
||||||
|
{
|
||||||
|
return .(a.X * (int)f, a.Y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user