|
@@ -11,7 +11,6 @@
|
|
|
|
|
|
#include "../render/IImage.h"
|
|
|
#include "../../lib/Point.h"
|
|
|
-#include <SDL_surface.h>
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
class JsonNode;
|
|
@@ -25,7 +24,7 @@ struct SDL_Palette;
|
|
|
/*
|
|
|
* Wrapper around SDL_Surface
|
|
|
*/
|
|
|
-class SDLImageShared : public ISharedImage, public std::enable_shared_from_this<SDLImageShared>, boost::noncopyable
|
|
|
+class SDLImageShared final : public ISharedImage, public std::enable_shared_from_this<SDLImageShared>, boost::noncopyable
|
|
|
{
|
|
|
//Surface without empty borders
|
|
|
SDL_Surface * surf;
|
|
@@ -67,20 +66,6 @@ public:
|
|
|
friend class SDLImageLoader;
|
|
|
};
|
|
|
|
|
|
-class SDLEmptyImageShared : public SDLImageShared
|
|
|
-{
|
|
|
-public:
|
|
|
- SDLEmptyImageShared() : SDLImageShared(createDefaultSurface().get()) {}
|
|
|
-
|
|
|
-private:
|
|
|
- std::shared_ptr<SDL_Surface> createDefaultSurface()
|
|
|
- {
|
|
|
- auto surface = SDL_CreateRGBSurface(0, 32, 32, 32, 0, 0, 0, 0);
|
|
|
- SDL_FillRect(surface, nullptr, SDL_MapRGB(surface->format, 255, 0, 0));
|
|
|
- return std::shared_ptr<SDL_Surface>(surface, SDL_FreeSurface);
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
class SDLImageBase : public IImage, boost::noncopyable
|
|
|
{
|
|
|
protected:
|