28 #include <SDL_image.h>
36 IconRepository::Repository IconRepository::repository;
42 Repository::iterator i = repository.find( name );
43 if ( i != repository.end() )
49 repository[name] =
new Surface();
50 repository[name]->read( fs );
54 return *repository[name];
61 if ( name !=
"dummy.png" )
62 return getIcon(
"dummy.png" );
69 IconRepository::Repository::~Repository()
71 for ( Repository::iterator i = repository.begin(); i != repository.end(); ++i )
77 return repository.find(name) != repository.end();
88 for ( Repository::iterator i = repository.begin(); i != repository.end(); ++i )
89 size += i->second->getMemoryFootprint();
static bool exists(const ASCString &name)
const ASCString & getFileName() const
The ASCString class provides an abstract way to manipulate strings.
static int getMemoryFootprint()
The interface for the various streams that ASC offers, like file and memory streams.
static void insert(const ASCString &name, Surface *s)
void errorMessage(const ASCString &string)
static Surface & getIcon(const ASCString &name)
SDL_RWops * SDL_RWFromStream(tnstream *stream)
bool endswith(const ASCString &s) const
Checks if the last characters of string are equal to s.
set< ASCString > errorsShown