src/station.cpp
branchgamebalance
changeset 9908 0fa543611bbe
parent 9895 7bd07f43b0e3
child 9909 dce9a6923bb7
equal deleted inserted replaced
9907:3b068c3a1c74 9908:0fa543611bbe
    53 	random_bits = 0; // Random() must be called when station is really built (DC_EXEC)
    53 	random_bits = 0; // Random() must be called when station is really built (DC_EXEC)
    54 	waiting_triggers = 0;
    54 	waiting_triggers = 0;
    55 }
    55 }
    56 
    56 
    57 /**
    57 /**
    58 	* Clean up a station by clearing vehicle orders and invalidating windows.
    58  * Clean up a station by clearing vehicle orders and invalidating windows.
    59 	* Aircraft-Hangar orders need special treatment here, as the hangars are
    59  * Aircraft-Hangar orders need special treatment here, as the hangars are
    60 	* actually part of a station (tiletype is STATION), but the order type
    60  * actually part of a station (tiletype is STATION), but the order type
    61 	* is OT_GOTO_DEPOT.
    61  * is OT_GOTO_DEPOT.
    62 	* @param st Station to be deleted
    62  * @param st Station to be deleted
    63 	*/
    63  */
    64 Station::~Station()
    64 Station::~Station()
    65 {
    65 {
    66 	DEBUG(station, cDebugCtorLevel, "I-%3d", index);
    66 	DEBUG(station, cDebugCtorLevel, "I-%3d", index);
    67 
    67 
    68 	DeleteName(string_id);
    68 	DeleteName(string_id);
   104 void Station::operator delete(void *p, int st_idx)
   104 void Station::operator delete(void *p, int st_idx)
   105 {
   105 {
   106 }
   106 }
   107 
   107 
   108 /** Called when new facility is built on the station. If it is the first facility
   108 /** Called when new facility is built on the station. If it is the first facility
   109 	* it initializes also 'xy' and 'random_bits' members */
   109  * it initializes also 'xy' and 'random_bits' members */
   110 void Station::AddFacility(byte new_facility_bit, TileIndex facil_xy)
   110 void Station::AddFacility(byte new_facility_bit, TileIndex facil_xy)
   111 {
   111 {
   112 	if (facilities == 0) {
   112 	if (facilities == 0) {
   113 		xy = facil_xy;
   113 		xy = facil_xy;
   114 		random_bits = Random();
   114 		random_bits = Random();
   180 
   180 
   181 
   181 
   182 /** Obtain the length of a platform
   182 /** Obtain the length of a platform
   183  * @pre tile must be a railway station tile
   183  * @pre tile must be a railway station tile
   184  * @param tile A tile that contains the platform in question
   184  * @param tile A tile that contains the platform in question
   185  * @returns The length of the platform
   185  * @return The length of the platform
   186  */
   186  */
   187 uint Station::GetPlatformLength(TileIndex tile) const
   187 uint Station::GetPlatformLength(TileIndex tile) const
   188 {
   188 {
   189 	TileIndex t;
   189 	TileIndex t;
   190 	TileIndexDiff delta;
   190 	TileIndexDiff delta;