summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-04 17:49:59 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-04 17:49:59 +0300
commita2bfd50be766b3303f3e8dead3b42d16c60f6081 (patch)
tree9b1e8ab888c2c45350369c132df180a1fb63c975 /src/map.cpp
parent4b2cb3433c82ba4ba28be8de82e0a49df7f3e388 (diff)
downloadmanaverse-a2bfd50be766b3303f3e8dead3b42d16c60f6081.tar.gz
manaverse-a2bfd50be766b3303f3e8dead3b42d16c60f6081.tar.bz2
manaverse-a2bfd50be766b3303f3e8dead3b42d16c60f6081.tar.xz
manaverse-a2bfd50be766b3303f3e8dead3b42d16c60f6081.zip
Fix code style and compilation warnings.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 89ae7006e..e5baeddc9 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -676,15 +676,16 @@ void Map::drawCollision(Graphics *graphics, int scrollX, int scrollY,
int width = 0;
int x0 = x;
-// if (!getWalk(x, y, BLOCKMASK_WALL))
if (mMetaTiles[x + y * mWidth].blockmask & BLOCKMASK_WALL)
{
width = 32;
for (int x2 = x + 1; x < endX; x2 ++)
{
-// if (getWalk(x2, y, BLOCKMASK_WALL))
- if (!(mMetaTiles[x2 + y * mWidth].blockmask & BLOCKMASK_WALL))
+ if (!(mMetaTiles[x2 + y * mWidth].blockmask
+ & BLOCKMASK_WALL))
+ {
break;
+ }
width += 32;
x ++;
}
@@ -700,15 +701,17 @@ void Map::drawCollision(Graphics *graphics, int scrollX, int scrollY,
}
}
-// if (x < endX && !getWalk(x, y, BLOCKMASK_AIR))
- if (x < endX && mMetaTiles[x + y * mWidth].blockmask & BLOCKMASK_AIR)
+ if (x < endX && mMetaTiles[x + y * mWidth].blockmask
+ & BLOCKMASK_AIR)
{
width = 32;
for (int x2 = x + 1; x < endX; x2 ++)
{
- if (!(mMetaTiles[x2 + y * mWidth].blockmask & BLOCKMASK_AIR))
- //if (getWalk(x2, y, BLOCKMASK_AIR))
+ if (!(mMetaTiles[x2 + y * mWidth].blockmask
+ & BLOCKMASK_AIR))
+ {
break;
+ }
width += 32;
x ++;
}
@@ -724,15 +727,17 @@ void Map::drawCollision(Graphics *graphics, int scrollX, int scrollY,
}
}
- if (x < endX && mMetaTiles[x + y * mWidth].blockmask & BLOCKMASK_WATER)
-// if (x < endX && !getWalk(x, y, BLOCKMASK_WATER))
+ if (x < endX && mMetaTiles[x + y * mWidth].blockmask
+ & BLOCKMASK_WATER)
{
width = 32;
for (int x2 = x + 1; x < endX; x2 ++)
{
- if (!(mMetaTiles[x2 + y * mWidth].blockmask & BLOCKMASK_WATER))
-// if (getWalk(x2, y, BLOCKMASK_WATER))
+ if (!(mMetaTiles[x2 + y * mWidth].blockmask
+ & BLOCKMASK_WATER))
+ {
break;
+ }
width += 32;
x ++;
}