diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-09-25 13:07:13 +0200 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-09-25 13:07:13 +0200 |
commit | 35224c07549448e919a18a463e5dec81bbabf7c6 (patch) | |
tree | 6c9dea5b449625b057511f7f052842ab3cd1d7e8 /resource-manager/spritesheet.h | |
parent | 765485ced528ca2f4cf644a1503b9446c5826731 (diff) |
spritesheet and image changed
Diffstat (limited to 'resource-manager/spritesheet.h')
-rw-r--r-- | resource-manager/spritesheet.h | 14 |
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; }; |