diff options
author | rubidium <rubidium@openttd.org> | 2010-11-13 12:09:30 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-11-13 12:09:30 +0000 |
commit | 8aba642ed5bbad969b56bf5b72834ad04599d296 (patch) | |
tree | a7cb920bfa051da93215e0292065bdd1a6c459a2 /src/language.h | |
parent | 68b94e61e03e8ff26c6e84ed99f2a1154ed0e638 (diff) | |
download | openttd-8aba642ed5bbad969b56bf5b72834ad04599d296.tar.xz |
(svn r21164) -Codechange: replace the hardcoded array of language metadata with a list
Diffstat (limited to 'src/language.h')
-rw-r--r-- | src/language.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/language.h b/src/language.h index 84e9fa9b9..6a208ab92 100644 --- a/src/language.h +++ b/src/language.h @@ -12,6 +12,8 @@ #ifndef LANGUAGE_H #define LANGUAGE_H +#include "core/smallvec_type.hpp" + /** Header of a language file. */ struct LanguagePackHeader { static const uint32 IDENT = 0x474E414C; ///< Identifier for OpenTTD language files, big endian for "LANG" @@ -56,6 +58,12 @@ struct LanguageMetadata : public LanguagePackHeader { char file[MAX_PATH]; ///< Name of the file we read this data from. }; +/** Type for the list of language meta data. */ +typedef SmallVector<LanguageMetadata, 4> LanguageList; + +/** The actual list of language meta data. */ +extern LanguageList _languages; + /** The currently loaded language. */ extern const LanguageMetadata *_current_language; |