diff options
author | Darkvater <darkvater@openttd.org> | 2006-09-04 15:16:58 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-09-04 15:16:58 +0000 |
commit | b7f36808acfd52ff64bfb454260bb4071acbd6e7 (patch) | |
tree | 6d8b9a4a52c1ffb220bfe92e45f255b8fb69983d /vehicle_gui.c | |
parent | a40d6951d1aca88db62c05e45c15967ab9523a8f (diff) | |
download | openttd-b7f36808acfd52ff64bfb454260bb4071acbd6e7.tar.xz |
(svn r6378) -Codechange: Rename VLW_FLAGS to VLW_MASK as it is a mask
Diffstat (limited to 'vehicle_gui.c')
-rw-r--r-- | vehicle_gui.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c index b0c051a99..74d4955b6 100644 --- a/vehicle_gui.c +++ b/vehicle_gui.c @@ -1181,7 +1181,7 @@ void PlayerVehWndProc(Window *w, WindowEvent *e) switch (e->event) { case WE_CREATE: { - uint16 window_type = w->window_number & VLW_FLAGS; + uint16 window_type = w->window_number & VLW_MASK; vl->vehicle_type = GB(w->window_number, 11, 5); w->caption_color = GB(w->window_number, 0, 8); // PlayerID @@ -1248,7 +1248,7 @@ void PlayerVehWndProc(Window *w, WindowEvent *e) int i; const PlayerID owner = (PlayerID)w->caption_color; const Player *p = GetPlayer(owner); - const uint16 window_type = w->window_number & VLW_FLAGS; + const uint16 window_type = w->window_number & VLW_MASK; const StationID station = (window_type == VLW_STATION_LIST) ? GB(w->window_number, 16, 16) : INVALID_STATION; const OrderID order = (window_type == VLW_SHARED_ORDERS) ? GB(w->window_number, 16, 16) : INVALID_ORDER; @@ -1392,7 +1392,7 @@ void PlayerVehWndProc(Window *w, WindowEvent *e) assert(vl->l.list_length != 0); DoCommandP(0, GB(w->window_number, 16, 16) /* StationID or OrderID (depending on VLW). Nomatter which one it is, it's needed here */, - (w->window_number & VLW_FLAGS) | DEPOT_MASS_SEND | (_ctrl_pressed ? DEPOT_SERVICE : 0), NULL, CMD_SEND_TO_DEPOT(vl->vehicle_type)); + (w->window_number & VLW_MASK) | DEPOT_MASS_SEND | (_ctrl_pressed ? DEPOT_SERVICE : 0), NULL, CMD_SEND_TO_DEPOT(vl->vehicle_type)); break; case 10: // Right button @@ -1417,7 +1417,7 @@ void PlayerVehWndProc(Window *w, WindowEvent *e) case WE_TICK: /* resort the list every 20 seconds orso (10 days) */ if (--vl->l.resort_timer == 0) { - StationID station = ((w->window_number & VLW_FLAGS) == VLW_STATION_LIST) ? GB(w->window_number, 16, 16) : INVALID_STATION; + StationID station = ((w->window_number & VLW_MASK) == VLW_STATION_LIST) ? GB(w->window_number, 16, 16) : INVALID_STATION; PlayerID owner = (PlayerID)w->caption_color; DEBUG(misc, 1) ("Periodic resort %d list player %d station %d", vl->vehicle_type, owner, station); |