From bb2da24d75d3ba1f029961cd3b15a29ac330686b Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 3 Apr 2005 19:06:24 +0000 Subject: New version of 3-1 map. --- src/gui/minimap.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/gui/minimap.cpp') diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index df9d2f42..c43f5218 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -63,22 +63,26 @@ void Minimap::draw(gcn::Graphics *graphics) sourceRect.x = sourceRect.y = 0; sourceRect.w = getWidth(); sourceRect.h = getHeight(); - if ( mapBackground ) + + if (mapBackground) { SDL_FillRect(mapBackground, &sourceRect, mapColor); SDL_SetAlpha(mapBackground, SDL_SRCALPHA, 120); } - } - SDL_Rect screenRect; - screenRect.w = getWidth(); - screenRect.h = getHeight(); - screenRect.x = x; - screenRect.y = y; if (mapBackground) + { + SDL_Rect screenRect; + screenRect.w = getWidth(); + screenRect.h = getHeight(); + screenRect.x = x; + screenRect.y = y; + SDL_BlitSurface(mapBackground, NULL, screen, &screenRect); + } + graphics->setColor(gcn::Color(0, 0, 0)); graphics->drawRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight())); graphics->setColor(gcn::Color(209, 52, 61)); graphics->fillRectangle(gcn::Rectangle(player_node->x / 2, -- cgit v1.2.3-70-g09d2