Add Epic Mission text to galactic map.

This commit is contained in:
Steve 2015-11-01 13:35:04 +00:00
parent bedf2fe74d
commit 4d745dc74e
3 changed files with 9 additions and 8 deletions

View File

@ -510,15 +510,10 @@ static void drawStarSystemDetail(void)
drawText(525, 230, 22, TA_LEFT, colors.white, selectedMission->description);
limitTextWidth(0);
}
else
if (selectedMission->epic)
{
drawText(525, 135, 18, TA_LEFT, colors.lightGrey, "Pilot: -");
drawText(525, 160, 18, TA_LEFT, colors.lightGrey, "Craft: -");
drawText(525, 185, 18, TA_LEFT, colors.lightGrey, "Squadron: -");
limitTextWidth(500);
drawText(525, 230, 22, TA_LEFT, colors.darkGrey, "You cannot play this mission yet. Complete the previous mission to unlock.");
limitTextWidth(0);
drawText(525, SCREEN_HEIGHT - 95, 18, TA_LEFT, colors.yellow, "Note: this is an Epic Mission.");
}
if (selectedMission && selectedMission->available && selectedMission->challengeHead.next)

View File

@ -94,6 +94,11 @@ static void loadMissionMeta(char *filename, StarSystem *starSystem)
STRNCPY(mission->requires, cJSON_GetObjectItem(root, "requires")->valuestring, MAX_DESCRIPTION_LENGTH);
}
if (cJSON_GetObjectItem(root, "epic"))
{
mission->epic = 1;
}
node = cJSON_GetObjectItem(root, "player");
if (node)

View File

@ -199,6 +199,7 @@ struct Mission {
char craft[MAX_NAME_LENGTH];
int available;
int completed;
int epic;
Challenge challengeHead;
Mission *next;
};