summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 6a628cca6..a154d1260 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -202,17 +202,22 @@ void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID en
}
/**
- * Get the size of the sprite of an aircraft sprite heading west (used for lists)
- * @param engine The engine to get the sprite from
- * @param width The width of the sprite
- * @param height The height of the sprite
+ * Get the size of the sprite of an aircraft 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 sprite is used in.
*/
-void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, EngineImageType image_type)
+void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type)
{
const Sprite *spr = GetSprite(GetAircraftIcon(engine, image_type), ST_NORMAL);
width = UnScaleByZoom(spr->width, ZOOM_LVL_GUI);
height = UnScaleByZoom(spr->height, ZOOM_LVL_GUI);
+ xoffs = UnScaleByZoom(spr->x_offs, ZOOM_LVL_GUI);
+ yoffs = UnScaleByZoom(spr->y_offs, ZOOM_LVL_GUI);
}
/**