diff --git a/sdlpp/sdlpp_renderobject.cpp b/sdlpp/sdlpp_renderobject.cpp index 63e28d2..e4f5b32 100644 --- a/sdlpp/sdlpp_renderobject.cpp +++ b/sdlpp/sdlpp_renderobject.cpp @@ -120,7 +120,7 @@ void RenderObject::addMovement( double x, double y ) { void RenderObject::setMovement( double x, double y ) { movementDirection = { x, y }; } -Vec2D< double > RenderObject::getMovement() { +Vec2D< double > RenderObject::getMovement() const { return movementDirection; } void RenderObject::resetMovementX() { diff --git a/sdlpp/sdlpp_renderobject.hpp b/sdlpp/sdlpp_renderobject.hpp index 915daa6..e89ea9c 100644 --- a/sdlpp/sdlpp_renderobject.hpp +++ b/sdlpp/sdlpp_renderobject.hpp @@ -86,7 +86,7 @@ public: void setMovementSpeed( double speed ); void addMovement( double x, double y ); void setMovement( double x, double y ); - Vec2D< double > getMovement(); + Vec2D< double > getMovement() const; void resetMovementX(); void resetMovementY(); void clearColided();