diff options
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r-- | src/gui/minimap.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index 32887466c..dd0edc0ba 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -130,11 +130,13 @@ void Minimap::setMap(Map *map) setVisible(false); return; } - for (int y = 0; y < surface->h; y ++) - { - for (int x = 0; x < surface->w; x ++) - *(data ++) = -map->getWalk(x, y); - } + const int size = surface->h * surface->w; + const int mask = (Map::BLOCKMASK_WALL | Map::BLOCKMASK_AIR + | Map::BLOCKMASK_WATER); + + for (int ptr = 0; ptr < size; ptr ++) + *(data ++) = -!(map->mMetaTiles[ptr].blockmask & mask); + SDL_UnlockSurface(surface); mMapImage = Image::load(surface); |