src/station_cmd.cpp
changeset 6483 ae78fc3c6b20
parent 6463 e986fe39dfe7
child 6484 79156627e1ba
equal deleted inserted replaced
6482:f1f014402d39 6483:ae78fc3c6b20
   787 	}
   787 	}
   788 }
   788 }
   789 
   789 
   790 /** Build railroad station
   790 /** Build railroad station
   791  * @param tile_org starting position of station dragging/placement
   791  * @param tile_org starting position of station dragging/placement
       
   792  * @param flags operation to perform
   792  * @param p1 various bitstuffed elements
   793  * @param p1 various bitstuffed elements
   793  * - p1 = (bit  0)    - orientation (Axis)
   794  * - p1 = (bit  0)    - orientation (Axis)
   794  * - p1 = (bit  8-15) - number of tracks
   795  * - p1 = (bit  8-15) - number of tracks
   795  * - p1 = (bit 16-23) - platform length
   796  * - p1 = (bit 16-23) - platform length
   796  * @param p2 various bitstuffed elements
   797  * @param p2 various bitstuffed elements
  1021 }
  1022 }
  1022 
  1023 
  1023 /** Remove a single tile from a railroad station.
  1024 /** Remove a single tile from a railroad station.
  1024  * This allows for custom-built station with holes and weird layouts
  1025  * This allows for custom-built station with holes and weird layouts
  1025  * @param tile tile of station piece to remove
  1026  * @param tile tile of station piece to remove
       
  1027  * @param flags operation to perform
  1026  * @param p1 unused
  1028  * @param p1 unused
  1027  * @param p2 unused
  1029  * @param p2 unused
  1028  */
  1030  */
  1029 int32 CmdRemoveFromRailroadStation(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1031 int32 CmdRemoveFromRailroadStation(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1030 {
  1032 {
  1172 	}
  1174 	}
  1173 }
  1175 }
  1174 
  1176 
  1175 /** Build a bus or truck stop
  1177 /** Build a bus or truck stop
  1176  * @param tile tile to build the stop at
  1178  * @param tile tile to build the stop at
       
  1179  * @param flags operation to perform
       
  1180  * @param flags operation to perform
  1177  * @param p1 entrance direction (DiagDirection)
  1181  * @param p1 entrance direction (DiagDirection)
  1178  * @param p2 bit 0: 0 for Bus stops, 1 for truck stops
  1182  * @param p2 bit 0: 0 for Bus stops, 1 for truck stops
  1179  *           bit 1: 0 for normal, 1 for drive-through
  1183  *           bit 1: 0 for normal, 1 for drive-through
  1180  */
  1184  */
  1181 int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1185 int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1339 	return (is_truck) ? _price.remove_truck_station : _price.remove_bus_station;
  1343 	return (is_truck) ? _price.remove_truck_station : _price.remove_bus_station;
  1340 }
  1344 }
  1341 
  1345 
  1342 /** Remove a bus or truck stop
  1346 /** Remove a bus or truck stop
  1343  * @param tile tile to remove the stop from
  1347  * @param tile tile to remove the stop from
       
  1348  * @param flags operation to perform
  1344  * @param p1 not used
  1349  * @param p1 not used
  1345  * @param p2 bit 0: 0 for Bus stops, 1 for truck stops
  1350  * @param p2 bit 0: 0 for Bus stops, 1 for truck stops
  1346  */
  1351  */
  1347 int32 CmdRemoveRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1352 int32 CmdRemoveRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1348 {
  1353 {
  1464 	_airport_sections_helistation        // Helistation
  1469 	_airport_sections_helistation        // Helistation
  1465 };
  1470 };
  1466 
  1471 
  1467 /** Place an Airport.
  1472 /** Place an Airport.
  1468  * @param tile tile where airport will be built
  1473  * @param tile tile where airport will be built
       
  1474  * @param flags operation to perform
  1469  * @param p1 airport type, @see airport.h
  1475  * @param p1 airport type, @see airport.h
  1470  * @param p2 unused
  1476  * @param p2 unused
  1471  */
  1477  */
  1472 int32 CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1478 int32 CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1473 {
  1479 {
  1639 	return cost;
  1645 	return cost;
  1640 }
  1646 }
  1641 
  1647 
  1642 /** Build a buoy.
  1648 /** Build a buoy.
  1643  * @param tile tile where to place the bouy
  1649  * @param tile tile where to place the bouy
       
  1650  * @param flags operation to perform
  1644  * @param p1 unused
  1651  * @param p1 unused
  1645  * @param p2 unused
  1652  * @param p2 unused
  1646  */
  1653  */
  1647 int32 CmdBuildBuoy(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1654 int32 CmdBuildBuoy(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1648 {
  1655 {
  1747 static const byte _dock_w_chk[4] = { 2, 1, 2, 1 };
  1754 static const byte _dock_w_chk[4] = { 2, 1, 2, 1 };
  1748 static const byte _dock_h_chk[4] = { 1, 2, 1, 2 };
  1755 static const byte _dock_h_chk[4] = { 1, 2, 1, 2 };
  1749 
  1756 
  1750 /** Build a dock/haven.
  1757 /** Build a dock/haven.
  1751  * @param tile tile where dock will be built
  1758  * @param tile tile where dock will be built
       
  1759  * @param flags operation to perform
  1752  * @param p1 unused
  1760  * @param p1 unused
  1753  * @param p2 unused
  1761  * @param p2 unused
  1754  */
  1762  */
  1755 int32 CmdBuildDock(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1763 int32 CmdBuildDock(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  1756 {
  1764 {
  2379 	st->MarkTilesDirty();
  2387 	st->MarkTilesDirty();
  2380 }
  2388 }
  2381 
  2389 
  2382 /** Rename a station
  2390 /** Rename a station
  2383  * @param tile unused
  2391  * @param tile unused
       
  2392  * @param flags operation to perform
  2384  * @param p1 station ID that is to be renamed
  2393  * @param p1 station ID that is to be renamed
  2385  * @param p2 unused
  2394  * @param p2 unused
  2386  */
  2395  */
  2387 int32 CmdRenameStation(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  2396 int32 CmdRenameStation(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
  2388 {
  2397 {