diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
commit | 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch) | |
tree | 798117abd4dc7e610997d59d530a96ddc1509f53 /src/resources/ambientlayer.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2 manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip |
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/resources/ambientlayer.cpp')
-rw-r--r-- | src/resources/ambientlayer.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/resources/ambientlayer.cpp b/src/resources/ambientlayer.cpp index 298bdb0e1..644c71578 100644 --- a/src/resources/ambientlayer.cpp +++ b/src/resources/ambientlayer.cpp @@ -64,9 +64,9 @@ AmbientLayer::AmbientLayer(Image *const img, // the default resolution... Image *const rescaledOverlay = resourceManager->getRescaled( mImage, - static_cast<int>(mImage->mBounds.w) / + CAST_S32(mImage->mBounds.w) / defaultScreenWidth * width, - static_cast<int>(mImage->mBounds.h) / + CAST_S32(mImage->mBounds.h) / defaultScreenHeight * height); if (rescaledOverlay) @@ -127,18 +127,18 @@ void AmbientLayer::draw(Graphics *const graphics, const int x, if (imageHelper->useOpenGL() == RENDER_SOFTWARE || !mKeepRatio) { - graphics->drawPattern(mImage, static_cast<int>(-mPosX), - static_cast<int>(-mPosY), x + static_cast<int>(mPosX), - y + static_cast<int>(mPosY)); + graphics->drawPattern(mImage, CAST_S32(-mPosX), + CAST_S32(-mPosY), x + CAST_S32(mPosX), + y + CAST_S32(mPosY)); } else { - graphics->drawRescaledPattern(mImage, static_cast<int>(-mPosX), - static_cast<int>(-mPosY), x + static_cast<int>(mPosX), - y + static_cast<int>(mPosY), - static_cast<int>(mImage->mBounds.w) + graphics->drawRescaledPattern(mImage, CAST_S32(-mPosX), + CAST_S32(-mPosY), x + CAST_S32(mPosX), + y + CAST_S32(mPosY), + CAST_S32(mImage->mBounds.w) / defaultScreenWidth * graphics->mWidth, - static_cast<int>(mImage->mBounds.h) / defaultScreenHeight + CAST_S32(mImage->mBounds.h) / defaultScreenHeight * graphics->mHeight); } } |