* Get the size of the sprite of a ship sprite heading west (used for lists). * @param engine The engine to get the sprite from. * @param[out] width The width of the sprite. * @param[out] height The height of the sprite. * @param[out] xoffs Number of pixels to shift the sprite to the right. * @param[out] yoffs Number of pixels to shift the sprite downwards. * @param image_type Context the spr
| 117 | * @param image_type Context the sprite is used in. |
| 118 | */ |
| 119 | void GetShipSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type) |
| 120 | { |
| 121 | VehicleSpriteSeq seq; |
| 122 | GetShipIcon(engine, image_type, &seq); |
| 123 | |
| 124 | Rect rect; |
| 125 | seq.GetBounds(&rect); |
| 126 | |
| 127 | width = UnScaleGUI(rect.Width()); |
| 128 | height = UnScaleGUI(rect.Height()); |
| 129 | xoffs = UnScaleGUI(rect.left); |
| 130 | yoffs = UnScaleGUI(rect.top); |
| 131 | } |
| 132 | |
| 133 | void Ship::GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const |
| 134 | { |
no test coverage detected