[Scummvm-git-logs] scummvm master -> f909c9d882248fe25b4aff96ccb48b33cf2d8f42
Scorpeg
noreply at scummvm.org
Wed Nov 4 13:25:49 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
f909c9d882 GRAPHICS: Hotspot scaling with overlay
Commit: f909c9d882248fe25b4aff96ccb48b33cf2d8f42
https://github.com/scummvm/scummvm/commit/f909c9d882248fe25b4aff96ccb48b33cf2d8f42
Author: Scorp (scorp at mrs.mn)
Date: 2026-11-04T16:25:38+03:00
Commit Message:
GRAPHICS: Hotspot scaling with overlay
Changed paths:
graphics/hotspot_renderer.cpp
graphics/hotspot_renderer.h
diff --git a/graphics/hotspot_renderer.cpp b/graphics/hotspot_renderer.cpp
index d60a9ed7c2e..0da912ed117 100644
--- a/graphics/hotspot_renderer.cpp
+++ b/graphics/hotspot_renderer.cpp
@@ -241,6 +241,8 @@ void HotspotRenderer::renderFrame(Surface *surface, const Common::Array<HotspotI
const float rawScaleY = (float)overlayHeight / (float)gameHeight;
_sizeScale = _style.scaleWithGame ? MIN(rawScaleX, rawScaleY) : 1.0f;
+ if (_style.scaleWithOverlay)
+ _sizeScale = CLIP(MIN(overlayWidth / 640.0f, overlayHeight / 480.0f), 1.0f, 3.0f);
_markerSize = MAX(2, (int)(_style.markerSize * _sizeScale));
_pointRadius = MAX(1, (int)(_style.pointRadius * _sizeScale));
_lineThickness = MAX(1, (int)(_style.lineThickness * _sizeScale));
diff --git a/graphics/hotspot_renderer.h b/graphics/hotspot_renderer.h
index 02d15d1d512..8925d9b6efb 100644
--- a/graphics/hotspot_renderer.h
+++ b/graphics/hotspot_renderer.h
@@ -87,6 +87,7 @@ struct HotspotStyle {
byte borderOpacity = 180;
bool labelBorder = true;
bool scaleWithGame = true;
+ bool scaleWithOverlay = true;
const Font *font = nullptr;
};
@@ -201,7 +202,7 @@ private:
protected:
HotspotStyle _style;
- float _sizeScale; ///< Overlay/game scale factor applied to marker geometry
+ float _sizeScale; ///< Visual scale applied to markers and labels
int _markerSize; ///< Scaled size of square and crosshair markers
int _pointRadius; ///< Scaled radius of point marker
int _lineThickness; ///< Scaled thickness of lines for markers and text boxes
More information about the Scummvm-git-logs
mailing list