summaryrefslogtreecommitdiffstats
path: root/src/ui/map.cpp
diff options
context:
space:
mode:
authorZaba999 <zaba.marcin@gmail.com>2012-09-18 22:33:28 +0200
committerZaba999 <zaba.marcin@gmail.com>2012-09-18 22:33:28 +0200
commit36ae984ac77c5545d3d11dde7e37913a8eff0b0d (patch)
tree94a296b8b816c372b436c56fff8d75263cfe2d4a /src/ui/map.cpp
parenta397922e8d53c6f7ff469d38e5139fd003c705b5 (diff)
downloadcolobot-36ae984ac77c5545d3d11dde7e37913a8eff0b0d.tar.gz
colobot-36ae984ac77c5545d3d11dde7e37913a8eff0b0d.tar.bz2
colobot-36ae984ac77c5545d3d11dde7e37913a8eff0b0d.zip
Warnings cleaned, left only those connected to commented out code.
Diffstat (limited to 'src/ui/map.cpp')
-rw-r--r--src/ui/map.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/ui/map.cpp b/src/ui/map.cpp
index 1cb4405..1b3dd70 100644
--- a/src/ui/map.cpp
+++ b/src/ui/map.cpp
@@ -866,20 +866,13 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color,
void CMap::DrawHighlight(Math::Point pos)
{
- Math::Point dim, uv1, uv2;
- bool bOut, bUp, bDown, bLeft, bRight;
+ Math::Point dim, uv1, uv2;
if ( m_bToy || m_fixImage[0] != 0 ) return; // map with still image?
pos.x = (pos.x-m_offset.x)*(m_zoom*0.5f)/m_half+0.5f;
pos.y = (pos.y-m_offset.y)*(m_zoom*0.5f)/m_half+0.5f;
- bOut = bUp = bDown = bLeft = bRight = false;
- if ( pos.x < 0.06f ) { pos.x = 0.02f; bOut = bLeft = true; }
- if ( pos.y < 0.06f ) { pos.y = 0.02f; bOut = bDown = true; }
- if ( pos.x > 0.94f ) { pos.x = 0.98f; bOut = bRight = true; }
- if ( pos.y > 0.94f ) { pos.y = 0.98f; bOut = bUp = true; }
-
pos.x = m_mapPos.x+m_mapDim.x*pos.x;
pos.y = m_mapPos.y+m_mapDim.y*pos.y;
dim.x = 2.0f/128.0f*0.75f;
@@ -1013,8 +1006,8 @@ void CMap::UpdateTerrain()
{
for ( x=0 ; x<256 ; x++ )
{
- pos.x = ((float)x-128.0f)*m_half/128.0f;
- pos.z = -((float)y-128.0f)*m_half/128.0f;
+ pos.x = (static_cast<float>(x)-128.0f)*m_half/128.0f;
+ pos.z = -(static_cast<float>(y)-128.0f)*m_half/128.0f;
pos.y = 0.0f;
if ( pos.x >= -m_half && pos.x <= m_half &&
@@ -1077,8 +1070,8 @@ void CMap::UpdateTerrain(int bx, int by, int ex, int ey)
{
for ( x=bx ; x<ex ; x++ )
{
- pos.x = ((float)x-128.0f)*m_half/128.0f;
- pos.z = -((float)y-128.0f)*m_half/128.0f;
+ pos.x = (static_cast<float>(x)-128.0f)*m_half/128.0f;
+ pos.z = -(static_cast<float>(y)-128.0f)*m_half/128.0f;
pos.y = 0.0f;
if ( pos.x >= -m_half && pos.x <= m_half &&