diff --git a/src/base_media_base.h b/src/base_media_base.h --- a/src/base_media_base.h +++ b/src/base_media_base.h @@ -14,6 +14,7 @@ #include "fileio_func.h" #include "core/smallmap_type.hpp" +#include "gfx_type.h" /* Forward declare these; can't do 'struct X' in functions as older GCCs barf on that */ struct IniFile; @@ -32,21 +33,25 @@ struct MD5File { uint8 hash[16]; ///< md5 sum of the file const char *missing_warning; ///< warning when this file is missing - ChecksumResult CheckMD5() const; + ChecksumResult CheckMD5(Subdirectory subdir) const; }; /** * Information about a single base set. * @tparam T the real class we're going to be * @tparam Tnum_files the number of files in the set + * @tparam Tsubdir the subdirectory where to find the files */ -template +template struct BaseSet { typedef SmallMap TranslatedStrings; /** Number of files in this set */ static const size_t NUM_FILES = Tnum_files; + /** The sub directory to search for the files */ + static const Subdirectory SUBDIR = Tsubdir; + /** Internal names of the files in this set. */ static const char * const *file_names; @@ -163,7 +168,7 @@ public: static uint FindSets() { BaseMedia fs; - return fs.Scan(GetExtension(), DATA_DIR); + return fs.Scan(GetExtension(), Tbase_set::SUBDIR); } /** @@ -226,7 +231,7 @@ enum GraphicsFileType { }; /** All data of a graphics set. */ -struct GraphicsSet : BaseSet { +struct GraphicsSet : BaseSet { PaletteType palette; ///< Palette of this graphics set bool FillSetDetails(struct IniFile *ini, const char *path); @@ -242,7 +247,7 @@ public: }; /** All data of a sounds set. */ -struct SoundsSet : BaseSet { +struct SoundsSet : BaseSet { }; /** All data/functions related with replacing the base sounds */ @@ -250,4 +255,29 @@ class BaseSounds : public BaseMedia { + /** The name of the different songs. */ + char song_name[NUM_SONGS_AVAILABLE][32]; + byte track_nr[NUM_SONGS_AVAILABLE]; + byte num_available; + + bool FillSetDetails(struct IniFile *ini, const char *path); +}; + +/** All data/functions related with replacing the base music */ +class BaseMusic : public BaseMedia { +public: +}; + #endif /* BASE_MEDIA_BASE_H */