Base for all base media (graphics, sounds). More...
#include <base_media_base.h>
Static Public Member Functions | |
static bool | DetermineBestSet () |
Determine the graphics pack that has to be used. | |
static uint | FindSets () |
Do the scan for files. | |
static bool | SetSet (const char *name) |
Set the set to be used. | |
static char * | GetSetsList (char *p, const char *last) |
Returns a list with the sets. | |
static int | GetNumSets () |
Count the number of available graphics sets. | |
static int | GetIndexOfUsedSet () |
Get the index of the currently active graphics set. | |
static const Tbase_set * | GetSet (int index) |
Get the name of the graphics set at the specified index. | |
static const Tbase_set * | GetUsedSet () |
Return the used set. | |
static bool | HasSet (const ContentInfo *ci, bool md5sum) |
Check whether we have an set with the exact characteristics as ci. | |
Static Public Attributes | |
static const char * | ini_set |
The set as saved in the config file. | |
Protected Member Functions | |
bool | AddFile (const char *filename, size_t basepath_length) |
Add a file with the given filename. | |
Static Protected Member Functions | |
static const char * | GetExtension () |
Get the extension that is used to identify this set. | |
Static Protected Attributes | |
static Tbase_set * | available_sets |
All available sets. | |
static const Tbase_set * | used_set |
The currently used set. |
Base for all base media (graphics, sounds).
Tbase_set | the real set we're going to be |
Definition at line 146 of file base_media_base.h.
bool BaseMedia< Tbase_set >::AddFile | ( | const char * | filename, | |
size_t | basepath_length | |||
) | [inline, protected, virtual] |
Add a file with the given filename.
filename | the full path to the file to read | |
basepath_length | amount of characters to chop of before to get a filename relative to the search path. |
Implements FileScanner.
Definition at line 141 of file base_media_func.h.
References IniFile::LoadFromDisk().
bool BaseMedia< Tbase_set >::DetermineBestSet | ( | ) | [inline, static] |
Determine the graphics pack that has to be used.
The one with the most correct files wins.
Definition at line 289 of file gfxinit.cpp.
References _use_palette.
static uint BaseMedia< Tbase_set >::FindSets | ( | ) | [inline, static] |
Do the scan for files.
Definition at line 170 of file base_media_base.h.
const char * BaseMedia< Tbase_set >::GetExtension | ( | ) | [inline, static, protected] |
Get the extension that is used to identify this set.
Definition at line 313 of file gfxinit.cpp.
Referenced by BaseMedia< GraphicsSet >::FindSets().
int BaseMedia< Tbase_set >::GetIndexOfUsedSet | ( | ) | [inline, static] |
Get the index of the currently active graphics set.
Definition at line 300 of file base_media_func.h.
int BaseMedia< Tbase_set >::GetNumSets | ( | ) | [inline, static] |
Count the number of available graphics sets.
Definition at line 289 of file base_media_func.h.
const Tbase_set * BaseMedia< Tbase_set >::GetSet | ( | int | index | ) | [inline, static] |
Get the name of the graphics set at the specified index.
Definition at line 312 of file base_media_func.h.
References error().
char * BaseMedia< Tbase_set >::GetSetsList | ( | char * | p, | |
const char * | last | |||
) | [inline, static] |
Returns a list with the sets.
p | where to print to | |
last | the last character to print to |
Definition at line 231 of file base_media_func.h.
References seprintf().
const Tbase_set * BaseMedia< Tbase_set >::GetUsedSet | ( | ) | [inline, static] |
bool BaseMedia< Tbase_set >::HasSet | ( | const ContentInfo * | ci, | |
bool | md5sum | |||
) | [inline, static] |
Check whether we have an set with the exact characteristics as ci.
ci | the characteristics to search on (shortname and md5sum) | |
md5sum | whether to check the MD5 checksum |
Definition at line 257 of file base_media_func.h.
References ContentInfo::md5sum, and ContentInfo::unique_id.
bool BaseMedia< Tbase_set >::SetSet | ( | const char * | name | ) | [inline, static] |
Set the set to be used.
name | of the set to use |
Definition at line 210 of file base_media_func.h.
References CheckExternalFiles(), and StrEmpty().
The set as saved in the config file.
Definition at line 160 of file base_media_base.h.