diff options
Diffstat (limited to 'src/resources.h')
| -rw-r--r-- | src/resources.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/resources.h b/src/resources.h index eef1883..edc1fec 100644 --- a/src/resources.h +++ b/src/resources.h @@ -3,5 +3,18 @@ #include "raylib.h" namespace Resources { - Texture useTexture(std::string id); + Texture useTexture(std::string id); + class Sprite { + public: + std::string texture_name; + Rectangle source_rectangle; + Vector2 origin; + + Sprite(std::string texture_name, + Rectangle source_rectangle, + Vector2 origin = (Vector2){0,0} + ); + void drawPro(Rectangle dest_rectangle, float rotation = 0, Color color = WHITE); + void draw(float x, float y, float scale = 1.0, float rotation = 0, Color color = WHITE); + }; } |
