From 5e8b983f3ef36ee95e1b9478ebfb34c5fd3c8e58 Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 7 Apr 2016 12:39:53 +0100 Subject: [PATCH] Update to showing objective numbers. --- src/battle/missionInfo.c | 4 +++- src/battle/objectives.c | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/battle/missionInfo.c b/src/battle/missionInfo.c index 6fa8e90..0402dbd 100644 --- a/src/battle/missionInfo.c +++ b/src/battle/missionInfo.c @@ -142,10 +142,12 @@ static void drawObjectives(void) } drawText(SCREEN_WIDTH / 2 - 100, y, 22, TA_RIGHT, colors.white, o->description); - if (o->targetValue > 1 && !o->isCondition && !o->hideNumbers) + + if (o->targetValue > 1 && !o->hideNumbers) { drawText(SCREEN_WIDTH / 2, y, 22, TA_CENTER, colors.white, "%d / %d", o->currentValue, o->targetValue); } + drawText(SCREEN_WIDTH / 2 + 100, y, 22, TA_LEFT, color, objectiveStatus[o->status]); } } diff --git a/src/battle/objectives.c b/src/battle/objectives.c index c4f46e6..636e9b5 100644 --- a/src/battle/objectives.c +++ b/src/battle/objectives.c @@ -170,6 +170,10 @@ void updateCondition(char *name, int type) o->status = OS_FAILED; addHudMessage(colors.red, _("%s - Objective Failed!"), o->description); } + else if (!o->hideNumbers) + { + addHudMessage(colors.red, "%s - %d / %d", o->description, o->currentValue, o->targetValue); + } } } } @@ -251,7 +255,7 @@ void loadObjectives(cJSON *node) o->active = getJSONValue(node, "active", 1); o->isCondition = getJSONValue(node, "isCondition", 0); o->isEliminateAll = getJSONValue(node, "isEliminateAll", 0); - o->hideNumbers = getJSONValue(node, "hideNumbers", 0); + o->hideNumbers = getJSONValue(node, "hideNumbers", o->isCondition); if (o->isEliminateAll) {