author | rubidium |
Sun, 25 May 2008 19:17:03 +0000 | |
changeset 9354 | 845e07db4549 |
parent 8321 | 96c331ee5ac3 |
child 9648 | c79160082c0f |
permissions | -rw-r--r-- |
8114
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
1 |
/* $Id$ */ |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
2 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
3 |
/** @file strings_type.h Types related to strings. */ |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
4 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
5 |
#ifndef STRINGS_TYPE_H |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
6 |
#define STRINGS_TYPE_H |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
7 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
8 |
typedef uint16 StringID; |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
9 |
static const StringID INVALID_STRING_ID = 0xFFFF; |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
10 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
11 |
enum { |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
12 |
MAX_LANG = 64, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
13 |
}; |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
14 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
15 |
/** Information about a language */ |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
16 |
struct Language { |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
17 |
char *name; ///< The internal name of the language |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
18 |
char *file; ///< The name of the language as it appears on disk |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
19 |
}; |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
20 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
21 |
/** Used for dynamic language support */ |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
22 |
struct DynamicLanguages { |
8321
96c331ee5ac3
(svn r11886) -Add: sort the strings in languages dropdown
glx
parents:
8114
diff
changeset
|
23 |
int num; ///< Number of languages |
96c331ee5ac3
(svn r11886) -Add: sort the strings in languages dropdown
glx
parents:
8114
diff
changeset
|
24 |
int curr; ///< Currently selected language index |
96c331ee5ac3
(svn r11886) -Add: sort the strings in languages dropdown
glx
parents:
8114
diff
changeset
|
25 |
char curr_file[MAX_PATH]; ///< Currently selected language file name without path (needed for saving the filename of the loaded language). |
96c331ee5ac3
(svn r11886) -Add: sort the strings in languages dropdown
glx
parents:
8114
diff
changeset
|
26 |
Language ent[MAX_LANG]; ///< Information about the languages |
8114
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
27 |
}; |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
28 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
29 |
// special string constants |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
30 |
enum SpecialStrings { |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
31 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
32 |
// special strings for town names. the town name is generated dynamically on request. |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
33 |
SPECSTR_TOWNNAME_START = 0x20C0, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
34 |
SPECSTR_TOWNNAME_ENGLISH = SPECSTR_TOWNNAME_START, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
35 |
SPECSTR_TOWNNAME_FRENCH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
36 |
SPECSTR_TOWNNAME_GERMAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
37 |
SPECSTR_TOWNNAME_AMERICAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
38 |
SPECSTR_TOWNNAME_LATIN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
39 |
SPECSTR_TOWNNAME_SILLY, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
40 |
SPECSTR_TOWNNAME_SWEDISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
41 |
SPECSTR_TOWNNAME_DUTCH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
42 |
SPECSTR_TOWNNAME_FINNISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
43 |
SPECSTR_TOWNNAME_POLISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
44 |
SPECSTR_TOWNNAME_SLOVAKISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
45 |
SPECSTR_TOWNNAME_NORWEGIAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
46 |
SPECSTR_TOWNNAME_HUNGARIAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
47 |
SPECSTR_TOWNNAME_AUSTRIAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
48 |
SPECSTR_TOWNNAME_ROMANIAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
49 |
SPECSTR_TOWNNAME_CZECH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
50 |
SPECSTR_TOWNNAME_SWISS, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
51 |
SPECSTR_TOWNNAME_DANISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
52 |
SPECSTR_TOWNNAME_TURKISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
53 |
SPECSTR_TOWNNAME_ITALIAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
54 |
SPECSTR_TOWNNAME_CATALAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
55 |
SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_CATALAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
56 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
57 |
// special strings for player names on the form "TownName transport". |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
58 |
SPECSTR_PLAYERNAME_START = 0x70EA, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
59 |
SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
60 |
SPECSTR_PLAYERNAME_FRENCH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
61 |
SPECSTR_PLAYERNAME_GERMAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
62 |
SPECSTR_PLAYERNAME_AMERICAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
63 |
SPECSTR_PLAYERNAME_LATIN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
64 |
SPECSTR_PLAYERNAME_SILLY, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
65 |
SPECSTR_PLAYERNAME_LAST = SPECSTR_PLAYERNAME_SILLY, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
66 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
67 |
SPECSTR_ANDCO_NAME = 0x70E6, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
68 |
SPECSTR_PRESIDENT_NAME = 0x70E7, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
69 |
SPECSTR_SONGNAME = 0x70E8, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
70 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
71 |
// reserve MAX_LANG strings for the *.lng files |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
72 |
SPECSTR_LANGUAGE_START = 0x7100, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
73 |
SPECSTR_LANGUAGE_END = SPECSTR_LANGUAGE_START + MAX_LANG - 1, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
74 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
75 |
// reserve 32 strings for various screen resolutions |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
76 |
SPECSTR_RESOLUTION_START = SPECSTR_LANGUAGE_END + 1, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
77 |
SPECSTR_RESOLUTION_END = SPECSTR_RESOLUTION_START + 0x1F, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
78 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
79 |
// reserve 32 strings for screenshot formats |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
80 |
SPECSTR_SCREENSHOT_START = SPECSTR_RESOLUTION_END + 1, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
81 |
SPECSTR_SCREENSHOT_END = SPECSTR_SCREENSHOT_START + 0x1F, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
82 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
83 |
// Used to implement SetDParamStr |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
84 |
STR_SPEC_DYNSTRING = 0xF800, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
85 |
STR_SPEC_USERSTRING = 0xF808, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
86 |
}; |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
87 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
88 |
#endif /* STRINGS_TYPE_H */ |