# strings_type.h

Go to the documentation of this file.

    00001 /* $Id$ */
    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 static const uint MAX_LANG              = 0x7F;
    00022
    00024 enum TextDirection {
    00025   TD_LTR,
    00026   TD_RTL,
    00027 };
    00028
    00030 enum SpecialStrings {
    00031
    00032   /* special strings for town names. the town name is generated dynamically on request. */
    00033   SPECSTR_TOWNNAME_START     = 0x20C0,
    00034   SPECSTR_TOWNNAME_ENGLISH   = SPECSTR_TOWNNAME_START,
    00035   SPECSTR_TOWNNAME_FRENCH,
    00036   SPECSTR_TOWNNAME_GERMAN,
    00037   SPECSTR_TOWNNAME_AMERICAN,
    00038   SPECSTR_TOWNNAME_LATIN,
    00039   SPECSTR_TOWNNAME_SILLY,
    00040   SPECSTR_TOWNNAME_SWEDISH,
    00041   SPECSTR_TOWNNAME_DUTCH,
    00042   SPECSTR_TOWNNAME_FINNISH,
    00043   SPECSTR_TOWNNAME_POLISH,
    00044   SPECSTR_TOWNNAME_SLOVAK,
    00045   SPECSTR_TOWNNAME_NORWEGIAN,
    00046   SPECSTR_TOWNNAME_HUNGARIAN,
    00047   SPECSTR_TOWNNAME_AUSTRIAN,
    00048   SPECSTR_TOWNNAME_ROMANIAN,
    00049   SPECSTR_TOWNNAME_CZECH,
    00050   SPECSTR_TOWNNAME_SWISS,
    00051   SPECSTR_TOWNNAME_DANISH,
    00052   SPECSTR_TOWNNAME_TURKISH,
    00053   SPECSTR_TOWNNAME_ITALIAN,
    00054   SPECSTR_TOWNNAME_CATALAN,
    00055   SPECSTR_TOWNNAME_LAST      = SPECSTR_TOWNNAME_CATALAN,
    00056
    00057   /* special strings for player names on the form "TownName transport". */
    00058   SPECSTR_PLAYERNAME_START   = 0x70EA,
    00059   SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START,
    00060   SPECSTR_PLAYERNAME_FRENCH,
    00061   SPECSTR_PLAYERNAME_GERMAN,
    00062   SPECSTR_PLAYERNAME_AMERICAN,
    00063   SPECSTR_PLAYERNAME_LATIN,
    00064   SPECSTR_PLAYERNAME_SILLY,
    00065   SPECSTR_PLAYERNAME_LAST    = SPECSTR_PLAYERNAME_SILLY,
    00066
    00067   SPECSTR_ANDCO_NAME         = 0x70E6,
    00068   SPECSTR_PRESIDENT_NAME     = 0x70E7,
    00069
    00070   /* reserve MAX_LANG strings for the *.lng files */
    00071   SPECSTR_LANGUAGE_START     = 0x7100,
    00072   SPECSTR_LANGUAGE_END       = SPECSTR_LANGUAGE_START + MAX_LANG - 1,
    00073
    00074   /* reserve 32 strings for various screen resolutions */
    00075   SPECSTR_RESOLUTION_START   = SPECSTR_LANGUAGE_END + 1,
    00076   SPECSTR_RESOLUTION_END     = SPECSTR_RESOLUTION_START + 0x1F,
    00077
    00078   /* reserve 32 strings for screenshot formats */
    00079   SPECSTR_SCREENSHOT_START   = SPECSTR_RESOLUTION_END + 1,
    00080   SPECSTR_SCREENSHOT_END     = SPECSTR_SCREENSHOT_START + 0x1F,
    00081 };
    00082
    00083 #endif /* STRINGS_TYPE_H */