(svn r23249) -Feature: Also allow viewing of the other two textfiles supplied by BaNaNaS tars, i.e. changelog and license.

This commit is contained in:
frosch
2011-11-18 14:40:57 +00:00
parent b725913f3b
commit 0d901d599f
4 changed files with 61 additions and 22 deletions

View File

@@ -146,6 +146,18 @@ struct GRFTextWrapper : public SimpleCountedObject {
~GRFTextWrapper();
};
/** Additional text files accompanying NewGRFs */
enum TextfileType {
TFT_BEGIN,
TFT_README = TFT_BEGIN, ///< NewGRF readme
TFT_CHANGELOG, ///< NewGRF changelog
TFT_LICENSE, ///< NewGRF license
TFT_END
};
DECLARE_POSTFIX_INCREMENT(TextfileType)
/** Information about GRF, used in the game and (part of it) in savegames */
struct GRFConfig : ZeroedMemoryAllocator {
GRFConfig(const char *filename = NULL);
@@ -175,7 +187,7 @@ struct GRFConfig : ZeroedMemoryAllocator {
bool IsOpenTTDBaseGRF() const;
const char *GetTextfile() const;
const char *GetTextfile(TextfileType type) const;
const char *GetName() const;
const char *GetDescription() const;