| 215 | } |
| 216 | |
| 217 | void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type) |
| 218 | { |
| 219 | VehicleSpriteSeq seq; |
| 220 | GetAircraftIcon(engine, image_type, &seq); |
| 221 | |
| 222 | Rect rect; |
| 223 | seq.GetBounds(&rect); |
| 224 | preferred_x = Clamp(preferred_x, |
| 225 | left - UnScaleGUI(rect.left), |
| 226 | right - UnScaleGUI(rect.right)); |
| 227 | |
| 228 | seq.Draw(preferred_x, y, pal, pal == PALETTE_CRASH); |
| 229 | |
| 230 | if (!(AircraftVehInfo(engine)->subtype & AIR_CTOL)) { |
| 231 | VehicleSpriteSeq rotor_seq; |
| 232 | GetCustomRotorIcon(engine, image_type, &rotor_seq); |
| 233 | if (!rotor_seq.IsValid()) rotor_seq.Set(SPR_ROTOR_STOPPED); |
| 234 | rotor_seq.Draw(preferred_x, y - ScaleSpriteTrad(5), PAL_NONE, false); |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | /** |
| 239 | * Get the size of the sprite of an aircraft sprite heading west (used for lists). |
no test coverage detected