sfTransform is no longer a wrapper around a sf::Transform*, it is a simple structure

This commit is contained in:
Laurent Gomila committed 2012-05-22 17:56:01 +02:00
1 parent bf614690ad
commit bfebe0aab4
30 files changed
+179 -159

No files matched your search

+7 -6
View File
@@ -28,6 +28,7 @@
#include <SFML/Graphics/Shape.h>
#include <SFML/Graphics/ShapeStruct.h>
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/ConvertTransform.hpp>
#include <SFML/Internal.h>
@@ -146,22 +147,22 @@ void sfShape_scale(sfShape* shape, sfVector2f factors)
////////////////////////////////////////////////////////////
const sfTransform* sfShape_getTransform(const sfShape* shape)
sfTransform sfShape_getTransform(const sfShape* shape)
{
CSFML_CHECK_RETURN(shape, NULL);
shape->Transform.This = shape->This.getTransform();
return &shape->Transform;
shape->Transform = convertTransform(shape->This.getTransform());
return shape->Transform;
}
////////////////////////////////////////////////////////////
const sfTransform* sfShape_getInverseTransform(const sfShape* shape)
sfTransform sfShape_getInverseTransform(const sfShape* shape)
{
CSFML_CHECK_RETURN(shape, NULL);
shape->InverseTransform.This = shape->This.getInverseTransform();
return &shape->InverseTransform;
shape->InverseTransform = convertTransform(shape->This.getInverseTransform());
return shape->InverseTransform;
}