From 8c4c5a58c256cce7beb21b68c8a7d6b6ff5c4a3a Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Fri, 21 May 2010 11:46:56 -0600 Subject: Fix handling sprite alpha This way, it's only set to the overlay alpha while drawing the overlay. Fixes PlayerBox rendering. --- src/map.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index 0c23aeb4..b308c775 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -143,7 +143,6 @@ void MapLayer::draw(Graphics *graphics, int startX, int startY, { while (ai != actors.end() && (*ai)->getPixelY() <= y * 32) { - (*ai)->setAlpha(1.0f); (*ai)->draw(graphics, -scrollX, -scrollY); ai++; } @@ -167,7 +166,6 @@ void MapLayer::draw(Graphics *graphics, int startX, int startY, { while (ai != actors.end()) { - (*ai)->setAlpha(1.0f); (*ai)->draw(graphics, -scrollX, -scrollY); ai++; } @@ -341,6 +339,7 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY) { actor->setAlpha(0.3f); actor->draw(graphics, -scrollX, -scrollY); + actor->setAlpha(1.0f); } } ai++; -- cgit v1.2.3-70-g09d2