Console logging is now identical in all builds; warning and error show the console...
[supertux.git] / src / supertux / tile.hpp
index 5efe599..60b3991 100644 (file)
@@ -21,7 +21,7 @@
 #include <vector>
 #include <stdint.h>
 
-#include "math/rect.hpp"
+#include "math/rectf.hpp"
 #include "video/surface.hpp"
 #include "util/reader_fwd.hpp"
 
@@ -31,8 +31,7 @@ class DrawingContext;
 class Tile
 {
 public:
-  friend class TileSetParser;
-  
+  static bool draw_editor_images;
   /// bitset for tile attributes
   enum {
     /** solid tile that is indestructible by Tux */
@@ -85,18 +84,20 @@ public:
   };
 
   struct ImageSpec {
-    ImageSpec(const std::string& newfile, const Rect& newrect)
+    ImageSpec(const std::string& newfile, const Rectf& newrect)
       : file(newfile), rect(newrect)
     { }
 
     std::string file;
-    Rect rect;
+    Rectf rect;
   };
 
 private:
   const TileSet&         tileset;
   std::vector<ImageSpec> imagespecs;
-  std::vector<Surface*>  images;
+  std::vector<SurfacePtr>  images;
+  std::vector<ImageSpec> editor_imagespecs;
+  std::vector<SurfacePtr>  editor_images;
 
   /// tile attributes
   uint32_t attributes;
@@ -104,12 +105,12 @@ private:
   /** General purpose data attached to a tile (content of a box, type of coin)*/
   int data;
 
-  float anim_fps;
+  float fps;
 
 public:
   Tile(const TileSet& tileset);
-  Tile(const TileSet& tileset, const std::vector<std::string>& images, Rect rect,
-       uint32_t attributes, uint32_t data, float animfps);
+  Tile(const TileSet& tileset, const std::vector<ImageSpec>& images, const std::vector<ImageSpec>& editor_images,
+       uint32_t attributes, uint32_t data, float fps);
   ~Tile();
 
   /** load Surfaces, if not already loaded */