aboutsummaryrefslogtreecommitdiff
path: root/resource-manager/spritesheet.h
diff options
context:
space:
mode:
Diffstat (limited to 'resource-manager/spritesheet.h')
-rw-r--r--resource-manager/spritesheet.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/resource-manager/spritesheet.h b/resource-manager/spritesheet.h
index 022b6cf..be1a051 100644
--- a/resource-manager/spritesheet.h
+++ b/resource-manager/spritesheet.h
@@ -3,17 +3,23 @@
+#include "Image_asset.h"
+#include "resource.h"
#include <SDL_rect.h>
#include <SDL_render.h>
#include <SDL_surface.h>
#include <string>
-class SpriteSheet{
+
+
+class SpriteSheet : public Resource{
public:
- SpriteSheet(const std::string& path, SDL_Renderer& renderer, const int row, const int column);
+ SpriteSheet(const std::string& path);
~SpriteSheet();
+ void set_spritesheet_data(SDL_Renderer& renderer, const int row, const int column);
+
void select_sprite(const int x, const int y);
void draw_selected_sprite(SDL_Renderer* window_surface, SDL_Rect* position);
@@ -21,7 +27,5 @@ public:
private:
SDL_Rect m_clip;
- SDL_Surface* m_spritesheet_image;
- SDL_Texture * texture;
-
+ Texture* m_spritesheet;
};