make nogl work for resolutions other than 800x600
[supertux.git] / src / sprite / sprite.hpp
index a43df0a..a3edb33 100644 (file)
@@ -22,7 +22,6 @@
 
 #include <string>
 #include <assert.h>
-#include <SDL.h>
 
 #include "math/vector.hpp"
 #include "math/rect.hpp"
@@ -32,7 +31,6 @@
 
 class Surface;
 class DrawingContext;
-class Color;
 class Blend;
 
 class Sprite
@@ -109,14 +107,14 @@ public:
   { return (int)frame; }
   /** Set current frame */
   void set_frame(int frame)
-  { 
-    this->frame = (frame % get_frames()); 
+  {
+    this->frame = (float) (frame % get_frames());
   }
   Surface* get_frame(unsigned int frame)
   {
     assert(frame < action->surfaces.size());
     return action->surfaces[frame];
-  }    
+  }
 
 private:
   void update();
@@ -134,4 +132,3 @@ private:
 };
 
 #endif
-