X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsprite.h;h=62dba8f198248cec3a2296e02543bf3f7ef95c3f;hb=4b985b51e7d2da923d53a61bb5038d11978e9cda;hp=2a4acf355fff72343c2475a281e7bfcbdaab3eaa;hpb=73d5a49c30eea598c9d3c06b69dbbbcd0d315dd1;p=supertux.git diff --git a/src/sprite.h b/src/sprite.h index 2a4acf355..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,16 +56,13 @@ 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; 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;