ship_gui.c
changeset 2466 2774132ebb9a
parent 2436 177cb6a8339f
child 2477 d454d5152386
--- a/ship_gui.c	Mon Sep 26 20:32:13 2005 +0000
+++ b/ship_gui.c	Tue Sep 27 18:51:04 2005 +0000
@@ -990,8 +990,8 @@
 
 static void PlayerShipsWndProc(Window *w, WindowEvent *e)
 {
-	int station = (int)w->window_number >> 16;
-	int owner = w->window_number & 0xff;
+	StationID station = GB(w->window_number, 16, 16);
+	PlayerID owner = GB(w->window_number, 0, 8);
 	vehiclelist_d *vl = &WP(w, vehiclelist_d);
 
 	switch(e->event) {
@@ -1013,7 +1013,7 @@
 		/* draw the widgets */
 		{
 			const Player *p = GetPlayer(owner);
-			if (station == -1) {
+			if (station == INVALID_STATION) {
 				/* Company Name -- (###) Trains */
 				SetDParam(0, p->name_1);
 				SetDParam(1, p->name_2);
@@ -1186,7 +1186,7 @@
 };
 
 
-void ShowPlayerShips(int player, int station)
+void ShowPlayerShips(PlayerID player, StationID station)
 {
 	Window *w;