Base for all base media (graphics, sounds)
More...
#include <base_media_base.h>
|
bool | AddFile (const std::string &filename, size_t basepath_length, const std::string &tar_filename) override |
| Add a file with the given filename. More...
|
|
|
static const char * | GetExtension () |
| Get the extension that is used to identify this set. More...
|
|
|
static Tbase_set * | available_sets |
| All available sets.
|
|
static Tbase_set * | duplicate_sets |
| All sets that aren't available, but needed for not downloading base sets when a newer version than the one on BaNaNaS is loaded.
|
|
static const Tbase_set * | used_set |
| The currently used set.
|
|
|
virtual | ~FileScanner ()=default |
| Destruct the proper one...
|
|
uint | Scan (std::string_view extension, Subdirectory sd, bool tars=true, bool recursive=true) |
| Scan for files with the given extension in the given search path. More...
|
|
uint | Scan (std::string_view extension, const std::string &directory, bool recursive=true) |
| Scan for files with the given extension in the given search path. More...
|
|
Subdirectory | subdir |
| The current sub directory we are searching through.
|
|
template<class Tbase_set>
class BaseMedia< Tbase_set >
Base for all base media (graphics, sounds)
- Template Parameters
-
Tbase_set | the real set we're going to be |
Definition at line 176 of file base_media_base.h.
◆ AddFile()
template<class Tbase_set >
bool BaseMedia< Tbase_set >::AddFile |
( |
const std::string & |
filename, |
|
|
size_t |
basepath_length, |
|
|
const std::string & |
tar_filename |
|
) |
| |
|
overrideprotectedvirtual |
Add a file with the given filename.
- Parameters
-
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. |
tar_filename | the name of the tar file the file is read from. |
- Returns
- true if the file is added.
Implements FileScanner.
Definition at line 164 of file base_media_func.h.
References BASESET_DIR, Debug, IniLoadFile::LoadFromDisk(), and SET_TYPE.
◆ DetermineBestSet()
template<class Tbase_set >
bool BaseMedia< Tbase_set >::DetermineBestSet |
|
static |
Determine the graphics pack that has to be used.
The one with the most correct files wins.
- Returns
- true if a best set has been found.
Definition at line 466 of file gfxinit.cpp.
References PAL_DOS.
◆ GetAvailableSets()
template<class Tbase_set >
Tbase_set * BaseMedia< Tbase_set >::GetAvailableSets |
|
static |
Return the available sets.
- Returns
- The available sets.
Definition at line 404 of file base_media_func.h.
◆ GetExtension()
template<class Tbase_set >
const char * BaseMedia< Tbase_set >::GetExtension |
|
staticprotected |
◆ GetIndexOfUsedSet()
template<class Tbase_set >
int BaseMedia< Tbase_set >::GetIndexOfUsedSet |
|
static |
Get the index of the currently active graphics set.
- Returns
- the current set's index
Definition at line 363 of file base_media_func.h.
◆ GetNumSets()
template<class Tbase_set >
Count the number of available graphics sets.
- Returns
- the number of sets
Definition at line 348 of file base_media_func.h.
◆ GetSet()
template<class Tbase_set >
const Tbase_set * BaseMedia< Tbase_set >::GetSet |
( |
int |
index | ) |
|
|
static |
Get the name of the graphics set at the specified index.
- Returns
- the name of the set
Definition at line 379 of file base_media_func.h.
◆ GetSetsList()
template<class Tbase_set >
void BaseMedia< Tbase_set >::GetSetsList |
( |
std::back_insert_iterator< std::string > & |
output_iterator | ) |
|
|
static |
Returns a list with the sets.
- Parameters
-
output_iterator | The iterator to write the string to. |
Definition at line 297 of file base_media_func.h.
References SET_TYPE.
◆ GetUsedSet()
template<class Tbase_set >
const Tbase_set * BaseMedia< Tbase_set >::GetUsedSet |
|
static |
◆ HasSet()
template<class Tbase_set >
Check whether we have an set with the exact characteristics as ci.
- Parameters
-
ci | the characteristics to search on (shortname and md5sum) |
md5sum | whether to check the MD5 checksum |
- Returns
- true iff we have an set matching.
Definition at line 337 of file base_media_func.h.
References TryGetBaseSetFile().
◆ SetSet()
template<class Tbase_set >
bool BaseMedia< Tbase_set >::SetSet |
( |
const Tbase_set * |
set | ) |
|
|
static |
◆ SetSetByName()
template<class Tbase_set >
bool BaseMedia< Tbase_set >::SetSetByName |
( |
const std::string & |
name | ) |
|
|
static |
Set the set to be used.
- Parameters
-
- Returns
- true if it could be loaded
Definition at line 258 of file base_media_func.h.
◆ SetSetByShortname()
template<class Tbase_set >
bool BaseMedia< Tbase_set >::SetSetByShortname |
( |
uint32_t |
shortname | ) |
|
|
static |
Set the set to be used.
- Parameters
-
shortname | of the set to use |
- Returns
- true if it could be loaded
Definition at line 278 of file base_media_func.h.
The documentation for this class was generated from the following files: