Galactic map display updates.
This commit is contained in:
parent
142c02c1ed
commit
a500f137b6
|
@ -301,7 +301,16 @@ static void addPulses(void)
|
||||||
switch (starSystem->type)
|
switch (starSystem->type)
|
||||||
{
|
{
|
||||||
case SS_NORMAL:
|
case SS_NORMAL:
|
||||||
|
if (!starSystem->activeMission->isOptional)
|
||||||
|
{
|
||||||
pulse->r = 255;
|
pulse->r = 255;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pulse->r = 128;
|
||||||
|
pulse->g = 128;
|
||||||
|
pulse->b = 255;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SS_SOL:
|
case SS_SOL:
|
||||||
|
@ -563,7 +572,7 @@ static void drawStarSystemDetail(void)
|
||||||
* this only really counts for Alba, as it has 10 missions and there's only space for 9 to display.
|
* this only really counts for Alba, as it has 10 missions and there's only space for 9 to display.
|
||||||
* We need to subtract 1 from the completed missions to get the correct number (mission at the bottom will be the one to select).
|
* We need to subtract 1 from the completed missions to get the correct number (mission at the bottom will be the one to select).
|
||||||
*/
|
*/
|
||||||
start = MIN(selectedStarSystem->completedMissions - 1 - MAX_LISTED_MISSIONS, 0);
|
start = MAX(selectedStarSystem->availableMissions - MAX_LISTED_MISSIONS, 0);
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
|
@ -592,6 +601,8 @@ static void drawStarSystemDetail(void)
|
||||||
|
|
||||||
y += 50;
|
y += 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (game.currentMission->available)
|
if (game.currentMission->available)
|
||||||
|
|
|
@ -133,12 +133,13 @@ void updateStarSystemMissions(void)
|
||||||
{
|
{
|
||||||
StarSystem *starSystem;
|
StarSystem *starSystem;
|
||||||
Mission *mission, *prev;
|
Mission *mission, *prev;
|
||||||
|
int numOptional, completedOptional;
|
||||||
|
|
||||||
game.completedMissions = game.totalMissions = game.availableMissions = 0;
|
game.completedMissions = game.totalMissions = game.availableMissions = 0;
|
||||||
|
|
||||||
for (starSystem = game.starSystemHead.next ; starSystem != NULL ; starSystem = starSystem->next)
|
for (starSystem = game.starSystemHead.next ; starSystem != NULL ; starSystem = starSystem->next)
|
||||||
{
|
{
|
||||||
starSystem->completedMissions = starSystem->availableMissions = starSystem->totalMissions = 0;
|
numOptional = completedOptional = starSystem->completedMissions = starSystem->availableMissions = starSystem->totalMissions = 0;
|
||||||
|
|
||||||
for (mission = starSystem->missionHead.next ; mission != NULL ; mission = mission->next)
|
for (mission = starSystem->missionHead.next ; mission != NULL ; mission = mission->next)
|
||||||
{
|
{
|
||||||
|
@ -148,12 +149,22 @@ void updateStarSystemMissions(void)
|
||||||
{
|
{
|
||||||
starSystem->completedMissions++;
|
starSystem->completedMissions++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mission->isOptional && starSystem->type == SS_NORMAL)
|
||||||
|
{
|
||||||
|
numOptional++;
|
||||||
|
|
||||||
|
if (mission->completed)
|
||||||
|
{
|
||||||
|
completedOptional++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (starSystem->type == SS_NORMAL)
|
if (starSystem->type == SS_NORMAL)
|
||||||
{
|
{
|
||||||
game.totalMissions += starSystem->totalMissions;
|
game.totalMissions += (starSystem->totalMissions - numOptional);
|
||||||
game.completedMissions += starSystem->completedMissions;
|
game.completedMissions += (starSystem->completedMissions - completedOptional);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,6 +179,8 @@ void updateStarSystemMissions(void)
|
||||||
if (mission->available)
|
if (mission->available)
|
||||||
{
|
{
|
||||||
starSystem->availableMissions++;
|
starSystem->availableMissions++;
|
||||||
|
|
||||||
|
starSystem->activeMission = mission;
|
||||||
}
|
}
|
||||||
|
|
||||||
prev = mission;
|
prev = mission;
|
||||||
|
|
|
@ -304,6 +304,7 @@ struct StarSystem {
|
||||||
int availableMissions;
|
int availableMissions;
|
||||||
int fallsToPandorans;
|
int fallsToPandorans;
|
||||||
int type;
|
int type;
|
||||||
|
Mission *activeMission;
|
||||||
Mission missionHead;
|
Mission missionHead;
|
||||||
StarSystem *next;
|
StarSystem *next;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue