src/openttd.h
branchNewGRF_ports
changeset 6719 4cc327ad39d5
parent 6683 7ec558346172
child 6720 35756db7e577
--- a/src/openttd.h	Tue Mar 27 23:27:27 2007 +0000
+++ b/src/openttd.h	Sat Jun 02 19:59:29 2007 +0000
@@ -40,6 +40,7 @@
 struct NewsItem;
 struct Industry;
 struct DrawPixelInfo;
+struct Group;
 typedef byte VehicleOrderID;  ///< The index of an order within its current vehicle (not pool related)
 typedef byte CargoID;
 typedef byte LandscapeID;
@@ -63,6 +64,7 @@
 typedef uint16 WaypointID;
 typedef uint16 OrderID;
 typedef uint16 SignID;
+typedef uint16 GroupID;
 typedef uint16 EngineRenewID;
 typedef uint16 DestinationID;
 
@@ -171,14 +173,22 @@
 
 /* Display Options */
 enum {
-	DO_SHOW_TOWN_NAMES    = 1 << 0,
-	DO_SHOW_STATION_NAMES = 1 << 1,
-	DO_SHOW_SIGNS         = 1 << 2,
-	DO_FULL_ANIMATION     = 1 << 3,
-	DO_TRANS_BUILDINGS    = 1 << 4,
-	DO_FULL_DETAIL        = 1 << 5,
-	DO_WAYPOINTS          = 1 << 6,
-	DO_TRANS_SIGNS        = 1 << 7,
+	DO_SHOW_TOWN_NAMES    = 0,
+	DO_SHOW_STATION_NAMES = 1,
+	DO_SHOW_SIGNS         = 2,
+	DO_FULL_ANIMATION     = 3,
+	DO_FULL_DETAIL        = 5,
+	DO_WAYPOINTS          = 6,
+};
+
+enum {
+	TO_SIGNS,
+	TO_TREES,
+	TO_HOUSES,
+	TO_INDUSTRIES,
+	TO_BUILDINGS,
+	TO_BRIDGES,
+	TO_STRUCTURES,
 };
 
 /* Landscape types */
@@ -191,6 +201,24 @@
 	NUM_LANDSCAPE = 4,
 };
 
+/**
+ * Town Layouts
+ */
+enum TownLayout {
+	TL_NO_ROADS     = 0, ///< Build no more roads, but still build houses
+	TL_ORIGINAL,         ///< Original algorithm (min. 1 distance between roads)
+	TL_BETTER_ROADS,     ///< Extended original algorithm (min. 2 distance between roads)
+	TL_2X2_GRID,         ///< Geometric 2x2 grid algorithm
+	TL_3X3_GRID,         ///< Geometric 3x3 grid algorithm
+
+	NUM_TLS,             ///< Number of town layouts
+};
+
+/* It needs to be 8bits, because we save and load it as such */
+/** Define basic enum properties */
+template <> struct EnumPropsT<TownLayout> : MakeEnumPropsT<TownLayout, byte, TL_NO_ROADS, NUM_TLS, NUM_TLS> {};
+typedef TinyEnumT<TownLayout> TownLayoutByte; //typedefing-enumification of TownLayout
+
 enum {
 	NUM_PRICES = 49,
 };
@@ -281,13 +309,13 @@
 	CT_IRON_ORE     =  8,
 	CT_STEEL        =  9,
 	CT_VALUABLES    = 10,
-	CT_FOOD         = 11,
 
 	// Arctic
 	CT_WHEAT        =  6,
 	CT_HILLY_UNUSED =  8,
 	CT_PAPER        =  9,
 	CT_GOLD         = 10,
+	CT_FOOD         = 11,
 
 	// Tropic
 	CT_RUBBER       =  1,
@@ -309,7 +337,7 @@
 	CT_PLASTIC      = 10,
 	CT_FIZZY_DRINKS = 11,
 
-	NUM_CARGO       = 12,
+	NUM_CARGO       = 32,
 
 	CT_NO_REFIT     = 0xFE,
 	CT_INVALID      = 0xFF
@@ -336,7 +364,8 @@
 typedef int32 ClearTileProc(TileIndex tile, byte flags);
 typedef void GetAcceptedCargoProc(TileIndex tile, AcceptedCargo res);
 typedef void GetTileDescProc(TileIndex tile, TileDesc *td);
-/* GetTileTrackStatusProcs return a value that contains the possible tracks
+/**
+ * GetTileTrackStatusProcs return a value that contains the possible tracks
  * that can be taken on a given tile by a given transport. The return value is
  * composed as follows: 0xaabbccdd. ccdd and aabb are bitmasks of trackdirs,
  * where bit n corresponds to trackdir n. ccdd are the trackdirs that are
@@ -354,8 +383,12 @@
  * are a track, the fourth bit is the direction. these give 12 (or 14)
  * possible options: 0-5 and 8-13, so we need 14 bits for a trackdir bitmask
  * above.
+ * @param tile     the tile to get the track status from
+ * @param mode     the mode of transportation
+ * @param sub_mode used to differentiate between different kinds within the mode
+ * @return the above mentions track status information
  */
-typedef uint32 GetTileTrackStatusProc(TileIndex tile, TransportType mode);
+typedef uint32 GetTileTrackStatusProc(TileIndex tile, TransportType mode, uint sub_mode);
 typedef void GetProducedCargoProc(TileIndex tile, CargoID *b);
 typedef void ClickTileProc(TileIndex tile);
 typedef void AnimateTileProc(TileIndex tile);
@@ -461,10 +494,11 @@
 	WC_GENERATE_LANDSCAPE,
 	WC_GENERATE_PROGRESS_WINDOW,
 	WC_CONFIRM_POPUP_QUERY,
+	WC_TRANSPARENCY_TOOLBAR,
 };
 
 
-enum {
+enum ExpensesType {
 	EXPENSES_CONSTRUCTION =  0,
 	EXPENSES_NEW_VEHICLES =  1,
 	EXPENSES_TRAIN_RUN    =  2,