diff options
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp index 5f6433c2..1a869e61 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -285,6 +285,24 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY) mSprites); } + // Draws beings with a lower opacity to make them visible + // even when covered by a wall or some other elements... + MapSprites::const_iterator si = mSprites.begin(); + while (si != mSprites.end()) + { + if (*si) + // For now, just draw sprites with only one layer. + { + if ((*si)->getNumberOfLayers() == 1) + { + (*si)->setAlpha(0.3f); + (*si)->draw(graphics, -scrollX, -scrollY); + (*si)->setAlpha(1.0f); + } + } + si++; + } + drawOverlay(graphics, scrollX, scrollY, (int) config.getValue("OverlayDetail", 2)); } |