summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map.cpp b/src/map.cpp
index d0f032b4b..69ce1331d 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -241,13 +241,14 @@ void MapLayer::draw(Graphics *graphics, int startX, int startY,
for (int x = startX; x < endX; x++)
{
- const int px1 = x * 32 - scrollX;
+ const int x32 = x * 32;
+ const int px1 = x32 - scrollX;
const int tilePtr = x + yWidth;
int c = 0;
Image *img = mTiles[tilePtr];
if (img)
{
- const int px = (x * 32) + dx;
+ const int px = x32 + dx;
const int py = py0 - img->getHeight();
if ((debugFlags != Map::MAP_SPECIAL
&& debugFlags != Map::MAP_SPECIAL2)