Change: Use power-of-2 scaling for some dimensions in GUI.
These are related to drawing sprites that are normally drawn on the landscape, and should therefore still follow power-of-2 scaling to fit correctly.
This commit is contained in:
@@ -99,6 +99,16 @@ static inline ZoomLevel UnScaleZoomGUI(ZoomLevel value)
|
||||
return std::clamp(ZoomLevel(value - (ZOOM_LVL_GUI - ZOOM_LVL_OUT_4X)), ZOOM_LVL_MIN, ZOOM_LVL_MAX);
|
||||
}
|
||||
|
||||
/**
|
||||
* Scale traditional pixel dimensions to GUI zoom level, for drawing sprites.
|
||||
* @param value Pixel amount at #ZOOM_LVL_BASE (traditional "normal" interface size).
|
||||
* @return Pixel amount at #ZOOM_LVL_GUI (current interface size).
|
||||
*/
|
||||
static inline int ScaleSpriteTrad(int value)
|
||||
{
|
||||
return UnScaleGUI(value * ZOOM_LVL_BASE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Scale traditional pixel dimensions to GUI zoom level.
|
||||
* @param value Pixel amount at #ZOOM_LVL_BASE (traditional "normal" interface size).
|
||||
|
Reference in New Issue
Block a user