From 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Feb 2016 16:18:13 +0300 Subject: Replace most static_cast to shorter versions from defines. --- src/resources/ambientlayer.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/resources/ambientlayer.cpp') 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(mImage->mBounds.w) / + CAST_S32(mImage->mBounds.w) / defaultScreenWidth * width, - static_cast(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(-mPosX), - static_cast(-mPosY), x + static_cast(mPosX), - y + static_cast(mPosY)); + graphics->drawPattern(mImage, CAST_S32(-mPosX), + CAST_S32(-mPosY), x + CAST_S32(mPosX), + y + CAST_S32(mPosY)); } else { - graphics->drawRescaledPattern(mImage, static_cast(-mPosX), - static_cast(-mPosY), x + static_cast(mPosX), - y + static_cast(mPosY), - static_cast(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(mImage->mBounds.h) / defaultScreenHeight + CAST_S32(mImage->mBounds.h) / defaultScreenHeight * graphics->mHeight); } } -- cgit v1.2.3-70-g09d2