OpenTTD Source  20241108-master-g80f628063a
MusicSet Struct Reference

All data of a music set. More...

#include <base_media_base.h>

Inheritance diagram for MusicSet:
BaseSet< MusicSet, NUM_SONGS_AVAILABLE, false >

Public Member Functions

bool FillSetDetails (const IniFile &ini, const std::string &path, const std::string &full_filename)
 
- Public Member Functions inherited from BaseSet< MusicSet, NUM_SONGS_AVAILABLE, false >
 ~BaseSet ()
 Free everything we allocated.
 
int GetNumMissing () const
 Get the number of missing files. More...
 
int GetNumInvalid () const
 Get the number of invalid files. More...
 
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. More...
 
void CopyCompatibleConfig ([[maybe_unused]] const MusicSet &src)
 
const std::string & GetDescription (const std::string &isocode) const
 Get the description for the given ISO code. More...
 
std::string GetListLabel () const
 Get string to use when listing this set in the settings window. More...
 
std::optional< std::string > GetTextfile (TextfileType type) const
 Search a textfile file next to this base media. More...
 

Data Fields

MusicSongInfo songinfo [NUM_SONGS_AVAILABLE]
 Data about individual songs in set.
 
uint8_t num_available
 Number of valid songs in set.
 
- Data Fields inherited from BaseSet< MusicSet, NUM_SONGS_AVAILABLE, false >
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.
 
MD5File files [NUM_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.
 
MusicSetnext
 The next base set in this list.
 

Additional Inherited Members

- Public Types inherited from BaseSet< MusicSet, NUM_SONGS_AVAILABLE, false >
typedef std::unordered_map< std::string, std::string > TranslatedStrings
 
- Static Public Member Functions inherited from BaseSet< MusicSet, NUM_SONGS_AVAILABLE, false >
static MD5File::ChecksumResult CheckMD5 (const MD5File *file, Subdirectory subdir)
 Calculate and check the MD5 hash of the supplied file. More...
 
- Static Public Attributes inherited from BaseSet< MusicSet, NUM_SONGS_AVAILABLE, false >
static const size_t NUM_FILES
 Number of files in this set.
 
static const bool SEARCH_IN_TARS
 Whether to search in the tars or not.
 
static const char *const * file_names
 Internal names of the files in this set. More...
 

Detailed Description

All data of a music set.

Definition at line 337 of file base_media_base.h.


The documentation for this struct was generated from the following files: