Noticed GFX2D PGEX was incorrect file
This commit is contained in:
parent
9ba885222f
commit
a72d296c14
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
+-------------------------------------------------------------+
|
+-------------------------------------------------------------+
|
||||||
| OneLoneCoder Pixel Game Engine Extension |
|
| OneLoneCoder Pixel Game Engine Extension |
|
||||||
| Advanced 2D Rendering - v0.4 |
|
| Advanced 2D Rendering - v0.5 |
|
||||||
+-------------------------------------------------------------+
|
+-------------------------------------------------------------+
|
||||||
|
|
||||||
What is this?
|
What is this?
|
||||||
@ -86,30 +86,30 @@ namespace olc
|
|||||||
class Transform2D
|
class Transform2D
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
inline Transform2D();
|
Transform2D();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Set this transformation to unity
|
// Set this transformation to unity
|
||||||
inline void Reset();
|
void Reset();
|
||||||
// Append a rotation of fTheta radians to this transform
|
// Append a rotation of fTheta radians to this transform
|
||||||
inline void Rotate(float fTheta);
|
void Rotate(float fTheta);
|
||||||
// Append a translation (ox, oy) to this transform
|
// Append a translation (ox, oy) to this transform
|
||||||
inline void Translate(float ox, float oy);
|
void Translate(float ox, float oy);
|
||||||
// Append a scaling operation (sx, sy) to this transform
|
// Append a scaling operation (sx, sy) to this transform
|
||||||
inline void Scale(float sx, float sy);
|
void Scale(float sx, float sy);
|
||||||
// Append a shear operation (sx, sy) to this transform
|
// Append a shear operation (sx, sy) to this transform
|
||||||
inline void Shear(float sx, float sy);
|
void Shear(float sx, float sy);
|
||||||
|
|
||||||
inline void Perspective(float ox, float oy);
|
void Perspective(float ox, float oy);
|
||||||
// Calculate the Forward Transformation of the coordinate (in_x, in_y) -> (out_x, out_y)
|
// Calculate the Forward Transformation of the coordinate (in_x, in_y) -> (out_x, out_y)
|
||||||
inline void Forward(float in_x, float in_y, float &out_x, float &out_y);
|
void Forward(float in_x, float in_y, float &out_x, float &out_y);
|
||||||
// Calculate the Inverse Transformation of the coordinate (in_x, in_y) -> (out_x, out_y)
|
// Calculate the Inverse Transformation of the coordinate (in_x, in_y) -> (out_x, out_y)
|
||||||
inline void Backward(float in_x, float in_y, float &out_x, float &out_y);
|
void Backward(float in_x, float in_y, float &out_x, float &out_y);
|
||||||
// Regenerate the Inverse Transformation
|
// Regenerate the Inverse Transformation
|
||||||
inline void Invert();
|
void Invert();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
inline void Multiply();
|
void Multiply();
|
||||||
float matrix[4][3][3];
|
float matrix[4][3][3];
|
||||||
int nTargetMatrix;
|
int nTargetMatrix;
|
||||||
int nSourceMatrix;
|
int nSourceMatrix;
|
||||||
@ -118,13 +118,13 @@ namespace olc
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// Draws a sprite with the transform applied
|
// Draws a sprite with the transform applied
|
||||||
inline static void DrawSprite(olc::Sprite *sprite, olc::GFX2D::Transform2D &transform);
|
static void DrawSprite(olc::Sprite *sprite, olc::GFX2D::Transform2D &transform);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef OLC_PGE_GRAPHICS2D
|
#ifdef OLC_PGEX_GRAPHICS2D
|
||||||
#undef OLC_PGE_GRAPHICS2D
|
#undef OLC_PGEX_GRAPHICS2D
|
||||||
|
|
||||||
namespace olc
|
namespace olc
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user