diff options
Diffstat (limited to 'src/base_media_base.h')
-rw-r--r-- | src/base_media_base.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/base_media_base.h b/src/base_media_base.h index a5556f12b..828ae797e 100644 --- a/src/base_media_base.h +++ b/src/base_media_base.h @@ -15,6 +15,8 @@ #include "fileio_func.h" #include "core/smallmap_type.hpp" #include "gfx_type.h" +#include "textfile_type.h" +#include "textfile_gui.h" /* Forward declare these; can't do 'struct X' in functions as older GCCs barf on that */ struct IniFile; @@ -143,6 +145,22 @@ struct BaseSet { { return file->CheckMD5(subdir, SIZE_MAX); } + + /** + * Search a textfile file next to this base media. + * @param type The type of the textfile to search for. + * @return The filename for the textfile, \c NULL otherwise. + */ + const char *GetTextfile(TextfileType type) const + { + for (uint i = 0; i < NUM_FILES; i++) { + const char *textfile = ::GetTextfile(type, BASESET_DIR, this->files[i].filename); + if (textfile != NULL) { + return textfile; + } + } + return NULL; + } }; /** |