8 #include <SDL_surface.h>
44 SDL_Surface *
p = this->Release();
45 if (
p && --
p->refcount <= 0) SDL_FreeSurface(
p);
57 return (this->
m_ptr->refcount == 1);
SDLSurfacePtr LoadSurfaceFromFile(const std::string &fname, FileSystem::FileSource &source)
Definition: SDLWrappers.cpp:9
Definition: FileSystem.h:197
Definition: SDLWrappers.h:17
SDLSurfacePtr & operator=(const SDLSurfacePtr &b)
Definition: SDLWrappers.h:48
static SDLSurfacePtr WrapNew(SDL_Surface *p)
Definition: SDLWrappers.h:25
static SDLSurfacePtr WrapCopy(SDL_Surface *p)
Definition: SDLWrappers.h:26
~SDLSurfacePtr()
Definition: SDLWrappers.h:42
SDLSurfacePtr()
Definition: SDLWrappers.h:34
bool Unique() const
Definition: SDLWrappers.h:54
SDLSurfacePtr(const SDLSurfacePtr &b)
Definition: SDLWrappers.h:35
Definition: SmartPtr.h:18
m_ptr
Definition: SmartPtr.h:82
return p
Definition: SmartPtr.h:83
SDL_Surface * Get() const
Definition: SmartPtr.h:37
Definition: CityOnPlanet.h:27