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/gui/windows/minimap.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2 mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip |
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/gui/windows/minimap.cpp')
-rw-r--r-- | src/gui/windows/minimap.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index ae93c9190..797427c50 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -375,9 +375,9 @@ void Minimap::draw2(Graphics *const graphics) if (userPalette) graphics->setColor(userPalette->getColor(type)); - const int offsetHeight = static_cast<int>(static_cast<float>( + const int offsetHeight = CAST_S32(static_cast<float>( dotSize - 1) * mHeightProportion); - const int offsetWidth = static_cast<int>(static_cast<float>( + const int offsetWidth = CAST_S32(static_cast<float>( dotSize - 1) * mWidthProportion); const Vector &pos = being->getPosition(); @@ -414,15 +414,15 @@ void Minimap::draw2(Graphics *const graphics) UserColorId::PARTY)); } - const int offsetHeight = static_cast<int>( + const int offsetHeight = CAST_S32( mHeightProportion); - const int offsetWidth = static_cast<int>( + const int offsetWidth = CAST_S32( mWidthProportion); graphics->fillRectangle(Rect( - static_cast<int>(member->getX() + CAST_S32(member->getX() * mWidthProportion) + mMapOriginX - offsetWidth, - static_cast<int>(member->getY() + CAST_S32(member->getY() * mHeightProportion) + mMapOriginY - offsetHeight, 2, 2)); } @@ -443,9 +443,9 @@ void Minimap::draw2(Graphics *const graphics) + viewport->getCameraRelativeY()) * mHeightProportion) / 32 + mMapOriginY; - const int w = static_cast<int>(static_cast<float>( + const int w = CAST_S32(static_cast<float>( gw) * mWidthProportion / 32); - const int h = static_cast<int>(static_cast<float>( + const int h = CAST_S32(static_cast<float>( gh) * mHeightProportion / 32); if (w <= a.width) |