diff --git a/src/battle/battle.c b/src/battle/battle.c index 08b943f..4b8e3f7 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -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]); updateAccuracyStats(game.stats); + + saveGame(); } void destroyBattle(void) diff --git a/src/battle/battle.h b/src/battle/battle.h index 2c153a6..438cb11 100644 --- a/src/battle/battle.h +++ b/src/battle/battle.h @@ -85,9 +85,9 @@ extern void updateAccuracyStats(unsigned int *stats); extern void clearInput(void); extern void runScriptFunction(const char *format, ...); extern void doSpawners(void); -extern void awardPostMissionTrophies(void); extern void doTrophyAlerts(void); extern void drawTrophyAlert(void); +extern void saveGame(void); extern App app; extern Battle battle; diff --git a/src/system/init.c b/src/system/init.c index e8919d1..8f4503b 100644 --- a/src/system/init.c +++ b/src/system/init.c @@ -313,6 +313,8 @@ void saveConfig(void) void cleanup(void) { + saveGame(); + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Cleaning up ..."); SDL_DestroyRenderer(app.renderer); diff --git a/src/system/init.h b/src/system/init.h index 97f9767..efa7a1d 100644 --- a/src/system/init.h +++ b/src/system/init.h @@ -71,6 +71,7 @@ extern char *getLookupName(char *prefix, long num); extern long lookup(char *name); extern void initStars(void); extern void initTrophies(void); +extern void saveGame(void); extern App app; extern Colors colors;