diff src/station_gui.cpp @ 5745:9c34cdf6cc19 draft

(svn r8293) -Codechange: overloaded ShowVehicleListWindow() so it can open all types of vehicle lists (depending on arguments) - Also removed some unneeded arguments - this also allows removing an if-else cascade in ShowVehicleListWindowLocal()
author bjarni <bjarni@openttd.org>
date Sun, 21 Jan 2007 00:01:47 +0000 (2007-01-21)
parents 3d6d9bff3dd8
children 8547517ef719
line wrap: on
line diff
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -762,13 +762,13 @@
 
 		case 10: { /* Show a list of scheduled trains to this station */
 			const Station *st = GetStation(w->window_number);
-			ShowVehicleListWindow(st->owner, w->window_number, VEH_Train);
+			ShowVehicleListWindow(st->owner, VEH_Train, (StationID)w->window_number);
 			break;
 		}
 
 		case 11: { /* Show a list of scheduled road-vehicles to this station */
 			const Station *st = GetStation(w->window_number);
-			ShowVehicleListWindow(st->owner, w->window_number, VEH_Road);
+			ShowVehicleListWindow(st->owner, VEH_Road, (StationID)w->window_number);
 			break;
 		}
 
@@ -776,7 +776,7 @@
 			const Station *st = GetStation(w->window_number);
 			/* Since oilrigs have no owners, show the scheduled aircraft of current player */
 			PlayerID owner = (st->owner == OWNER_NONE) ? _current_player : st->owner;
-			ShowVehicleListWindow(owner, w->window_number, VEH_Aircraft);
+			ShowVehicleListWindow(owner, VEH_Aircraft, (StationID)w->window_number);
 			break;
 		}
 
@@ -784,7 +784,7 @@
 			const Station *st = GetStation(w->window_number);
 			/* Since oilrigs/bouys have no owners, show the scheduled ships of current player */
 			PlayerID owner = (st->owner == OWNER_NONE) ? _current_player : st->owner;
-			ShowVehicleListWindow(owner, w->window_number, VEH_Ship);
+			ShowVehicleListWindow(owner, VEH_Ship, (StationID)w->window_number);
 			break;
 		}
 		}