X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftexture.h;h=00ad954b8090d43cf018950fa3ed9832da488276;hb=157cef71aeb9ae25b7bb90f37dda11bc09329d11;hp=3ba0e58a07524df459cee2184375a0dd221a8cfd;hpb=433e5cdc9bb7b166454e210ba3a2666a7d5ac536;p=supertux.git diff --git a/src/texture.h b/src/texture.h index 3ba0e58a0..00ad954b8 100644 --- a/src/texture.h +++ b/src/texture.h @@ -29,6 +29,7 @@ #include #include "screen.h" +#include "vector.h" SDL_Surface* sdl_surface_from_sdl_surface(SDL_Surface* sdl_surf, int use_alpha); @@ -92,6 +93,12 @@ public: void draw_part(float sx, float sy, float x, float y, float w, float h, Uint8 alpha = 255, bool update = false); void draw_stretched(float x, float y, int w, int h, Uint8 alpha, bool update = false); void resize(int w_, int h_); + + /// conveniance function + void draw(const Vector& pos, Uint8 alpha = 255, bool update = false) + { + draw(pos.x, pos.y, alpha, update); + } }; /** Surface implementation, all implementation have to inherit from