OpenTTD Source 20250428-master-g68ba2735ea
|
All data of a music set. More...
#include <base_media_music.h>
Public Member Functions | |
bool | FillSetDetails (const IniFile &ini, const std::string &path, const std::string &full_filename) |
![]() | |
~BaseSet () | |
Free everything we allocated. | |
int | GetNumMissing () const |
Get the number of missing files. | |
int | GetNumInvalid () const |
Get the number of invalid files. | |
bool | FillSetDetails (const IniFile &ini, const std::string &path, const std::string &full_filename, bool allow_empty_filename=true) |
Read the set information from a loaded ini. | |
void | CopyCompatibleConfig (const MusicSet &src) |
const std::string & | GetDescription (std::string_view isocode) const |
Get the description for the given ISO code. | |
std::optional< std::string > | GetTextfile (TextfileType type) const |
Search a textfile file next to this base media. | |
Data Fields | |
MusicSongInfo | songinfo [NUM_SONGS_AVAILABLE] |
Data about individual songs in set. | |
uint8_t | num_available = 0 |
Number of valid songs in set. | |
![]() | |
std::string | name |
The name of the base set. | |
std::string | url |
URL for information about the base set. | |
TranslatedStrings | description |
Description of the base set. | |
uint32_t | shortname |
Four letter short variant of the name. | |
uint32_t | version |
The version of this base set. | |
bool | fallback |
This set is a fallback set, i.e. it should be used only as last resort. | |
std::array< MD5File, BaseSet< MusicSet >::NUM_FILES > | files |
All files part of this set. | |
uint | found_files |
Number of the files that could be found. | |
uint | valid_files |
Number of the files that could be found and are valid. | |
MusicSet * | next |
The next base set in this list. | |
Additional Inherited Members | |
![]() | |
typedef std::unordered_map< std::string, std::string, StringHash, std::equal_to<> > | TranslatedStrings |
![]() | |
static MD5File::ChecksumResult | CheckMD5 (const MD5File *file, Subdirectory subdir) |
Calculate and check the MD5 hash of the supplied file. | |
static std::span< const std::string_view > | GetFilenames () |
Get the internal names of the files in this set. | |
![]() | |
static constexpr size_t | NUM_FILES |
Number of files in this set. | |
static constexpr bool | SEARCH_IN_TARS |
Whether to search in the tars or not. | |
static constexpr std::string_view | SET_TYPE |
BaseSet type name. | |
All data of a music set.
Definition at line 53 of file base_media_music.h.
bool MusicSet::FillSetDetails | ( | const IniFile & | ini, |
const std::string & | path, | ||
const std::string & | full_filename | ||
) |
uint8_t MusicSet::num_available = 0 |
Number of valid songs in set.
Definition at line 57 of file base_media_music.h.
MusicSongInfo MusicSet::songinfo[NUM_SONGS_AVAILABLE] |
Data about individual songs in set.
Definition at line 55 of file base_media_music.h.