Recalculated route step sprite sizes when changing zoom levels

This commit is contained in:
Jonathan G Rennison
2022-08-20 10:02:31 +01:00
parent 84da7ad7b6
commit 8c0eca28a8
4 changed files with 5 additions and 1 deletions

View File

@@ -157,6 +157,7 @@ void SetMouseCursor(CursorID cursor, PaletteID pal);
void SetAnimatedMouseCursor(const AnimCursor *table);
void CursorTick();
void UpdateCursorSize();
void UpdateRouteStepSpriteSize();
bool ChangeResInGame(int w, int h);
void SortResolutions();
bool ToggleFullScreen(bool fs);

View File

@@ -388,7 +388,7 @@ void CheckBlitter()
ReInitAllWindows(false);
}
static void UpdateRouteStepSpriteSize()
void UpdateRouteStepSpriteSize()
{
extern uint _vp_route_step_width;
extern uint _vp_route_step_height_top;

View File

@@ -1252,6 +1252,7 @@ static void ZoomMinMaxChanged(int32 new_value)
/* Restrict GUI zoom if it is no longer available. */
_gui_zoom = _settings_client.gui.zoom_min;
UpdateCursorSize();
UpdateRouteStepSpriteSize();
UpdateFontHeightCache();
LoadStringWidthTable();
}

View File

@@ -604,6 +604,7 @@ struct GameOptionsWindow : Window {
_gui_zoom_cfg = new_zoom;
UpdateGUIZoom();
UpdateCursorSize();
UpdateRouteStepSpriteSize();
UpdateAllVirtCoords();
FixTitleGameZoom();
ReInitAllWindows(true);
@@ -618,6 +619,7 @@ struct GameOptionsWindow : Window {
GfxClearSpriteCache();
_font_zoom_cfg = new_zoom;
UpdateGUIZoom();
UpdateRouteStepSpriteSize();
LoadStringWidthTable();
UpdateAllVirtCoords();
ReInitAllWindows(true);