Show number of conditions on HUD, as well as objectives.

This commit is contained in:
Steve 2016-03-29 07:19:39 +01:00
parent e6ea4bff06
commit 8705337e2a
3 changed files with 7 additions and 3 deletions

View File

@ -409,7 +409,7 @@ static void drawObjectives(void)
if (!game.currentMission->challengeData.isChallenge)
{
blit(objectives, (SCREEN_WIDTH / 2) - 50, 14, 0);
drawText(SCREEN_WIDTH / 2, 10, 16, TA_CENTER, colors.white, "%d / %d", battle.numObjectivesComplete, battle.numObjectivesTotal);
drawText(SCREEN_WIDTH / 2, 10, 16, TA_CENTER, colors.white, "%d / %d", battle.numObjectivesComplete, (battle.numObjectivesTotal + battle.numConditions));
}
else
{

View File

@ -26,7 +26,7 @@ void doObjectives(void)
int numHiddenObjectives;
Objective *o;
battle.numObjectivesComplete = battle.numObjectivesTotal = 0;
battle.numObjectivesComplete = battle.numObjectivesTotal = battle.numConditions = 0;
objectiveFailed = 0;
numHiddenObjectives = 0;
@ -38,6 +38,10 @@ void doObjectives(void)
{
battle.numObjectivesTotal++;
}
else
{
battle.numConditions++;
}
}
else
{

View File

@ -339,7 +339,7 @@ typedef struct {
int ecmTimer;
int radarRange;
int numPlayerGuns;
int numObjectivesComplete, numObjectivesTotal;
int numObjectivesComplete, numObjectivesTotal, numConditions;
Entity *missionTarget;
Entity *jumpgate;
SDL_Texture *background, *planetTexture;