summaryrefslogtreecommitdiff
path: root/src/resources/map/maplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/map/maplayer.cpp')
-rw-r--r--src/resources/map/maplayer.cpp80
1 files changed, 17 insertions, 63 deletions
diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp
index 90ef48e4a..15a0bf5eb 100644
--- a/src/resources/map/maplayer.cpp
+++ b/src/resources/map/maplayer.cpp
@@ -150,21 +150,6 @@ void MapLayer::draw(Graphics *const graphics,
}
for (int x = x0; x < endX; x++, tilePtr++)
{
- if (!tilePtr->isEnabled)
- {
- if (x + tilePtr->count + 1 >= endX)
- break;
- reportAlways("error tiles: %s (%d,%d) to %d, +%d, %d",
- mName.c_str(),
- x, y,
- endX,
- tilePtr->count,
- tilePtr->nextTile);
- const int c = tilePtr->count;
- x += c;
- tilePtr += c;
- continue;
- }
const int x32 = x * mapTileSize;
const Image *const img = tilePtr->image;
@@ -577,43 +562,26 @@ void MapLayer::drawFringe(Graphics *const graphics,
{
const int x32 = x * mapTileSize;
int c = 0;
- if (tilePtr->isEnabled)
+ const Image *const img = tilePtr->image;
+ if (mSpecialFlag ||
+ img->mBounds.h <= mapTileSize)
{
- const Image *const img = tilePtr->image;
- if (mSpecialFlag ||
- img->mBounds.h <= mapTileSize)
+ const int px = x32 + dx;
+ const int py = py0 - img->mBounds.h;
+ c = tilePtr->count;
+
+ if (c == 0)
{
- const int px = x32 + dx;
- const int py = py0 - img->mBounds.h;
- c = tilePtr->count;
-
- if (c == 0)
- {
- graphics->drawImage(img, px, py);
- }
- else
- {
- graphics->drawPattern(img,
- px,
- py,
- tilePtr->width,
- img->mBounds.h);
- }
+ graphics->drawImage(img, px, py);
+ }
+ else
+ {
+ graphics->drawPattern(img,
+ px,
+ py,
+ tilePtr->width,
+ img->mBounds.h);
}
- }
- else
- {
- if (x + tilePtr->count + 1 >= endX)
- break;
- reportAlways("error tiles1: (%d,%d) to %d, +%d, %d",
- x, y,
- endX,
- tilePtr->count,
- tilePtr->nextTile);
- c = tilePtr->count;
- x += c;
- tilePtr += c;
- continue;
}
const int nextTile = tilePtr->nextTile;
@@ -663,20 +631,6 @@ void MapLayer::drawFringe(Graphics *const graphics,
}
for (int x = x0; x < endX; x++, tilePtr++)
{
- if (!tilePtr->isEnabled)
- {
- if (x + tilePtr->count + 1 >= endX)
- break;
- reportAlways("error tiles2: (%d,%d) to %d, +%d, %d",
- x, y,
- endX,
- tilePtr->count,
- tilePtr->nextTile);
- const int c = tilePtr->count;
- x += c;
- tilePtr += c;
- continue;
- }
const int x32 = x * mapTileSize;
const Image *const img = tilePtr->image;
const int px = x32 + dx;