summaryrefslogtreecommitdiff
path: root/src/resources/ambientlayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/ambientlayer.cpp')
-rw-r--r--src/resources/ambientlayer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/ambientlayer.cpp b/src/resources/ambientlayer.cpp
index 09a235e59..10d70c2c7 100644
--- a/src/resources/ambientlayer.cpp
+++ b/src/resources/ambientlayer.cpp
@@ -41,16 +41,16 @@ AmbientLayer::AmbientLayer(Image *img, float parallax,
if (keepRatio && !mImage->useOpenGL()
/*&& defaultScreenWidth != 0
&& defaultScreenHeight != 0*/
- && graphics->getWidth() != defaultScreenWidth
- && graphics->getHeight() != defaultScreenHeight)
+ && graphics->mWidth != defaultScreenWidth
+ && graphics->mHeight != defaultScreenHeight)
{
// Rescale the overlay to keep the ratio as if we were on
// the default resolution...
Image *rescaledOverlay = ResourceManager::getInstance()->
getRescaled(mImage, static_cast<int>(mImage->mBounds.w)
- / defaultScreenWidth * graphics->getWidth(),
+ / defaultScreenWidth * graphics->mWidth,
static_cast<int>(mImage->mBounds.h)
- / defaultScreenHeight * graphics->getHeight());
+ / defaultScreenHeight * graphics->mHeight);
if (rescaledOverlay)
mImage = rescaledOverlay;
@@ -117,8 +117,8 @@ void AmbientLayer::draw(Graphics *graphics, int x, int y)
static_cast<int>(-mPosY), x + static_cast<int>(mPosX),
y + static_cast<int>(mPosY),
static_cast<int>(mImage->mBounds.w)
- / defaultScreenWidth * graphics->getWidth(),
+ / defaultScreenWidth * graphics->mWidth,
static_cast<int>(mImage->mBounds.h) / defaultScreenHeight
- * graphics->getHeight());
+ * graphics->mHeight);
}
}