aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/Texture.h')
-rw-r--r--src/crepe/api/Texture.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/crepe/api/Texture.h b/src/crepe/api/Texture.h
index db2f1f9..b376b44 100644
--- a/src/crepe/api/Texture.h
+++ b/src/crepe/api/Texture.h
@@ -1,31 +1,32 @@
#pragma once
-#include "SDL_rect.h"
-#include "api/baseResource.h"
-#include "api/Resource.h"
+#include "Asset.h"
#include <SDL2/SDL_render.h>
#include <memory>
-namespace crepe {
+namespace crepe {
+ class SdlContext;
+}
+namespace crepe::api {
-class Texture : public api::BaseResource{
+class Texture {
public:
Texture(const char * src);
- Texture(std::unique_ptr<api::Resource> res);
+ Texture(std::unique_ptr<Asset> res);
~Texture();
- SDL_Texture* get_texture() const;
- SDL_Rect& get_rect() ;
+
private:
- void load(std::unique_ptr<api::Resource> res);
+ void load(std::unique_ptr<Asset> res);
+
private:
- SDL_Texture* m_texture;
- SDL_Rect srcrect;
+ SDL_Texture * m_texture = nullptr;
+
+ friend class crepe::SdlContext;
};
} // namespace crepe
-