equal
deleted
inserted
replaced
651 _block_sizes[VEH_ROAD][1] = GetVehicleListHeight(VEH_ROAD); |
651 _block_sizes[VEH_ROAD][1] = GetVehicleListHeight(VEH_ROAD); |
652 } |
652 } |
653 |
653 |
654 static void ResizeDefaultWindowSize(VehicleType type) |
654 static void ResizeDefaultWindowSize(VehicleType type) |
655 { |
655 { |
656 EngineID engine; |
|
657 uint max_width = 0; |
656 uint max_width = 0; |
658 uint max_height = 0; |
657 uint max_height = 0; |
659 |
658 |
660 FOR_ALL_ENGINEIDS_OF_TYPE(engine, type) { |
659 EngineID eid; |
|
660 FOR_ALL_ENGINEIDS_OF_TYPE(eid, type) { |
661 uint x, y; |
661 uint x, y; |
662 |
662 |
663 switch (type) { |
663 switch (type) { |
664 default: NOT_REACHED(); |
664 default: NOT_REACHED(); |
665 case VEH_SHIP: GetShipSpriteSize( engine, x, y); break; |
665 case VEH_SHIP: GetShipSpriteSize( eid, x, y); break; |
666 case VEH_AIRCRAFT: GetAircraftSpriteSize(engine, x, y); break; |
666 case VEH_AIRCRAFT: GetAircraftSpriteSize(eid, x, y); break; |
667 } |
667 } |
668 if (x > max_width) max_width = x; |
668 if (x > max_width) max_width = x; |
669 if (y > max_height) max_height = y; |
669 if (y > max_height) max_height = y; |
670 } |
670 } |
671 |
671 |