summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/minimap.cpp30
-rw-r--r--src/player.h5
2 files changed, 25 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:
diff --git a/src/player.h b/src/player.h
index d1155f4b..53b70b1d 100644
--- a/src/player.h
+++ b/src/player.h
@@ -60,6 +60,11 @@ class Player : public Being
virtual void setGender(Gender gender);
/**
+ * Whether or not this player is a GM.
+ */
+ bool isGM() { return mIsGM; }
+
+ /**
* Sets the hair style and color for this player.
*
* Only for convenience in 0.0 client. When porting