From c54975288f6b6fbbe3f90117116bbc87111bad13 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Mon, 20 Feb 2012 20:21:54 +0100 Subject: [PATCH] Updated sfTransform_Combine --- include/SFML/Graphics/Transform.h | 9 ++++----- src/SFML/Graphics/Transform.cpp | 8 +++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/SFML/Graphics/Transform.h b/include/SFML/Graphics/Transform.h index eca7959..6e34e21 100644 --- a/include/SFML/Graphics/Transform.h +++ b/include/SFML/Graphics/Transform.h @@ -144,15 +144,14 @@ CSFML_GRAPHICS_API void sfTransform_TransformRect(const sfTransform* transform, /// \brief Combine two transforms /// /// The result is a transform that is equivalent to applying -/// \a left followed by \a right. Mathematically, it is +/// \a transform followed by \a other. Mathematically, it is /// equivalent to a matrix multiplication. /// -/// \param left First transform to combine -/// \param right Second transform to combine -/// \param result Result of the operation (must point to a valid sfTransform instance) +/// \param transform Transform object +/// \param right Transform to combine to \a transform /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API void sfTransform_Combine(const sfTransform* left, const sfTransform* right, sfTransform* result); +CSFML_GRAPHICS_API void sfTransform_Combine(sfTransform* transform, const sfTransform* other); //////////////////////////////////////////////////////////// /// \brief Combine a transform with a translation diff --git a/src/SFML/Graphics/Transform.cpp b/src/SFML/Graphics/Transform.cpp index 3bed72b..b04d17f 100644 --- a/src/SFML/Graphics/Transform.cpp +++ b/src/SFML/Graphics/Transform.cpp @@ -113,13 +113,11 @@ void sfTransform_TransformRect(const sfTransform* transform, sfFloatRect rectang //////////////////////////////////////////////////////////// -void sfTransform_Combine(const sfTransform* left, const sfTransform* right, sfTransform* result) +void sfTransform_Combine(sfTransform* transform, const sfTransform* other) { - CSFML_CHECK(left); - CSFML_CHECK(right); + CSFML_CHECK(other); - if (result) - result->This = left->This.Combine(right->This); + CSFML_CALL(transform, Combine(other->This)); }