From 945ceb06fc166379a9d0ffa4dfafe68894cba9e6 Mon Sep 17 00:00:00 2001 From: Celestar Date: Wed, 8 Dec 2004 15:46:13 +0000 Subject: (svn r979) Allow more realistically sized catchment areas --- road_gui.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'road_gui.c') 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<window_class == WC_BUS_STATION) ? (1<