src/openttd.h
branchgamebalance
changeset 9911 0b8b245a2391
parent 9909 dce9a6923bb7
child 9912 1ac8aac92385
equal deleted inserted replaced
9910:0b2aebc8283e 9911:0b8b245a2391
    38 struct ViewPort;
    38 struct ViewPort;
    39 struct Town;
    39 struct Town;
    40 struct NewsItem;
    40 struct NewsItem;
    41 struct Industry;
    41 struct Industry;
    42 struct DrawPixelInfo;
    42 struct DrawPixelInfo;
       
    43 struct Group;
    43 typedef byte VehicleOrderID;  ///< The index of an order within its current vehicle (not pool related)
    44 typedef byte VehicleOrderID;  ///< The index of an order within its current vehicle (not pool related)
    44 typedef byte CargoID;
    45 typedef byte CargoID;
    45 typedef byte LandscapeID;
    46 typedef byte LandscapeID;
    46 typedef uint32 SpriteID;      ///< The number of a sprite, without mapping bits and colortables
    47 typedef uint32 SpriteID;      ///< The number of a sprite, without mapping bits and colortables
    47 struct PalSpriteID {
    48 struct PalSpriteID {
    61 typedef uint16 IndustryID;
    62 typedef uint16 IndustryID;
    62 typedef uint16 DepotID;
    63 typedef uint16 DepotID;
    63 typedef uint16 WaypointID;
    64 typedef uint16 WaypointID;
    64 typedef uint16 OrderID;
    65 typedef uint16 OrderID;
    65 typedef uint16 SignID;
    66 typedef uint16 SignID;
       
    67 typedef uint16 GroupID;
    66 typedef uint16 EngineRenewID;
    68 typedef uint16 EngineRenewID;
    67 typedef uint16 DestinationID;
    69 typedef uint16 DestinationID;
    68 
    70 
    69 /* DestinationID must be at least as large as every these below, because it can
    71 /* DestinationID must be at least as large as every these below, because it can
    70  * be any of them
    72  * be any of them
   169 };
   171 };
   170 
   172 
   171 
   173 
   172 /* Display Options */
   174 /* Display Options */
   173 enum {
   175 enum {
   174 	DO_SHOW_TOWN_NAMES    = 1 << 0,
   176 	DO_SHOW_TOWN_NAMES    = 0,
   175 	DO_SHOW_STATION_NAMES = 1 << 1,
   177 	DO_SHOW_STATION_NAMES = 1,
   176 	DO_SHOW_SIGNS         = 1 << 2,
   178 	DO_SHOW_SIGNS         = 2,
   177 	DO_FULL_ANIMATION     = 1 << 3,
   179 	DO_FULL_ANIMATION     = 3,
   178 	DO_FULL_DETAIL        = 1 << 5,
   180 	DO_FULL_DETAIL        = 5,
   179 	DO_WAYPOINTS          = 1 << 6,
   181 	DO_WAYPOINTS          = 6,
   180 };
   182 };
   181 
   183 
   182 enum {
   184 enum {
   183 	TO_SIGNS,
   185 	TO_SIGNS,
   184 	TO_TREES,
   186 	TO_TREES,
   198 
   200 
   199 	NUM_LANDSCAPE = 4,
   201 	NUM_LANDSCAPE = 4,
   200 };
   202 };
   201 
   203 
   202 #define GAME_DIFFICULTY_NUM 20
   204 #define GAME_DIFFICULTY_NUM 20
       
   205 /**
       
   206  * Town Layouts
       
   207  */
       
   208 enum TownLayout {
       
   209 	TL_NO_ROADS     = 0, ///< Build no more roads, but still build houses
       
   210 	TL_ORIGINAL,         ///< Original algorithm (min. 1 distance between roads)
       
   211 	TL_BETTER_ROADS,     ///< Extended original algorithm (min. 2 distance between roads)
       
   212 	TL_2X2_GRID,         ///< Geometric 2x2 grid algorithm
       
   213 	TL_3X3_GRID,         ///< Geometric 3x3 grid algorithm
       
   214 
       
   215 	NUM_TLS,             ///< Number of town layouts
       
   216 };
       
   217 
       
   218 /* It needs to be 8bits, because we save and load it as such */
       
   219 /** Define basic enum properties */
       
   220 template <> struct EnumPropsT<TownLayout> : MakeEnumPropsT<TownLayout, byte, TL_NO_ROADS, NUM_TLS, NUM_TLS> {};
       
   221 typedef TinyEnumT<TownLayout> TownLayoutByte; //typedefing-enumification of TownLayout
   203 
   222 
   204 struct GameDifficulty {
   223 struct GameDifficulty {
   205 	int max_no_competitors;
   224 	int max_no_competitors;
   206 	int competitor_start_time;
   225 	int competitor_start_time;
   207 	int number_towns;
   226 	int number_towns;
   419 	WC_CONFIRM_POPUP_QUERY,
   438 	WC_CONFIRM_POPUP_QUERY,
   420 	WC_TRANSPARENCY_TOOLBAR,
   439 	WC_TRANSPARENCY_TOOLBAR,
   421 };
   440 };
   422 
   441 
   423 
   442 
   424 enum {
   443 enum ExpensesType {
   425 	EXPENSES_CONSTRUCTION =  0,
   444 	EXPENSES_CONSTRUCTION =  0,
   426 	EXPENSES_NEW_VEHICLES =  1,
   445 	EXPENSES_NEW_VEHICLES =  1,
   427 	EXPENSES_TRAIN_RUN    =  2,
   446 	EXPENSES_TRAIN_RUN    =  2,
   428 	EXPENSES_ROADVEH_RUN  =  3,
   447 	EXPENSES_ROADVEH_RUN  =  3,
   429 	EXPENSES_AIRCRAFT_RUN =  4,
   448 	EXPENSES_AIRCRAFT_RUN =  4,