From 4d745dc74e9be415aefd8e835b8ef3edc27d5fdc Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 1 Nov 2015 13:35:04 +0000 Subject: [PATCH] Add Epic Mission text to galactic map. --- src/galaxy/galacticMap.c | 11 +++-------- src/galaxy/starSystems.c | 5 +++++ src/structs.h | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/galaxy/galacticMap.c b/src/galaxy/galacticMap.c index 7b37fe1..93379ad 100644 --- a/src/galaxy/galacticMap.c +++ b/src/galaxy/galacticMap.c @@ -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) diff --git a/src/galaxy/starSystems.c b/src/galaxy/starSystems.c index db87795..443f069 100644 --- a/src/galaxy/starSystems.c +++ b/src/galaxy/starSystems.c @@ -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) diff --git a/src/structs.h b/src/structs.h index add22ef..98d67c9 100644 --- a/src/structs.h +++ b/src/structs.h @@ -199,6 +199,7 @@ struct Mission { char craft[MAX_NAME_LENGTH]; int available; int completed; + int epic; Challenge challengeHead; Mission *next; };