The Vertex struct is now recognized as POD by C++, also fixed the name to be consistent with other love structs

This commit is contained in:
Alex Szpakowski
2013-09-24 11:09:18 -03:00
parent 8d5ddb9e34
commit 5de43a7207
24 changed files with 127 additions and 129 deletions
+4 -25
View File
@@ -61,40 +61,19 @@
namespace love
{
struct vertex
struct Vertex
{
vertex()
: r(255), g(255), b(255), a(255)
, x(0), y(0)
, s(0), t(0)
{}
vertex(float x, float y,
float s, float t)
: r(255), g(255), b(255), a(255)
, x(x), y(y)
, s(s), t(t)
{}
vertex(float x, float y,
float s, float t,
unsigned char r, unsigned char g, unsigned char b, unsigned char a)
: r(r), g(g), b(b), a(a)
, x(x), y(y)
, s(s), t(t)
{}
unsigned char r, g, b, a;
float x, y;
float s, t;
unsigned char r, g, b, a;
};
struct Triangle
{
Triangle(const vertex &x, const vertex &y, const vertex &z)
Triangle(const Vertex &x, const Vertex &y, const Vertex &z)
: a(x), b(y), c(z)
{}
vertex a, b, c;
Vertex a, b, c;
};
inline int next_p2(int x)