Access options from world.
This commit is contained in:
parent
2600f3cd1a
commit
1b4e50c727
|
@ -45,6 +45,7 @@ static void quit(void);
|
||||||
static void returnFromTrophyStats(void);
|
static void returnFromTrophyStats(void);
|
||||||
static void drawQuit(void);
|
static void drawQuit(void);
|
||||||
static void quitMission(void);
|
static void quitMission(void);
|
||||||
|
static void returnFromOptions(void);
|
||||||
int getMissionStatus(void);
|
int getMissionStatus(void);
|
||||||
|
|
||||||
static Texture *background;
|
static Texture *background;
|
||||||
|
@ -374,6 +375,8 @@ static void doWorldInProgress(void)
|
||||||
|
|
||||||
if (app.keyboard[SDL_SCANCODE_ESCAPE])
|
if (app.keyboard[SDL_SCANCODE_ESCAPE])
|
||||||
{
|
{
|
||||||
|
playSound(SND_MENU_BACK, 0);
|
||||||
|
|
||||||
returnFromTrophyStats();
|
returnFromTrophyStats();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -383,6 +386,8 @@ static void doWorldInProgress(void)
|
||||||
|
|
||||||
if (app.keyboard[SDL_SCANCODE_ESCAPE])
|
if (app.keyboard[SDL_SCANCODE_ESCAPE])
|
||||||
{
|
{
|
||||||
|
playSound(SND_MENU_BACK, 0);
|
||||||
|
|
||||||
returnFromTrophyStats();
|
returnFromTrophyStats();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -403,6 +408,8 @@ static void handleWidgets(void)
|
||||||
|
|
||||||
if (app.keyboard[SDL_SCANCODE_ESCAPE])
|
if (app.keyboard[SDL_SCANCODE_ESCAPE])
|
||||||
{
|
{
|
||||||
|
playSound(SND_MENU_BACK, 0);
|
||||||
|
|
||||||
resume();
|
resume();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -767,6 +774,7 @@ static void resume(void)
|
||||||
|
|
||||||
static void options(void)
|
static void options(void)
|
||||||
{
|
{
|
||||||
|
initOptions(returnFromOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void stats(void)
|
static void stats(void)
|
||||||
|
@ -802,6 +810,14 @@ static void quitMission(void)
|
||||||
world.missionCompleteTimer = (FPS * 1.5) + 1;
|
world.missionCompleteTimer = (FPS * 1.5) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void returnFromOptions(void)
|
||||||
|
{
|
||||||
|
app.delegate.logic = logic;
|
||||||
|
app.delegate.draw = draw;
|
||||||
|
|
||||||
|
returnFromTrophyStats();
|
||||||
|
}
|
||||||
|
|
||||||
void destroyWorld(void)
|
void destroyWorld(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -103,6 +103,7 @@ extern void doStats(void);
|
||||||
extern void doTrophies(void);
|
extern void doTrophies(void);
|
||||||
extern void drawTrophies(void);
|
extern void drawTrophies(void);
|
||||||
extern void limitTextWidth(int width);
|
extern void limitTextWidth(int width);
|
||||||
|
extern void initOptions(void (*callback)(void));
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
Loading…
Reference in New Issue