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 Tbase_set * | GetAvailableSets () | 
|  | Return the available sets. 
 | 
| 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, const char *tar_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 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. 
 | 
| 
Additional Inherited Members | 
| virtual | ~FileScanner () | 
|  | Destruct the proper one... 
 | 
| uint | Scan (const char *extension, Subdirectory sd, bool tars=true, bool recursive=true) | 
|  | Scan for files with the given extension in the given search path. 
 | 
| uint | Scan (const char *extension, const char *directory, bool recursive=true) | 
|  | Scan for files with the given extension in the given search path. 
 | 
| virtual bool | AddFile (const char *filename, size_t basepath_length, const char *tar_filename)=0 | 
|  | Add a file with the given filename. 
 | 
Detailed Description
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 171 of file base_media_base.h.
Member Function Documentation
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 407 of file gfxinit.cpp.
References PAL_DOS.
 
 
template<class Tbase_set> 
  
  | 
        
          | static uint BaseMedia< Tbase_set >::FindSets | ( |  | ) |  |  | inlinestatic | 
 
 
template<class Tbase_set > 
  
  | 
        
          | Tbase_set * BaseMedia< Tbase_set >::GetAvailableSets | ( |  | ) |  |  | static | 
 
Return the available sets. 
- Returns
- The available sets. 
Definition at line 390 of file base_media_func.h.
 
 
template<class Tbase_set > 
  
  | 
        
          | const char * BaseMedia< Tbase_set >::GetExtension | ( |  | ) |  |  | staticprotected | 
 
 
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 349 of file base_media_func.h.
 
 
template<class Tbase_set > 
 
Count the number of available graphics sets. 
- Returns
- the number of sets 
Definition at line 334 of file base_media_func.h.
 
 
template<class Tbase_set > 
  
  | 
        
          | const Tbase_set * BaseMedia< Tbase_set >::GetSet | ( | int | index | ) |  |  | static | 
 
 
template<class Tbase_set > 
  
  | 
        
          | char * BaseMedia< Tbase_set >::GetSetsList | ( | char * | p, |  
          |  |  | const char * | last |  
          |  | ) |  |  |  | static | 
 
Returns a list with the sets. 
- Parameters
- 
  
    | p | where to print to |  | last | the last character to print to |  
 
- Returns
- the last printed character 
Definition at line 261 of file base_media_func.h.
References seprintf(), and SET_TYPE.
 
 
template<class Tbase_set > 
  
  | 
        
          | const Tbase_set * BaseMedia< Tbase_set >::GetUsedSet | ( |  | ) |  |  | static | 
 
 
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 307 of file base_media_func.h.
References TryGetBaseSetFile().
 
 
template<class Tbase_set > 
  
  | 
        
          | bool BaseMedia< Tbase_set >::SetSet | ( | const char * | name | ) |  |  | static | 
 
 
Field Documentation
template<class Tbase_set> 
 
 
The documentation for this class was generated from the following files: