summaryrefslogtreecommitdiff
path: root/src/station_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r--src/station_gui.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 62d8c54a4..f0abf4626 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -783,7 +783,7 @@ struct StationViewWindow : public Window {
StationViewWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
- Owner owner = GetStation(window_number)->owner;
+ Owner owner = Station::Get(window_number)->owner;
if (owner != OWNER_NONE) this->owner = owner;
this->vscroll.cap = 5;
this->resize.step_height = 10;
@@ -794,7 +794,7 @@ struct StationViewWindow : public Window {
~StationViewWindow()
{
WindowNumber wno =
- (this->window_number << 16) | VLW_STATION_LIST | GetStation(this->window_number)->owner;
+ (this->window_number << 16) | VLW_STATION_LIST | Station::Get(this->window_number)->owner;
DeleteWindowById(WC_TRAINS_LIST, wno | (VEH_TRAIN << 11), false);
DeleteWindowById(WC_ROADVEH_LIST, wno | (VEH_ROAD << 11), false);
@@ -805,7 +805,7 @@ struct StationViewWindow : public Window {
virtual void OnPaint()
{
StationID station_id = this->window_number;
- const Station *st = GetStation(station_id);
+ const Station *st = Station::Get(station_id);
CargoDataList cargolist;
uint32 transfers = 0;
@@ -982,9 +982,9 @@ struct StationViewWindow : public Window {
case SVW_LOCATION:
if (_ctrl_pressed) {
- ShowExtraViewPortWindow(GetStation(this->window_number)->xy);
+ ShowExtraViewPortWindow(Station::Get(this->window_number)->xy);
} else {
- ScrollMainWindowToTile(GetStation(this->window_number)->xy);
+ ScrollMainWindowToTile(Station::Get(this->window_number)->xy);
}
break;
@@ -1012,19 +1012,19 @@ struct StationViewWindow : public Window {
break;
case SVW_TRAINS: { // Show a list of scheduled trains to this station
- const Station *st = GetStation(this->window_number);
+ const Station *st = Station::Get(this->window_number);
ShowVehicleListWindow(st->owner, VEH_TRAIN, (StationID)this->window_number);
break;
}
case SVW_ROADVEHS: { // Show a list of scheduled road-vehicles to this station
- const Station *st = GetStation(this->window_number);
+ const Station *st = Station::Get(this->window_number);
ShowVehicleListWindow(st->owner, VEH_ROAD, (StationID)this->window_number);
break;
}
case SVW_PLANES: { // Show a list of scheduled aircraft to this station
- const Station *st = GetStation(this->window_number);
+ const Station *st = Station::Get(this->window_number);
/* Since oilrigs have no owners, show the scheduled aircraft of local company */
Owner owner = (st->owner == OWNER_NONE) ? _local_company : st->owner;
ShowVehicleListWindow(owner, VEH_AIRCRAFT, (StationID)this->window_number);
@@ -1032,7 +1032,7 @@ struct StationViewWindow : public Window {
}
case SVW_SHIPS: { // Show a list of scheduled ships to this station
- const Station *st = GetStation(this->window_number);
+ const Station *st = Station::Get(this->window_number);
/* Since oilrigs/bouys have no owners, show the scheduled ships of local company */
Owner owner = (st->owner == OWNER_NONE) ? _local_company : st->owner;
ShowVehicleListWindow(owner, VEH_SHIP, (StationID)this->window_number);
@@ -1104,7 +1104,7 @@ static bool AddNearbyStation(TileIndex tile, void *user_data)
if (!IsTileType(tile, MP_STATION)) return false;
StationID sid = GetStationIndex(tile);
- Station *st = GetStation(sid);
+ Station *st = Station::Get(sid);
if (st->owner != _local_company || _stations_nearby_list.Contains(sid)) return false;
if (st->rect.BeforeAddRect(ctx->tile, ctx->w, ctx->h, StationRect::ADD_TEST)) {
@@ -1236,7 +1236,7 @@ struct SelectStationWindow : Window {
/* Don't draw anything if it extends past the end of the window. */
if (i - this->vscroll.pos >= this->vscroll.cap) break;
- const Station *st = GetStation(_stations_nearby_list[i - 1]);
+ const Station *st = Station::Get(_stations_nearby_list[i - 1]);
SetDParam(0, st->index);
SetDParam(1, st->facilities);
DrawString(3, this->widget[JSW_PANEL].right - 2, y, STR_STATION_LIST_STATION);