Renamed code variables, as well.
[supertux.git] / lib / special / sprite.h
index 54f3476..184e2f6 100644 (file)
@@ -39,8 +39,8 @@ namespace SuperTux
         {
         std::string name;
 
-        int x_hotspot;
-        int y_hotspot;
+        int x_offset;
+        int y_offset;
 
         /** Frames per second */
         float fps;
@@ -49,8 +49,8 @@ namespace SuperTux
         };
 
     public:
-      /** cur has to be a pointer to data in the form of ((x-hotspot 5)
-          (y-hotspot 10) ...) */
+      /** cur has to be a pointer to data in the form of ((x-offset 5)
+          (y-offset 10) ...) */
       Sprite(lisp_object_t* cur);
       ~Sprite();
 
@@ -64,13 +64,15 @@ namespace SuperTux
       /* Start an animation
           -1 - for infinite
           0  - stopped
-          1,2,3  - one, two, three times...
-          If next_act specified, that action will be used when animation ends. */
-      void start_animation(int loops, std::string next_act = "");
+          1,2,3  - one, two, three times... */
+      void start_animation(int loops);
+      /* Stop animation */
+      void stop_animation()
+        { start_animation(0); }
       /** Check if animation is stopped or not */
       bool check_animation();
       /** Reverse the animation */
-      void reverse_animation();
+      void reverse_animation(bool reverse);
 
       float get_fps()
         { return action->fps; }
@@ -117,7 +119,7 @@ namespace SuperTux
       Actions actions;
 
       Action* action;
-      std::string next_action;
+     std::string next_action;
     };
 
 } //namespace SuperTux