X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fvideo%2Fsdl%2Fsdl_texture.hpp;h=1fa1f19206b839989758831bffe4d56b1e7bc8dd;hb=0b1e73663a7c8a9199e84d74bcb4d30866b0b862;hp=97c38cb9531813df14ecccaacb71028178d59108;hpb=a5e96e2c986da8851ba03f1eed359fa8becad804;p=supertux.git diff --git a/src/video/sdl/sdl_texture.hpp b/src/video/sdl/sdl_texture.hpp index 97c38cb95..1fa1f1920 100644 --- a/src/video/sdl/sdl_texture.hpp +++ b/src/video/sdl/sdl_texture.hpp @@ -28,10 +28,11 @@ class SDLTexture : public Texture { protected: - SDL_Surface *texture; - //unsigned int width; - //unsigned int height; + SDL_Texture* texture; + int width; + int height; +#ifdef OLD_SDL1 struct ColorCache { static const int HASHED_BITS = 3; @@ -85,57 +86,40 @@ protected: }; //typedef std::map ColorCache; ColorCache cache[NUM_EFFECTS]; +#endif public: SDLTexture(SDL_Surface* sdlsurface); virtual ~SDLTexture(); +#ifdef OLD_SDL1 SDL_Surface *get_transform(const Color &color, DrawingEffect effect); +#endif - SDL_Surface *get_texture() const + SDL_Texture *get_texture() const { return texture; } unsigned int get_texture_width() const { - return texture->w; + return width; } unsigned int get_texture_height() const { - return texture->h; + return height; } unsigned int get_image_width() const { - return texture->w; + return width; } unsigned int get_image_height() const { - return texture->h; - } - - /*unsigned int get_texture_width() const - { - return width; - } - - unsigned int get_texture_height() const - { - return height; - } - - unsigned int get_image_width() const - { - return width; - } - - unsigned int get_image_height() const - { return height; - }*/ + } private: SDLTexture(const SDLTexture&);