From 5f43cf85c7e59f0e1192f803560848777d64743f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 Jul 2011 04:57:16 +0300 Subject: Replace some getters to direct members access in graphics class. --- src/resources/ambientlayer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/resources') 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(mImage->mBounds.w) - / defaultScreenWidth * graphics->getWidth(), + / defaultScreenWidth * graphics->mWidth, static_cast(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(-mPosY), x + static_cast(mPosX), y + static_cast(mPosY), static_cast(mImage->mBounds.w) - / defaultScreenWidth * graphics->getWidth(), + / defaultScreenWidth * graphics->mWidth, static_cast(mImage->mBounds.h) / defaultScreenHeight - * graphics->getHeight()); + * graphics->mHeight); } } -- cgit v1.2.3-70-g09d2