src/openttd.h
changeset 8610 17cc343a23dd
parent 8609 8c0c3e9dd6a0
child 8612 6414fc21c2f3
equal deleted inserted replaced
8609:8c0c3e9dd6a0 8610:17cc343a23dd
     7 #ifndef VARDEF
     7 #ifndef VARDEF
     8 #define VARDEF extern
     8 #define VARDEF extern
     9 #endif
     9 #endif
    10 
    10 
    11 #include "helpers.hpp"
    11 #include "helpers.hpp"
       
    12 #include "strings_type.h"
    12 
    13 
    13 struct Oblong {
    14 struct Oblong {
    14 	int x, y;
    15 	int x, y;
    15 	int width, height;
    16 	int width, height;
    16 };
    17 };
    47 	SpriteID sprite;
    48 	SpriteID sprite;
    48 	SpriteID pal;
    49 	SpriteID pal;
    49 };
    50 };
    50 typedef uint16 EngineID;
    51 typedef uint16 EngineID;
    51 typedef uint16 UnitID;
    52 typedef uint16 UnitID;
    52 typedef uint16 StringID;
       
    53 static const StringID INVALID_STRING_ID = 0xFFFF;
       
    54 
    53 
    55 typedef EngineID *EngineList; ///< engine list type placeholder acceptable for C code (see helpers.cpp)
    54 typedef EngineID *EngineList; ///< engine list type placeholder acceptable for C code (see helpers.cpp)
    56 
    55 
    57 /* IDs used in Pools */
    56 /* IDs used in Pools */
    58 typedef uint16 StationID;
    57 typedef uint16 StationID;
   512 	EXPENSES_SHIP_INC     = 10,
   511 	EXPENSES_SHIP_INC     = 10,
   513 	EXPENSES_LOAN_INT     = 11,
   512 	EXPENSES_LOAN_INT     = 11,
   514 	EXPENSES_OTHER        = 12,
   513 	EXPENSES_OTHER        = 12,
   515 };
   514 };
   516 
   515 
   517 enum {
       
   518 	MAX_LANG = 64,
       
   519 };
       
   520 
       
   521 // special string constants
       
   522 enum SpecialStrings {
       
   523 
       
   524 	// special strings for town names. the town name is generated dynamically on request.
       
   525 	SPECSTR_TOWNNAME_START     = 0x20C0,
       
   526 	SPECSTR_TOWNNAME_ENGLISH   = SPECSTR_TOWNNAME_START,
       
   527 	SPECSTR_TOWNNAME_FRENCH,
       
   528 	SPECSTR_TOWNNAME_GERMAN,
       
   529 	SPECSTR_TOWNNAME_AMERICAN,
       
   530 	SPECSTR_TOWNNAME_LATIN,
       
   531 	SPECSTR_TOWNNAME_SILLY,
       
   532 	SPECSTR_TOWNNAME_SWEDISH,
       
   533 	SPECSTR_TOWNNAME_DUTCH,
       
   534 	SPECSTR_TOWNNAME_FINNISH,
       
   535 	SPECSTR_TOWNNAME_POLISH,
       
   536 	SPECSTR_TOWNNAME_SLOVAKISH,
       
   537 	SPECSTR_TOWNNAME_NORWEGIAN,
       
   538 	SPECSTR_TOWNNAME_HUNGARIAN,
       
   539 	SPECSTR_TOWNNAME_AUSTRIAN,
       
   540 	SPECSTR_TOWNNAME_ROMANIAN,
       
   541 	SPECSTR_TOWNNAME_CZECH,
       
   542 	SPECSTR_TOWNNAME_SWISS,
       
   543 	SPECSTR_TOWNNAME_DANISH,
       
   544 	SPECSTR_TOWNNAME_TURKISH,
       
   545 	SPECSTR_TOWNNAME_ITALIAN,
       
   546 	SPECSTR_TOWNNAME_CATALAN,
       
   547 	SPECSTR_TOWNNAME_LAST      = SPECSTR_TOWNNAME_CATALAN,
       
   548 
       
   549 	// special strings for player names on the form "TownName transport".
       
   550 	SPECSTR_PLAYERNAME_START   = 0x70EA,
       
   551 	SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START,
       
   552 	SPECSTR_PLAYERNAME_FRENCH,
       
   553 	SPECSTR_PLAYERNAME_GERMAN,
       
   554 	SPECSTR_PLAYERNAME_AMERICAN,
       
   555 	SPECSTR_PLAYERNAME_LATIN,
       
   556 	SPECSTR_PLAYERNAME_SILLY,
       
   557 	SPECSTR_PLAYERNAME_LAST    = SPECSTR_PLAYERNAME_SILLY,
       
   558 
       
   559 	SPECSTR_ANDCO_NAME         = 0x70E6,
       
   560 	SPECSTR_PRESIDENT_NAME     = 0x70E7,
       
   561 	SPECSTR_SONGNAME           = 0x70E8,
       
   562 
       
   563 	// reserve MAX_LANG strings for the *.lng files
       
   564 	SPECSTR_LANGUAGE_START     = 0x7100,
       
   565 	SPECSTR_LANGUAGE_END       = SPECSTR_LANGUAGE_START + MAX_LANG - 1,
       
   566 
       
   567 	// reserve 32 strings for various screen resolutions
       
   568 	SPECSTR_RESOLUTION_START   = SPECSTR_LANGUAGE_END + 1,
       
   569 	SPECSTR_RESOLUTION_END     = SPECSTR_RESOLUTION_START + 0x1F,
       
   570 
       
   571 	// reserve 32 strings for screenshot formats
       
   572 	SPECSTR_SCREENSHOT_START   = SPECSTR_RESOLUTION_END + 1,
       
   573 	SPECSTR_SCREENSHOT_END     = SPECSTR_SCREENSHOT_START + 0x1F,
       
   574 
       
   575 	// Used to implement SetDParamStr
       
   576 	STR_SPEC_DYNSTRING         = 0xF800,
       
   577 	STR_SPEC_USERSTRING        = 0xF808,
       
   578 };
       
   579 
       
   580 typedef void PlaceProc(TileIndex tile);
   516 typedef void PlaceProc(TileIndex tile);
   581 
   517 
   582 enum {
   518 enum {
   583 	SORT_ASCENDING  = 0,
   519 	SORT_ASCENDING  = 0,
   584 	SORT_DESCENDING = 1,
   520 	SORT_DESCENDING = 1,