diff --git a/sdlpp/sdlpp_renderobject.cpp b/sdlpp/sdlpp_renderobject.cpp index d894c6e..63e28d2 100644 --- a/sdlpp/sdlpp_renderobject.cpp +++ b/sdlpp/sdlpp_renderobject.cpp @@ -78,6 +78,9 @@ void RenderObject::setTexture( const std::shared_ptr< Texture > &t, texture = t; src_rect = source_rect; } +void RenderObject::setTextureKeepSRC( const std::shared_ptr< Texture > &t ) { + setTexture(t, src_rect); +} void RenderObject::setTexture( const std::shared_ptr< Texture > &t, int source_x, int source_y, int source_width, int source_height ) { diff --git a/sdlpp/sdlpp_renderobject.hpp b/sdlpp/sdlpp_renderobject.hpp index d67a1a9..915daa6 100644 --- a/sdlpp/sdlpp_renderobject.hpp +++ b/sdlpp/sdlpp_renderobject.hpp @@ -63,6 +63,7 @@ public: bool hasCollisions() const; const std::vector< std::shared_ptr< CollisionPolygon > > & getCollisions() const; + virtual void setTextureKeepSRC( const std::shared_ptr< Texture > &t ); virtual void setTexture( const std::shared_ptr< Texture > &t, int source_x, int source_y, int source_width, int source_height );