# strings_type.h

Go to the documentation of this file.

    00001 /* $Id: strings_type.h 18603 2009-12-22 18:34:07Z rubidium $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
    00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
    00008  */
    00009
    00012 #ifndef STRINGS_TYPE_H
    00013 #define STRINGS_TYPE_H
    00014
    00018 typedef uint16 StringID;
    00019 static const StringID INVALID_STRING_ID = 0xFFFF;
    00020 static const int MAX_CHAR_LENGTH = 4;
    00021
    00022 enum {
    00023   MAX_LANG = 64,
    00024 };
    00025
    00027 enum TextDirection {
    00028   TD_LTR,
    00029   TD_RTL,
    00030 };
    00031
    00033 struct Language {
    00034   char *name;
    00035   char *file;
    00036 };
    00037
    00039 struct DynamicLanguages {
    00040   int num;
    00041   int curr;
    00042   char curr_file[MAX_PATH];
    00043   TextDirection text_dir;
    00044   Language ent[MAX_LANG];
    00045 };
    00046
    00048 enum SpecialStrings {
    00049
    00050   /* special strings for town names. the town name is generated dynamically on request. */
    00051   SPECSTR_TOWNNAME_START     = 0x20C0,
    00052   SPECSTR_TOWNNAME_ENGLISH   = SPECSTR_TOWNNAME_START,
    00053   SPECSTR_TOWNNAME_FRENCH,
    00054   SPECSTR_TOWNNAME_GERMAN,
    00055   SPECSTR_TOWNNAME_AMERICAN,
    00056   SPECSTR_TOWNNAME_LATIN,
    00057   SPECSTR_TOWNNAME_SILLY,
    00058   SPECSTR_TOWNNAME_SWEDISH,
    00059   SPECSTR_TOWNNAME_DUTCH,
    00060   SPECSTR_TOWNNAME_FINNISH,
    00061   SPECSTR_TOWNNAME_POLISH,
    00062   SPECSTR_TOWNNAME_SLOVAK,
    00063   SPECSTR_TOWNNAME_NORWEGIAN,
    00064   SPECSTR_TOWNNAME_HUNGARIAN,
    00065   SPECSTR_TOWNNAME_AUSTRIAN,
    00066   SPECSTR_TOWNNAME_ROMANIAN,
    00067   SPECSTR_TOWNNAME_CZECH,
    00068   SPECSTR_TOWNNAME_SWISS,
    00069   SPECSTR_TOWNNAME_DANISH,
    00070   SPECSTR_TOWNNAME_TURKISH,
    00071   SPECSTR_TOWNNAME_ITALIAN,
    00072   SPECSTR_TOWNNAME_CATALAN,
    00073   SPECSTR_TOWNNAME_LAST      = SPECSTR_TOWNNAME_CATALAN,
    00074
    00075   /* special strings for player names on the form "TownName transport". */
    00076   SPECSTR_PLAYERNAME_START   = 0x70EA,
    00077   SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START,
    00078   SPECSTR_PLAYERNAME_FRENCH,
    00079   SPECSTR_PLAYERNAME_GERMAN,
    00080   SPECSTR_PLAYERNAME_AMERICAN,
    00081   SPECSTR_PLAYERNAME_LATIN,
    00082   SPECSTR_PLAYERNAME_SILLY,
    00083   SPECSTR_PLAYERNAME_LAST    = SPECSTR_PLAYERNAME_SILLY,
    00084
    00085   SPECSTR_ANDCO_NAME         = 0x70E6,
    00086   SPECSTR_PRESIDENT_NAME     = 0x70E7,
    00087
    00088   /* reserve MAX_LANG strings for the *.lng files */
    00089   SPECSTR_LANGUAGE_START     = 0x7100,
    00090   SPECSTR_LANGUAGE_END       = SPECSTR_LANGUAGE_START + MAX_LANG - 1,
    00091
    00092   /* reserve 32 strings for various screen resolutions */
    00093   SPECSTR_RESOLUTION_START   = SPECSTR_LANGUAGE_END + 1,
    00094   SPECSTR_RESOLUTION_END     = SPECSTR_RESOLUTION_START + 0x1F,
    00095
    00096   /* reserve 32 strings for screenshot formats */
    00097   SPECSTR_SCREENSHOT_START   = SPECSTR_RESOLUTION_END + 1,
    00098   SPECSTR_SCREENSHOT_END     = SPECSTR_SCREENSHOT_START + 0x1F,
    00099 };
    00100
    00101 #endif /* STRINGS_TYPE_H */