(svn r20366) -Codechange: store the rotation of the airport layout in the station struct and use it to rotate hangar tiles

This commit is contained in:
yexo
2010-08-05 12:00:09 +00:00
parent 330c2f979e
commit d2f9b87ccd
7 changed files with 58 additions and 16 deletions

View File

@@ -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);