Files
@ r20718:cc912091a170
Branch filter:
Location: cpp/openttd-patchpack/source/src/waypoint.cpp - annotation
r20718:cc912091a170
1.6 KiB
text/x-c
(svn r25756) -Update from WebTranslator v3.0:
indonesian - 2 changes by UseYourIllusion
indonesian - 2 changes by UseYourIllusion
r5584:545d748cc681 r5584:545d748cc681 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r9111:983de9c5a848 r6432:3f618c3647c2 r5584:545d748cc681 r5584:545d748cc681 r12465:c1b760a56db7 r8131:7a50db7be0ff r8787:4e60a460f8ef r12465:c1b760a56db7 r5584:545d748cc681 r6432:3f618c3647c2 r6432:3f618c3647c2 r6432:3f618c3647c2 r6432:3f618c3647c2 r6432:3f618c3647c2 r6432:3f618c3647c2 r6432:3f618c3647c2 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r12425:833b231d2630 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r12452:737113301015 r12452:737113301015 r12452:737113301015 r14122:9ef38edd8bb5 r14122:9ef38edd8bb5 r14122:9ef38edd8bb5 r14122:9ef38edd8bb5 r12452:737113301015 r14122:9ef38edd8bb5 r14122:9ef38edd8bb5 r14122:9ef38edd8bb5 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r7381:7ca8ddb92031 r7381:7ca8ddb92031 r7413:3ccdde9800e0 r9964:c2a3e9be6d4b r7381:7ca8ddb92031 r7381:7ca8ddb92031 | /* $Id$ */
/*
* This file is part of OpenTTD.
* 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.
* 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.
* 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/>.
*/
/** @file waypoint.cpp Handling of waypoints. */
#include "stdafx.h"
#include "order_func.h"
#include "window_func.h"
#include "newgrf_station.h"
#include "waypoint_base.h"
/**
* Draw a waypoint
* @param x coordinate
* @param y coordinate
* @param stat_id station id
* @param railtype RailType to use for
*/
void DrawWaypointSprite(int x, int y, int stat_id, RailType railtype)
{
if (!DrawStationTile(x, y, railtype, AXIS_X, STAT_CLASS_WAYP, stat_id)) {
StationPickerDrawSprite(x, y, STATION_WAYPOINT, railtype, INVALID_ROADTYPE, AXIS_X);
}
}
void Waypoint::GetTileArea(TileArea *ta, StationType type) const
{
switch (type) {
case STATION_WAYPOINT:
*ta = this->train_station;
return;
case STATION_BUOY:
ta->tile = this->xy;
ta->w = 1;
ta->h = 1;
break;
default: NOT_REACHED();
}
}
Waypoint::~Waypoint()
{
if (CleaningPool()) return;
DeleteWindowById(WC_WAYPOINT_VIEW, this->index);
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);
}
|