summaryrefslogtreecommitdiff
path: root/road_gui.c
diff options
context:
space:
mode:
authorCelestar <Celestar@openttd.org>2004-12-08 15:46:13 +0000
committerCelestar <Celestar@openttd.org>2004-12-08 15:46:13 +0000
commit945ceb06fc166379a9d0ffa4dfafe68894cba9e6 (patch)
treeaa862fd953b81bbc7c142d763f82868807933f7e /road_gui.c
parent932610e61256af745c96f7fa1808a459d3e627fb (diff)
downloadopenttd-945ceb06fc166379a9d0ffa4dfafe68894cba9e6.tar.xz
(svn r979) Allow more realistically sized catchment areas
Diffstat (limited to 'road_gui.c')
-rw-r--r--road_gui.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/road_gui.c b/road_gui.c
index 734535311..4368b1e40 100644
--- a/road_gui.c
+++ b/road_gui.c
@@ -7,6 +7,9 @@
#include "gfx.h"
#include "sound.h"
#include "command.h"
+//needed for catchments
+#include "station.h"
+
static void ShowBusStationPicker();
static void ShowTruckStationPicker();
@@ -400,6 +403,9 @@ static void ShowRoadDepotPicker()
}
static void RoadStationPickerWndProc(Window *w, WindowEvent *e) {
+
+ int rad;
+
switch(e->event) {
case WE_PAINT: {
int image;
@@ -409,8 +415,15 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e) {
DrawWindowWidgets(w);
SetTileSelectSize(1, 1);
+
+ if (_patches.modified_catchment) {
+ rad = CA_TRUCK; // = CA_BUS
+ } else {
+ rad = 4;
+ }
+
if (_station_show_coverage)
- SetTileSelectBigSize(-4, -4, 8, 8);
+ SetTileSelectBigSize(-rad, -rad, 2*rad, 2*rad);
image = (w->window_class == WC_BUS_STATION) ? 0x47 : 0x43;
@@ -421,8 +434,8 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e) {
DrawStringCentered(70, 120, STR_3066_COVERAGE_AREA_HIGHLIGHT, 0);
DrawStationCoverageAreaText(2, 146,
- ((w->window_class == WC_BUS_STATION) ? (1<<CT_PASSENGERS) : ~(1<<CT_PASSENGERS))
- );
+ ((w->window_class == WC_BUS_STATION) ? (1<<CT_PASSENGERS) : ~(1<<CT_PASSENGERS)),
+ 3);
} break;