X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=lib%2Fspecial%2Fsprite.h;h=184e2f60f672e08789d5dd1b7aaebd80fb79718d;hb=09cabd98fefc508488b696552107f11336f80493;hp=fdf83a5af55a684e7e4cabd79bfc561921eb7a8a;hpb=add0f0d960ae9c5e539f401efdaa9da4f157555e;p=supertux.git diff --git a/lib/special/sprite.h b/lib/special/sprite.h index fdf83a5af..184e2f60f 100644 --- a/lib/special/sprite.h +++ b/lib/special/sprite.h @@ -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(); @@ -66,10 +66,13 @@ namespace SuperTux 0 - stopped 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; } @@ -116,6 +119,7 @@ namespace SuperTux Actions actions; Action* action; + std::string next_action; }; } //namespace SuperTux