aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/Texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/facade/Texture.cpp')
-rw-r--r--src/crepe/facade/Texture.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/crepe/facade/Texture.cpp b/src/crepe/facade/Texture.cpp
index 220ef2e..b4e3aa8 100644
--- a/src/crepe/facade/Texture.cpp
+++ b/src/crepe/facade/Texture.cpp
@@ -27,9 +27,13 @@ Texture::~Texture(){
void Texture::load(std::unique_ptr<api::Resource> res) {
dbg_trace();
SdlContext& ctx = SdlContext::get_instance();
- m_texture = ctx.setTextureFromPath(res->canonical());
+ m_texture = ctx.setTextureFromPath(res->canonical(), srcrect, 1, 1);
}
SDL_Texture* Texture::get_texture() const{
return m_texture;
}
+
+SDL_Rect& Texture::get_rect() {
+ return srcrect;
+}