Translations update
[openttd/fttd.git] / src / waypoint.cpp
blobf6f7b8bb4cfde9d444634d12901be18cb14d057e
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
10 /** @file waypoint.cpp Handling of waypoints. */
12 #include "stdafx.h"
14 #include "order_func.h"
15 #include "window_func.h"
16 #include "newgrf_station.h"
17 #include "waypoint_base.h"
18 #include "station_func.h"
20 void Waypoint::GetTileArea(TileArea *ta, StationType type) const
22 switch (type) {
23 case STATION_WAYPOINT:
24 *ta = this->train_station;
25 return;
27 case STATION_BUOY:
28 ta->tile = this->xy;
29 ta->w = 1;
30 ta->h = 1;
31 break;
33 default: NOT_REACHED();
37 Waypoint::~Waypoint()
39 if (CleaningPool()) return;
40 DeleteWindowById(WC_WAYPOINT_VIEW, this->index);
41 RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);