Save game more frequently, for stats and trophies.
This commit is contained in:
parent
c6d598da6c
commit
a656d41532
|
@ -387,6 +387,8 @@ static void postBattle(void)
|
||||||
game.stats[STAT_EPIC_KILL_STREAK] = MAX(game.stats[STAT_EPIC_KILL_STREAK], battle.stats[STAT_EPIC_KILL_STREAK]);
|
game.stats[STAT_EPIC_KILL_STREAK] = MAX(game.stats[STAT_EPIC_KILL_STREAK], battle.stats[STAT_EPIC_KILL_STREAK]);
|
||||||
|
|
||||||
updateAccuracyStats(game.stats);
|
updateAccuracyStats(game.stats);
|
||||||
|
|
||||||
|
saveGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroyBattle(void)
|
void destroyBattle(void)
|
||||||
|
|
|
@ -85,9 +85,9 @@ extern void updateAccuracyStats(unsigned int *stats);
|
||||||
extern void clearInput(void);
|
extern void clearInput(void);
|
||||||
extern void runScriptFunction(const char *format, ...);
|
extern void runScriptFunction(const char *format, ...);
|
||||||
extern void doSpawners(void);
|
extern void doSpawners(void);
|
||||||
extern void awardPostMissionTrophies(void);
|
|
||||||
extern void doTrophyAlerts(void);
|
extern void doTrophyAlerts(void);
|
||||||
extern void drawTrophyAlert(void);
|
extern void drawTrophyAlert(void);
|
||||||
|
extern void saveGame(void);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
|
|
@ -313,6 +313,8 @@ void saveConfig(void)
|
||||||
|
|
||||||
void cleanup(void)
|
void cleanup(void)
|
||||||
{
|
{
|
||||||
|
saveGame();
|
||||||
|
|
||||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Cleaning up ...");
|
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Cleaning up ...");
|
||||||
|
|
||||||
SDL_DestroyRenderer(app.renderer);
|
SDL_DestroyRenderer(app.renderer);
|
||||||
|
|
|
@ -71,6 +71,7 @@ extern char *getLookupName(char *prefix, long num);
|
||||||
extern long lookup(char *name);
|
extern long lookup(char *name);
|
||||||
extern void initStars(void);
|
extern void initStars(void);
|
||||||
extern void initTrophies(void);
|
extern void initTrophies(void);
|
||||||
|
extern void saveGame(void);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
Loading…
Reference in New Issue