forked from mirror/OpenTTD
(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
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user