summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-13 23:20:44 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-13 23:20:44 +0300
commit1c62988a9e7ed1038250a2d044889eda046500c5 (patch)
tree68e66b488d3c4ac5b3c97e825dad2fc7fc83220d /src/map.cpp
parent3fac30d570918a853a236c75fe985a2d732e7f75 (diff)
downloadmanaverse-1c62988a9e7ed1038250a2d044889eda046500c5.tar.gz
manaverse-1c62988a9e7ed1038250a2d044889eda046500c5.tar.bz2
manaverse-1c62988a9e7ed1038250a2d044889eda046500c5.tar.xz
manaverse-1c62988a9e7ed1038250a2d044889eda046500c5.zip
Again a bit improve map draw speed.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 41b80d02e..dc742d6bb 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -263,11 +263,11 @@ void MapLayer::updateSDL(Graphics *graphics, int startX, int startY,
const int yWidth = y * mWidth;
const int py0 = y * 32 + dy;
- int tilePtr = startX + yWidth;
+ Image **tilePtr = mTiles + startX + yWidth;
for (int x = startX; x < endX; x++, tilePtr++)
{
- Image *img = mTiles[tilePtr];
+ Image *img = *tilePtr;
if (img)
{
const int px = x * 32 + dx;
@@ -344,10 +344,10 @@ void MapLayer::updateOGL(Graphics *graphics, int startX, int startY,
const int py0 = y * 32 + dy;
std::map<Image*, ImageVertexes*> imgSet;
- int tilePtr = startX + yWidth;
+ Image **tilePtr = mTiles + startX + yWidth;
for (int x = startX; x < endX; x++, tilePtr++)
{
- Image *img = mTiles[tilePtr];
+ Image *img = *tilePtr;
if (img)
{
const int px = x * 32 + dx;
@@ -472,7 +472,6 @@ void MapLayer::drawFringe(Graphics *graphics, int startX, int startY,
const int py0 = y32 + dy;
const int py1 = y32 - scrollY;
-// int tilePtr = startX + yWidth;
Image **tilePtr = mTiles + startX + yWidth;
for (int x = startX; x < endX; x++, tilePtr++)
{