(svn r24037) -Feature: Allow display of baseset textfiles. (LordAro)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user