summaryrefslogtreecommitdiff
path: root/aircraft_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r--aircraft_gui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c
index 8d20e6dfd..234a94ff5 100644
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -1011,8 +1011,8 @@ static const Widget _other_player_aircraft_widgets[] = {
static void PlayerAircraftWndProc(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) {
@@ -1034,7 +1034,7 @@ static void PlayerAircraftWndProc(Window *w, WindowEvent *e)
/* draw the widgets */
{
const Player *p = GetPlayer(owner);
- if (station == -1) {
+ if (station == INVALID_STATION) {
/* Company Name -- (###) Aircraft */
SetDParam(0, p->name_1);
SetDParam(1, p->name_2);
@@ -1207,7 +1207,7 @@ static const WindowDesc _other_player_aircraft_desc = {
PlayerAircraftWndProc
};
-void ShowPlayerAircraft(int player, int station)
+void ShowPlayerAircraft(PlayerID player, StationID station)
{
Window *w;