summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
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 ++;
}