diff options
author | rubidium <rubidium@openttd.org> | 2010-11-13 11:11:02 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-11-13 11:11:02 +0000 |
commit | f1959206951a77891664c461cd51c4f4b90db753 (patch) | |
tree | 9d121c0088e4f60d5d6a23c31d111a8d6c8cb7c3 /src/strings_type.h | |
parent | 239fcc8ccdd201665bd4aaa76268503fefe94712 (diff) | |
download | openttd-f1959206951a77891664c461cd51c4f4b90db753.tar.xz |
(svn r21160) -Codechange: reuse the strgen LanguageHeader to store some metadata about a language, and keep the language metadata in memory instead of loading it several times from disk
Diffstat (limited to 'src/strings_type.h')
-rw-r--r-- | src/strings_type.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/strings_type.h b/src/strings_type.h index 0987c2e9b..be415f162 100644 --- a/src/strings_type.h +++ b/src/strings_type.h @@ -12,6 +12,8 @@ #ifndef STRINGS_TYPE_H #define STRINGS_TYPE_H +#include "language.h" + /** * Numeric value that represents a string, independent of the selected language. */ @@ -26,18 +28,12 @@ enum TextDirection { TD_RTL, ///< Text is written right-to-left by default }; -/** Information about a language */ -struct Language { - char *name; ///< The internal name of the language - char *file; ///< The name of the language as it appears on disk -}; - /** Used for dynamic language support */ struct DynamicLanguages { int num; ///< Number of languages int curr; ///< Currently selected language index char curr_file[MAX_PATH]; ///< Currently selected language file name without path (needed for saving the filename of the loaded language). - Language ent[MAX_LANG]; ///< Information about the languages + LanguageMetadata ent[MAX_LANG]; ///< Information about the languages }; /** Special string constants */ |