From 98e0c2435bd69d6dd78fb0f84389a81b56278958 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 7 Mar 2024 20:33:38 +0100 Subject: Fixed ambient layers "keepratio" option I had broken this in 264be2108c51837fa92085f6c839e66aebbcfc9e by no longer reading out the property. Made some further simplifications and two more fixes: * When the original image's size was not 800x600, it wouldn't get scaled as expected due to the integer division being performed before the multiplication. * I had changed the default resolution to 1280x720, while mKeepRatio expects to scale the original image as if it was displayed on an 800x600 screen. So now it's hardcoded on 800x600 rather than using the defaultScreenWidth/Height variables. * Removed the confusing x/y parameters from AmbientLayer::draw, which were actually set to the graphics width/height. * Changed SDLGraphics::drawRescaledImagePattern to not repeatedly set the source origin. --- src/resources/resource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/resources/resource.h') diff --git a/src/resources/resource.h b/src/resources/resource.h index 7f1f4836..9fe00f3d 100644 --- a/src/resources/resource.h +++ b/src/resources/resource.h @@ -59,7 +59,7 @@ class Resource { return mIdPath; } protected: - virtual ~Resource() {} + virtual ~Resource() = default; private: std::string mIdPath; /**< Path identifying this resource. */ -- cgit v1.2.3-60-g2f50