summaryrefslogtreecommitdiff
path: root/src/variables.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-03-17 22:21:05 +0000
committerrubidium <rubidium@openttd.org>2007-03-17 22:21:05 +0000
commit7fb3b4f83e9348c87924dd258afdb51a724467b7 (patch)
treec3c942e6a51b78268b05e750417a6ee0b7118f2b /src/variables.h
parentabf601a1eff12888b282e8278fce26edb18fcb2f (diff)
downloadopenttd-7fb3b4f83e9348c87924dd258afdb51a724467b7.tar.xz
(svn r9271) -Codechange: make the language pack initialisation a little more clear and extendable (more language paths).
Diffstat (limited to 'src/variables.h')
-rw-r--r--src/variables.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/variables.h b/src/variables.h
index ef5e9b73c..7f8771a87 100644
--- a/src/variables.h
+++ b/src/variables.h
@@ -315,19 +315,22 @@ VARDEF Vehicle *_place_clicked_vehicle;
VARDEF char _ini_videodriver[32], _ini_musicdriver[32], _ini_sounddriver[32];
-// Used for dynamic language support
+/** 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_LANG]; // currently selected language file
- StringID dropdown[MAX_LANG + 1]; // used in settings dialog
- struct {
- char *name;
- char *file;
- } ent[MAX_LANG];
+ int num; ///< Number of languages
+ int curr; ///< Currently selected language index
+ char curr_file[MAX_PATH]; ///< Currently selected language file (needed for saving the filename of the loaded language
+ StringID dropdown[MAX_LANG + 1]; ///< List of languages in the settings gui
+ Language ent[MAX_LANG]; ///< Information about the languages
};
-VARDEF DynamicLanguages _dynlang;
+extern DynamicLanguages _dynlang; // defined in strings.cpp
VARDEF int _num_resolutions;
VARDEF uint16 _resolutions[32][2];