diff options
Diffstat (limited to 'src/resources.cpp')
| -rw-r--r-- | src/resources.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/resources.cpp b/src/resources.cpp index 8a820b5..9d1834a 100644 --- a/src/resources.cpp +++ b/src/resources.cpp @@ -2,7 +2,7 @@ #include <string> #include <stdexcept> #include "raylib.h" -#include "resources.h" +#include "resources.hpp" namespace Resources { static std::unordered_map<std::string, std::string> textureFiles = { @@ -25,30 +25,4 @@ namespace Resources { return texture; } - Sprite::Sprite(std::string texture_name, - Rectangle source_rectangle, - Vector2 origin - ):texture_name(texture_name), - source_rectangle(source_rectangle), - origin(origin){ - - } - - void Sprite::drawPro(Rectangle dest_rectangle, float rotation, Color color) { - DrawTexturePro(useTexture(texture_name), - source_rectangle, - dest_rectangle, - origin, - rotation, - color); - } - - void Sprite::draw(float x, float y, float scale, float rotation, Color color) { - DrawTexturePro(useTexture(texture_name), - source_rectangle, - (Rectangle){x,y,source_rectangle.width * scale,source_rectangle.height * scale}, - origin, - rotation, - color); - } } |
