From 660bb57bb0999d880955fda00752947d7e931f36 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 27 Feb 2016 18:12:18 +0000 Subject: [PATCH] Further challenge updates. --- src/challenges/challengeHome.c | 5 ++++- src/challenges/challengeHome.h | 1 + src/challenges/challenges.c | 4 ++-- src/game/title.c | 2 -- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/challenges/challengeHome.c b/src/challenges/challengeHome.c index b03aa11..ea327e3 100644 --- a/src/challenges/challengeHome.c +++ b/src/challenges/challengeHome.c @@ -181,7 +181,10 @@ static void drawChallenges(void) static void handleKeyboard(void) { - + if (app.keyboard[SDL_SCANCODE_ESCAPE]) + { + initTitle(); + } } static void startChallengeMission(void) diff --git a/src/challenges/challengeHome.h b/src/challenges/challengeHome.h index b727334..4eaaad9 100644 --- a/src/challenges/challengeHome.h +++ b/src/challenges/challengeHome.h @@ -40,6 +40,7 @@ extern void drawWidgets(char *groupName); extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2); extern Widget *getWidget(const char *name, const char *group); extern void saveGame(void); +extern void initTitle(void); extern App app; extern Battle battle; diff --git a/src/challenges/challenges.c b/src/challenges/challenges.c index cc02b56..764454d 100644 --- a/src/challenges/challenges.c +++ b/src/challenges/challenges.c @@ -33,14 +33,14 @@ static char descriptionBuffer[MAX_DESCRIPTION_LENGTH]; static char *challengeDescription[] = { "Retain at least %d%% armour", - "Finish mission in %d seconds or less", + "Complete challenge in %d seconds or less", "Attain a %d%% hit accuracy", "Do not lose any team mates", "Do not lose more than 1 team mate", "Do not lose more than %d team mates", "Take down %d enemy targets", "Disable %d or more enemy fighters", - "Finish mission in %d minutes or less" + "Complete challenge in %d minutes or less" }; void initChallenges(void) diff --git a/src/game/title.c b/src/game/title.c index 90cb75f..de8f9c2 100644 --- a/src/game/title.c +++ b/src/game/title.c @@ -217,8 +217,6 @@ static void options(void) static void returnFromOptions(void) { showingOptions = 0; - - selectWidget("newGame", "title"); } static void quit(void)