roadveh_gui.c
changeset 4414 ed5b85ff5b0a
parent 4412 945e8a9bb89a
child 4426 291490691472
--- a/roadveh_gui.c	Sun Aug 27 09:50:43 2006 +0000
+++ b/roadveh_gui.c	Sun Aug 27 09:55:54 2006 +0000
@@ -947,10 +947,10 @@
 
 static void PlayerRoadVehWndProc(Window *w, WindowEvent *e)
 {
-	uint16 order = GB(w->window_number, 16, 16);
+	OrderID order = GB(w->window_number, 16, 16);
 	/* Sorting a shared order list relies on station being set to INVALID_STATION */
 	/* If station is not INVALID_STATION, then order is never used and we don't care what it contains */
-	StationID station = HASBIT(w->window_number, 8) ? INVALID_STATION : order;
+	StationID station = (w->window_number & SHARE_FLAG) ? INVALID_STATION : order;
 	PlayerID owner = GB(w->window_number, 0, 8);
 	vehiclelist_d *vl = &WP(w, vehiclelist_d);
 
@@ -1128,12 +1128,12 @@
 };
 
 
-static void ShowPlayerRoadVehiclesLocal(PlayerID player, StationID station, uint16 order, bool show_shared)
+static void ShowPlayerRoadVehiclesLocal(PlayerID player, StationID station, OrderID order, bool show_shared)
 {
 	Window *w;
 
 	if (show_shared) {
-		w = AllocateWindowDescFront(&_player_roadveh_desc, (order << 16) | (1 << 8));
+		w = AllocateWindowDescFront(&_player_roadveh_desc, (order << 16) | SHARE_FLAG);
 	} else {
 		if ( player == _local_player) {
 			w = AllocateWindowDescFront(&_player_roadveh_desc, (station << 16) | player);