src/strings_type.h
author convert-repo
Mon, 07 Apr 2008 16:21:55 +0000
changeset 10076 dfd70e42c4ae
parent 8817 9df6e6b40d12
child 11157 a0173588b15e
permissions -rw-r--r--
update tags
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2087
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2087
diff changeset
     2
8610
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
     3
/** @file strings_type.h Types related to strings. */
7762
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
     4
8610
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
     5
#ifndef STRINGS_TYPE_H
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
     6
#define STRINGS_TYPE_H
7762
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
     7
8610
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
     8
typedef uint16 StringID;
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
     9
static const StringID INVALID_STRING_ID = 0xFFFF;
7762
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    10
8610
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    11
enum {
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    12
	MAX_LANG = 64,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    13
};
7762
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    14
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    15
/** Information about a language */
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    16
struct Language {
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    17
	char *name; ///< The internal name of the language
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    18
	char *file; ///< The name of the language as it appears on disk
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    19
};
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    20
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    21
/** Used for dynamic language support */
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    22
struct DynamicLanguages {
8817
9df6e6b40d12 (svn r11886) -Add: sort the strings in languages dropdown
glx
parents: 8610
diff changeset
    23
	int num;                  ///< Number of languages
9df6e6b40d12 (svn r11886) -Add: sort the strings in languages dropdown
glx
parents: 8610
diff changeset
    24
	int curr;                 ///< Currently selected language index
9df6e6b40d12 (svn r11886) -Add: sort the strings in languages dropdown
glx
parents: 8610
diff changeset
    25
	char curr_file[MAX_PATH]; ///< Currently selected language file name without path (needed for saving the filename of the loaded language).
9df6e6b40d12 (svn r11886) -Add: sort the strings in languages dropdown
glx
parents: 8610
diff changeset
    26
	Language ent[MAX_LANG];   ///< Information about the languages
7762
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    27
};
03721db0ac1c (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
rubidium
parents: 7289
diff changeset
    28
8610
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    29
// special string constants
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    30
enum SpecialStrings {
6646
0e3b3d315288 (svn r9271) -Codechange: make the language pack initialisation a little more clear and extendable (more language paths).
rubidium
parents: 6573
diff changeset
    31
8610
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    32
	// special strings for town names. the town name is generated dynamically on request.
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    33
	SPECSTR_TOWNNAME_START     = 0x20C0,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    34
	SPECSTR_TOWNNAME_ENGLISH   = SPECSTR_TOWNNAME_START,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    35
	SPECSTR_TOWNNAME_FRENCH,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    36
	SPECSTR_TOWNNAME_GERMAN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    37
	SPECSTR_TOWNNAME_AMERICAN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    38
	SPECSTR_TOWNNAME_LATIN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    39
	SPECSTR_TOWNNAME_SILLY,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    40
	SPECSTR_TOWNNAME_SWEDISH,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    41
	SPECSTR_TOWNNAME_DUTCH,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    42
	SPECSTR_TOWNNAME_FINNISH,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    43
	SPECSTR_TOWNNAME_POLISH,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    44
	SPECSTR_TOWNNAME_SLOVAKISH,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    45
	SPECSTR_TOWNNAME_NORWEGIAN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    46
	SPECSTR_TOWNNAME_HUNGARIAN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    47
	SPECSTR_TOWNNAME_AUSTRIAN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    48
	SPECSTR_TOWNNAME_ROMANIAN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    49
	SPECSTR_TOWNNAME_CZECH,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    50
	SPECSTR_TOWNNAME_SWISS,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    51
	SPECSTR_TOWNNAME_DANISH,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    52
	SPECSTR_TOWNNAME_TURKISH,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    53
	SPECSTR_TOWNNAME_ITALIAN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    54
	SPECSTR_TOWNNAME_CATALAN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    55
	SPECSTR_TOWNNAME_LAST      = SPECSTR_TOWNNAME_CATALAN,
7289
d6a004877931 (svn r10032) -Add: sort the strings in server language dropdown
glx
parents: 6916
diff changeset
    56
8610
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    57
	// special strings for player names on the form "TownName transport".
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    58
	SPECSTR_PLAYERNAME_START   = 0x70EA,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    59
	SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    60
	SPECSTR_PLAYERNAME_FRENCH,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    61
	SPECSTR_PLAYERNAME_GERMAN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    62
	SPECSTR_PLAYERNAME_AMERICAN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    63
	SPECSTR_PLAYERNAME_LATIN,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    64
	SPECSTR_PLAYERNAME_SILLY,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    65
	SPECSTR_PLAYERNAME_LAST    = SPECSTR_PLAYERNAME_SILLY,
8581
8e4e36a205fe (svn r11646) -Codechange: check whether (some) characters are missing in the current 'font' for the 'currently' chosen language and give a warning when that does happen.
rubidium
parents: 7814
diff changeset
    66
8610
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    67
	SPECSTR_ANDCO_NAME         = 0x70E6,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    68
	SPECSTR_PRESIDENT_NAME     = 0x70E7,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    69
	SPECSTR_SONGNAME           = 0x70E8,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    70
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    71
	// reserve MAX_LANG strings for the *.lng files
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    72
	SPECSTR_LANGUAGE_START     = 0x7100,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    73
	SPECSTR_LANGUAGE_END       = SPECSTR_LANGUAGE_START + MAX_LANG - 1,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    74
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    75
	// reserve 32 strings for various screen resolutions
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    76
	SPECSTR_RESOLUTION_START   = SPECSTR_LANGUAGE_END + 1,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    77
	SPECSTR_RESOLUTION_END     = SPECSTR_RESOLUTION_START + 0x1F,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    78
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    79
	// reserve 32 strings for screenshot formats
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    80
	SPECSTR_SCREENSHOT_START   = SPECSTR_RESOLUTION_END + 1,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    81
	SPECSTR_SCREENSHOT_END     = SPECSTR_SCREENSHOT_START + 0x1F,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    82
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    83
	// Used to implement SetDParamStr
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    84
	STR_SPEC_DYNSTRING         = 0xF800,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    85
	STR_SPEC_USERSTRING        = 0xF808,
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    86
};
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    87
17cc343a23dd (svn r11675) -Codechange: split the string types from the string functions.
rubidium
parents: 8581
diff changeset
    88
#endif /* STRINGS_TYPE_H */