diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-07-02 04:57:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-07-02 04:57:16 +0300 |
commit | 5f43cf85c7e59f0e1192f803560848777d64743f (patch) | |
tree | 283ddb56228ab7b19a62be6f6be0344e77745757 /src/resources/ambientlayer.cpp | |
parent | ca58a3cced99fc2a8989da0155c1927bc0f08b6f (diff) | |
download | manaverse-5f43cf85c7e59f0e1192f803560848777d64743f.tar.gz manaverse-5f43cf85c7e59f0e1192f803560848777d64743f.tar.bz2 manaverse-5f43cf85c7e59f0e1192f803560848777d64743f.tar.xz manaverse-5f43cf85c7e59f0e1192f803560848777d64743f.zip |
Replace some getters to direct members access in graphics class.
Diffstat (limited to 'src/resources/ambientlayer.cpp')
-rw-r--r-- | src/resources/ambientlayer.cpp | 12 |
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); } } |