Removed the Resource and ResourcePtr classes

This commit is contained in:
Laurent Gomila 2011-11-05 15:50:44 +01:00
parent 46b2c096c4
commit 017ef652f9
15 changed files with 18 additions and 518 deletions

View file

@ -28,7 +28,6 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/Resource.hpp>
#include <SFML/System/Vector2.hpp>
#include <SFML/System/String.hpp>
#include <SFML/Graphics/Glyph.hpp>
@ -47,7 +46,7 @@ class InputStream;
/// \brief Class for loading and manipulating character fonts
///
////////////////////////////////////////////////////////////
class SFML_API Font : public Resource<Font>
class SFML_API Font
{
public :

View file

@ -28,7 +28,6 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/Resource.hpp>
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Rect.hpp>
@ -204,10 +203,10 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
ResourcePtr<Texture> myTexture; ///< Texture used to draw the sprite
IntRect mySubRect; ///< Sub-rectangle of source texture to assign to the sprite
bool myIsFlippedX; ///< Is the sprite flipped on the X axis ?
bool myIsFlippedY; ///< Is the sprite flipped on the Y axis ?
const Texture* myTexture; ///< Texture used to draw the sprite
IntRect mySubRect; ///< Sub-rectangle of source texture to assign to the sprite
bool myIsFlippedX; ///< Is the sprite flipped on the X axis ?
bool myIsFlippedY; ///< Is the sprite flipped on the Y axis ?
};
} // namespace sf

View file

@ -28,7 +28,6 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/Resource.hpp>
#include <SFML/System/String.hpp>
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Font.hpp>
@ -239,7 +238,7 @@ private :
// Member data
////////////////////////////////////////////////////////////
String myString; ///< String to display
ResourcePtr<Font> myFont; ///< Font used to display the string
const Font* myFont; ///< Font used to display the string
unsigned int myCharacterSize; ///< Base size of characters, in pixels
unsigned long myStyle; ///< Text style (see Style enum)
mutable FloatRect myBaseRect; ///< Bounding rectangle of the text in object coordinates

View file

@ -28,9 +28,8 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/Resource.hpp>
#include <SFML/Window/GlResource.hpp>
#include <SFML/Graphics/Image.hpp>
#include <SFML/Window/GlResource.hpp>
namespace sf
@ -44,7 +43,7 @@ class InputStream;
/// \brief Image living on the graphics card that can be used for drawing
///
////////////////////////////////////////////////////////////
class SFML_API Texture : public Resource<Texture>, GlResource
class SFML_API Texture : GlResource
{
public :