From ff304041700c85e587babffdb99ba1c9ff399fc1 Mon Sep 17 00:00:00 2001 From: tron Date: Tue, 27 Sep 2005 18:51:04 +0000 Subject: (svn r2992) Use PlayerID, StationID and INVALID_STATION instead of int, int and -1 --- ship_gui.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ship_gui.c') diff --git a/ship_gui.c b/ship_gui.c index 8362d8409..aa522a574 100644 --- a/ship_gui.c +++ b/ship_gui.c @@ -990,8 +990,8 @@ static const Widget _other_player_ships_widgets[] = { 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 @@ static void PlayerShipsWndProc(Window *w, WindowEvent *e) /* 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 @@ static const WindowDesc _other_player_ships_desc = { }; -void ShowPlayerShips(int player, int station) +void ShowPlayerShips(PlayerID player, StationID station) { Window *w; -- cgit v1.2.3-70-g09d2