summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rail_gui.cpp2
-rw-r--r--src/road_gui.cpp12
-rw-r--r--src/waypoint.cpp3
3 files changed, 7 insertions, 10 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 997452bed..e2fb10776 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -1814,7 +1814,7 @@ struct BuildRailWaypointWindow : PickerWindowBase {
if (this->hscroll.pos + i < this->hscroll.count) {
const StationSpec *statspec = GetCustomStationSpec(STAT_CLASS_WAYP, this->hscroll.pos + i);
- DrawWaypointSprite(2 + i * 68, 25, this->hscroll.pos + i, _cur_railtype);
+ DrawWaypointSprite(this->widget[BRWW_WAYPOINT_1 + i].left + TILE_PIXELS, this->widget[BRWW_WAYPOINT_1 + i].bottom - TILE_PIXELS, this->hscroll.pos + i, _cur_railtype);
if (statspec != NULL &&
HasBit(statspec->callbackmask, CBM_STATION_AVAIL) &&
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index cb7155f92..aa38c4923 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -947,13 +947,13 @@ struct BuildRoadStationWindow : public PickerWindowBase {
StationType st = (this->window_class == WC_BUS_STATION) ? STATION_BUS : STATION_TRUCK;
- StationPickerDrawSprite(103, 35, st, INVALID_RAILTYPE, ROADTYPE_ROAD, 0);
- StationPickerDrawSprite(103, 85, st, INVALID_RAILTYPE, ROADTYPE_ROAD, 1);
- StationPickerDrawSprite( 35, 85, st, INVALID_RAILTYPE, ROADTYPE_ROAD, 2);
- StationPickerDrawSprite( 35, 35, st, INVALID_RAILTYPE, ROADTYPE_ROAD, 3);
+ StationPickerDrawSprite(this->widget[BRSW_STATION_NE].left + TILE_PIXELS, this->widget[BRSW_STATION_NE].bottom - TILE_PIXELS, st, INVALID_RAILTYPE, ROADTYPE_ROAD, DIAGDIR_NE);
+ StationPickerDrawSprite(this->widget[BRSW_STATION_SE].left + TILE_PIXELS, this->widget[BRSW_STATION_SE].bottom - TILE_PIXELS, st, INVALID_RAILTYPE, ROADTYPE_ROAD, DIAGDIR_SE);
+ StationPickerDrawSprite(this->widget[BRSW_STATION_SW].left + TILE_PIXELS, this->widget[BRSW_STATION_SW].bottom - TILE_PIXELS, st, INVALID_RAILTYPE, ROADTYPE_ROAD, DIAGDIR_SW);
+ StationPickerDrawSprite(this->widget[BRSW_STATION_NW].left + TILE_PIXELS, this->widget[BRSW_STATION_NW].bottom - TILE_PIXELS, st, INVALID_RAILTYPE, ROADTYPE_ROAD, DIAGDIR_NW);
- StationPickerDrawSprite(171, 35, st, INVALID_RAILTYPE, _cur_roadtype, 4);
- StationPickerDrawSprite(171, 85, st, INVALID_RAILTYPE, _cur_roadtype, 5);
+ StationPickerDrawSprite(this->widget[BRSW_STATION_X].left + TILE_PIXELS, this->widget[BRSW_STATION_X].bottom - TILE_PIXELS, st, INVALID_RAILTYPE, _cur_roadtype, DIAGDIR_END + AXIS_X);
+ StationPickerDrawSprite(this->widget[BRSW_STATION_Y].left + TILE_PIXELS, this->widget[BRSW_STATION_Y].bottom - TILE_PIXELS, st, INVALID_RAILTYPE, _cur_roadtype, DIAGDIR_END + AXIS_Y);
/* strings such as 'Size' and 'Coverage Area' */
StationCoverageType sct = (this->window_class == WC_BUS_STATION) ? SCT_PASSENGERS_ONLY : SCT_NON_PASSENGERS_ONLY;
diff --git a/src/waypoint.cpp b/src/waypoint.cpp
index d8605400a..9e8e7da13 100644
--- a/src/waypoint.cpp
+++ b/src/waypoint.cpp
@@ -39,9 +39,6 @@ void WaypointsDailyLoop()
*/
void DrawWaypointSprite(int x, int y, int stat_id, RailType railtype)
{
- x += 33;
- y += 17;
-
if (!DrawStationTile(x, y, railtype, AXIS_X, STAT_CLASS_WAYP, stat_id)) {
StationPickerDrawSprite(x, y, STATION_WAYPOINT, railtype, INVALID_ROADTYPE, AXIS_X);
}