Files
@ r12462:a7cb564c6c56
Branch filter:
Location: cpp/openttd-patchpack/source/src/waypoint.cpp - annotation
r12462:a7cb564c6c56
1.0 KiB
text/x-c
(svn r16909) -Fix [FS#2996]: NewGRF stations would be triggering assertions all over the place when using the more advanced station types.
-Change: make (rail) waypoints sub classes of 'base stations', make buoys waypoints and unify code between them where possible.
-Change: make (rail) waypoints sub classes of 'base stations', make buoys waypoints and unify code between them where possible.
r5584:545d748cc681 r5584:545d748cc681 r9111:983de9c5a848 r6432:3f618c3647c2 r5584:545d748cc681 r5584:545d748cc681 r11349:d10cdef1879d r8138:f851b4cbdad1 r8785:8312063c5ee4 r5584:545d748cc681 r5584:545d748cc681 r8131:7a50db7be0ff r8787:4e60a460f8ef r11349:d10cdef1879d 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 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r12452:737113301015 r7381:7ca8ddb92031 r7381:7ca8ddb92031 r7413:3ccdde9800e0 r9964:c2a3e9be6d4b r7381:7ca8ddb92031 r7381:7ca8ddb92031 r12334:57fa457522c9 r7381:7ca8ddb92031 | /* $Id$ */
/** @file waypoint.cpp Handling of waypoints. */
#include "stdafx.h"
#include "strings_type.h"
#include "rail.h"
#include "station_base.h"
#include "town.h"
#include "waypoint.h"
#include "window_func.h"
#include "newgrf_station.h"
#include "order_func.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_BUOY:
case STATION_WAYPOINT:
break;
default: NOT_REACHED();
}
ta->tile = this->xy;
ta->w = 1;
ta->h = 1;
}
Waypoint::~Waypoint()
{
if (CleaningPool()) return;
DeleteWindowById(WC_WAYPOINT_VIEW, this->index);
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);
this->sign.MarkDirty();
}
|