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