[Change] Improved the faction colouring a little.

This commit is contained in:
Allanis 2013-08-26 16:41:37 +01:00
parent 871a57ecd7
commit 014ba77361
2 changed files with 4 additions and 5 deletions

View File

@ -126,7 +126,7 @@ int faction_getPlayer(int f) {
/* Get the colour of the faction based on its standing with the player. */ /* Get the colour of the faction based on its standing with the player. */
glColour* faction_getColour(int f) { glColour* faction_getColour(int f) {
if(f == -1) return &cInert; if(f < 0) return &cInert;
else if(areAllies(FACTION_PLAYER, f)) return &cFriend; else if(areAllies(FACTION_PLAYER, f)) return &cFriend;
else if(areEnemies(FACTION_PLAYER, f)) return &cHostile; else if(areEnemies(FACTION_PLAYER, f)) return &cHostile;
else return &cNeutral; else return &cNeutral;

View File

@ -101,10 +101,9 @@ void planets_minimap(const double res, const double w,
for(i = 0; i < cur_system->nplanets; i++) { for(i = 0; i < cur_system->nplanets; i++) {
planet = &cur_system->planets[i]; planet = &cur_system->planets[i];
if(!planet_hasService(planet, PLANET_SERVICE_BASIC)) col = faction_getColour(planet->faction);
col = &cInert; if((col != &cHostile) && !planet_hasService(planet, PLANET_SERVICE_BASIC))
else col = &cInert; /* Override non-hostile planets without services. */
col = faction_getColour(planet->faction);
COLOUR(*col); COLOUR(*col);
r = (int)(cur_system->planets[i].gfx_space->sw / res); r = (int)(cur_system->planets[i].gfx_space->sw / res);