diff options
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r-- | src/gui/minimap.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index 8fc4c9ff..b4a70d18 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -26,8 +26,11 @@ #include "configuration.h" #include "graphics.h" #include "localplayer.h" -#include "map.h" #include "log.h" +#include "map.h" +#include "player.h" + +#include "gui/palette.h" #include "resources/image.h" #include "resources/resourcemanager.h" @@ -167,27 +170,34 @@ void Minimap::draw(gcn::Graphics *graphics) for (Beings::const_iterator bi = beings.begin(), bi_end = beings.end(); bi != bi_end; ++bi) { - const Being *being = (*bi); + Being *being = (*bi); int dotSize = 2; switch (being->getType()) { case Being::PLAYER: - if (being == player_node) { - dotSize = 3; - graphics->setColor(gcn::Color(61, 209, 52)); + Palette::ColorType type = Palette::PC; + + if (being == player_node) + { + type = Palette::SELF; + dotSize = 3; + } + + if (static_cast<Player*>(being)->isGM()) + type = Palette::GM_NAME; + + graphics->setColor(guiPalette->getColor(type)); break; - } - graphics->setColor(gcn::Color(61, 52, 209)); - break; + } case Being::MONSTER: - graphics->setColor(gcn::Color(209, 52, 61)); + graphics->setColor(guiPalette->getColor(Palette::MONSTER)); break; case Being::NPC: - graphics->setColor(gcn::Color(255, 255, 0)); + graphics->setColor(guiPalette->getColor(Palette::NPC)); break; default: |