diff options
author | yexo <yexo@openttd.org> | 2010-08-05 12:00:09 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-08-05 12:00:09 +0000 |
commit | d2f9b87ccd370db55f360995609963b7c2d864df (patch) | |
tree | 648158aa814a6329c6e8ff6f9602985e203996c5 /src/airport_gui.cpp | |
parent | 330c2f979e794f751ccd0ee05256f7b788f13091 (diff) | |
download | openttd-d2f9b87ccd370db55f360995609963b7c2d864df.tar.xz |
(svn r20366) -Codechange: store the rotation of the airport layout in the station struct and use it to rotate hangar tiles
Diffstat (limited to 'src/airport_gui.cpp')
-rw-r--r-- | src/airport_gui.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index a5fda1567..00297d62a 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -356,7 +356,11 @@ public: this->DisableWidget(BAIRW_LAYOUT_INCREASE); } else { const AirportSpec *as = GetAirportSpecFromClass(_selected_airport_class, _selected_airport_index); - SetTileSelectSize(as->size_x, as->size_y); + int w = as->size_x; + int h = as->size_y; + Direction rotation = as->rotation[_selected_airport_layout]; + if (rotation == DIR_E || rotation == DIR_W) Swap(w, h); + SetTileSelectSize(w, h); this->SetWidgetDisabledState(BAIRW_LAYOUT_DECREASE, _selected_airport_layout == 0); this->SetWidgetDisabledState(BAIRW_LAYOUT_INCREASE, _selected_airport_layout + 1 >= as->num_table); |