author | peter1138 |
Sun, 03 Aug 2008 17:35:08 +0000 | |
changeset 9834 | 7474149531c1 |
parent 9773 | fd7309d22bc6 |
child 10249 | 77b68778b102 |
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 |
|
9773
fd7309d22bc6
(svn r13910) -Document: string drawing related functions and types (Alberth)
rubidium
parents:
9648
diff
changeset
|
8 |
/** |
fd7309d22bc6
(svn r13910) -Document: string drawing related functions and types (Alberth)
rubidium
parents:
9648
diff
changeset
|
9 |
* Numeric value that represents a string, independent of the selected language. |
fd7309d22bc6
(svn r13910) -Document: string drawing related functions and types (Alberth)
rubidium
parents:
9648
diff
changeset
|
10 |
*/ |
8114
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
11 |
typedef uint16 StringID; |
9773
fd7309d22bc6
(svn r13910) -Document: string drawing related functions and types (Alberth)
rubidium
parents:
9648
diff
changeset
|
12 |
static const StringID INVALID_STRING_ID = 0xFFFF; ///< Constant representing an invalid string |
8114
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 |
enum { |
9773
fd7309d22bc6
(svn r13910) -Document: string drawing related functions and types (Alberth)
rubidium
parents:
9648
diff
changeset
|
15 |
MAX_LANG = 64, ///< Maximal number of languages supported by the game |
8114
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
16 |
}; |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
17 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
18 |
/** Information about a language */ |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
19 |
struct Language { |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
20 |
char *name; ///< The internal name of the language |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
21 |
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
|
22 |
}; |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
23 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
24 |
/** Used for dynamic language support */ |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
25 |
struct DynamicLanguages { |
8321
96c331ee5ac3
(svn r11886) -Add: sort the strings in languages dropdown
glx
parents:
8114
diff
changeset
|
26 |
int num; ///< Number of languages |
96c331ee5ac3
(svn r11886) -Add: sort the strings in languages dropdown
glx
parents:
8114
diff
changeset
|
27 |
int curr; ///< Currently selected language index |
96c331ee5ac3
(svn r11886) -Add: sort the strings in languages dropdown
glx
parents:
8114
diff
changeset
|
28 |
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
|
29 |
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
|
30 |
}; |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
31 |
|
9773
fd7309d22bc6
(svn r13910) -Document: string drawing related functions and types (Alberth)
rubidium
parents:
9648
diff
changeset
|
32 |
/** Special string constants */ |
8114
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
33 |
enum SpecialStrings { |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
34 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
35 |
// 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
|
36 |
SPECSTR_TOWNNAME_START = 0x20C0, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
37 |
SPECSTR_TOWNNAME_ENGLISH = SPECSTR_TOWNNAME_START, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
38 |
SPECSTR_TOWNNAME_FRENCH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
39 |
SPECSTR_TOWNNAME_GERMAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
40 |
SPECSTR_TOWNNAME_AMERICAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
41 |
SPECSTR_TOWNNAME_LATIN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
42 |
SPECSTR_TOWNNAME_SILLY, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
43 |
SPECSTR_TOWNNAME_SWEDISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
44 |
SPECSTR_TOWNNAME_DUTCH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
45 |
SPECSTR_TOWNNAME_FINNISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
46 |
SPECSTR_TOWNNAME_POLISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
47 |
SPECSTR_TOWNNAME_SLOVAKISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
48 |
SPECSTR_TOWNNAME_NORWEGIAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
49 |
SPECSTR_TOWNNAME_HUNGARIAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
50 |
SPECSTR_TOWNNAME_AUSTRIAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
51 |
SPECSTR_TOWNNAME_ROMANIAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
52 |
SPECSTR_TOWNNAME_CZECH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
53 |
SPECSTR_TOWNNAME_SWISS, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
54 |
SPECSTR_TOWNNAME_DANISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
55 |
SPECSTR_TOWNNAME_TURKISH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
56 |
SPECSTR_TOWNNAME_ITALIAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
57 |
SPECSTR_TOWNNAME_CATALAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
58 |
SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_CATALAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
59 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
60 |
// 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
|
61 |
SPECSTR_PLAYERNAME_START = 0x70EA, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
62 |
SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
63 |
SPECSTR_PLAYERNAME_FRENCH, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
64 |
SPECSTR_PLAYERNAME_GERMAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
65 |
SPECSTR_PLAYERNAME_AMERICAN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
66 |
SPECSTR_PLAYERNAME_LATIN, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
67 |
SPECSTR_PLAYERNAME_SILLY, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
68 |
SPECSTR_PLAYERNAME_LAST = SPECSTR_PLAYERNAME_SILLY, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
69 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
70 |
SPECSTR_ANDCO_NAME = 0x70E6, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
71 |
SPECSTR_PRESIDENT_NAME = 0x70E7, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
72 |
SPECSTR_SONGNAME = 0x70E8, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
73 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
74 |
// reserve MAX_LANG strings for the *.lng files |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
75 |
SPECSTR_LANGUAGE_START = 0x7100, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
76 |
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
|
77 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
78 |
// reserve 32 strings for various screen resolutions |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
79 |
SPECSTR_RESOLUTION_START = SPECSTR_LANGUAGE_END + 1, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
80 |
SPECSTR_RESOLUTION_END = SPECSTR_RESOLUTION_START + 0x1F, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
81 |
|
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
82 |
// reserve 32 strings for screenshot formats |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
83 |
SPECSTR_SCREENSHOT_START = SPECSTR_RESOLUTION_END + 1, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
84 |
SPECSTR_SCREENSHOT_END = SPECSTR_SCREENSHOT_START + 0x1F, |
dd6d21dc99c1
(svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents:
diff
changeset
|
85 |
}; |
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 |
#endif /* STRINGS_TYPE_H */ |