X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsprite.h;h=62dba8f198248cec3a2296e02543bf3f7ef95c3f;hb=4b985b51e7d2da923d53a61bb5038d11978e9cda;hp=b85cedda814f6e1e409143bb54299e254f8da1ef;hpb=835fe9710c67ec76af43e74ec601955693924c2a;p=supertux.git diff --git a/src/sprite.h b/src/sprite.h index b85cedda8..62dba8f19 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -23,11 +23,9 @@ #include #include #include "lispreader.h" -#include "texture.h" +#include "screen/texture.h" #include "vector.h" -enum SpecialDrawing { SD_NONE, SD_VERTICAL_FLIP, SD_SEMI_TRANSPARENT }; - class Sprite { private: @@ -58,12 +56,12 @@ class Sprite /** Update the sprite and process to the next frame */ void update(float delta); - 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); + void draw(DrawingContext& context, const Vector& pos, int layer, + uint32_t drawing_effect = NONE_EFFECT); int get_current_frame() const; - void draw(const Vector& pos, int special_drawing = SD_NONE) - { draw(pos.x, pos.y, special_drawing); } + float get_fps() { return fps; } ; + int get_frames() { return surfaces.size(); } ; std::string get_name() const { return name; } int get_width() const;