Candle property warning to debug
[supertux.git] / src / video / surface.hpp
index ad1d9fe..0728081 100644 (file)
@@ -23,8 +23,8 @@
 #include "math/vector.hpp"
 #include "math/rect.hpp"
 #include "video/surface_ptr.hpp"
+#include "video/texture_ptr.hpp"
 
-class Texture;
 class SurfaceData;
 
 /** A rectangular image.  The class basically holds a reference to a
@@ -37,24 +37,26 @@ public:
   static SurfacePtr create(const std::string& file, const Rect& rect);
 
 private:
-  Texture* texture;
+  TexturePtr texture;
   SurfaceData* surface_data;
   Rect rect;
   bool flipx;
 
-public:
+private:
   Surface(const std::string& file);
   Surface(const std::string& file, const Rect& rect);
-  Surface(const Surface& other);
+  Surface(const Surface&);
+
+public:
   ~Surface();
 
-  const Surface& operator= (const Surface& other);
+  SurfacePtr clone() const;
 
   /** flip the surface horizontally */
   void hflip();
   bool get_flipx() const;
 
-  Texture *get_texture() const;
+  TexturePtr get_texture() const;
   SurfaceData* get_surface_data() const;
   int get_x() const;
   int get_y() const;
@@ -64,6 +66,9 @@ public:
 
   /** returns a vector containing width and height */
   Vector get_size() const;
+
+private:
+  Surface& operator=(const Surface&);
 };
 
 #endif