Removed vertical flipping drawing hacks.
[supertux.git] / src / sprite.h
index c174396..2a4acf3 100644 (file)
@@ -24,6 +24,9 @@
 #include <vector>
 #include "lispreader.h"
 #include "texture.h"
+#include "vector.h"
+
+enum SpecialDrawing { SD_NONE, SD_VERTICAL_FLIP, SD_SEMI_TRANSPARENT };
 
 class Sprite
 {
@@ -49,15 +52,22 @@ class Sprite
   /** cur has to be a pointer to data in the form of ((x-hotspot 5)
       (y-hotspot 10) ...) */
   Sprite(lisp_object_t* cur);
+  ~Sprite();
   
   void reset();
 
   /** Update the sprite and process to the next frame */
   void update(float delta);
-  void draw(float x, float y);
-
+  void draw(float x, float y, int special_drawing = SD_NONE);
+  void draw_part(float sx, float sy, float x, float y, float w, float h);
   int get_current_frame() const;
 
+  float get_fps() { return fps; } ;
+  int get_frames() { return surfaces.size(); } ;
+
+  void draw(const Vector& pos, int special_drawing = SD_NONE)
+  { draw(pos.x, pos.y, special_drawing); }
+
   std::string get_name() const { return name; } 
   int get_width() const;
   int get_height() const;