From 35224c07549448e919a18a463e5dec81bbabf7c6 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Wed, 25 Sep 2024 13:07:13 +0200 Subject: spritesheet and image changed --- resource-manager/spritesheet.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'resource-manager/spritesheet.h') 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 #include #include #include -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; }; -- cgit v1.2.3