diff options
author | rubidium <rubidium@openttd.org> | 2010-09-08 21:37:13 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-09-08 21:37:13 +0000 |
commit | f5128695c54ad634e1ac45ae4271c1db5ed15fad (patch) | |
tree | 7fe3411110d924b4c2d879f3c32ceb5a0ddd4f00 /src/station.cpp | |
parent | 881c6c679ff2606111cb890847147556142c3451 (diff) | |
download | openttd-f5128695c54ad634e1ac45ae4271c1db5ed15fad.tar.xz |
(svn r20772) -Codechange: use packed VehicleListIdentifiers as window numbers
Diffstat (limited to 'src/station.cpp')
-rw-r--r-- | src/station.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/station.cpp b/src/station.cpp index 05be87526..70deb7de4 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -19,7 +19,7 @@ #include "command_func.h" #include "news_func.h" #include "aircraft.h" -#include "vehicle_gui.h" +#include "vehiclelist.h" #include "core/pool_func.hpp" #include "station_base.h" #include "roadstop_base.h" @@ -40,11 +40,10 @@ BaseStation::~BaseStation() Owner owner = this->owner; if (!Company::IsValidID(owner)) owner = _local_company; - WindowNumber wno = (this->index << 16) | VLW_STATION_LIST | owner; - DeleteWindowById(WC_TRAINS_LIST, wno | (VEH_TRAIN << 11)); - DeleteWindowById(WC_ROADVEH_LIST, wno | (VEH_ROAD << 11)); - DeleteWindowById(WC_SHIPS_LIST, wno | (VEH_SHIP << 11)); - DeleteWindowById(WC_AIRCRAFT_LIST, wno | (VEH_AIRCRAFT << 11)); + DeleteWindowById(WC_TRAINS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_TRAIN, owner, this->index).Pack()); + DeleteWindowById(WC_ROADVEH_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_ROAD, owner, this->index).Pack()); + DeleteWindowById(WC_SHIPS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_SHIP, owner, this->index).Pack()); + DeleteWindowById(WC_AIRCRAFT_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_AIRCRAFT, owner, this->index).Pack()); this->sign.MarkDirty(); } |