diff --git a/src/battle/battle.c b/src/battle/battle.c index 6e67df6..217158b 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -110,6 +110,11 @@ static void logic(void) doPlayerSelect(); } } + + if (battle.status != MS_IN_PROGRESS && battle.missionFinishedTimer <= -FPS * 2) + { + doTrophyAlerts(); + } } doWidgets(); @@ -177,15 +182,15 @@ static void doBattle(void) if (battle.status != MS_IN_PROGRESS) { battle.missionFinishedTimer--; - } + + if (battle.unwinnable && battle.missionFinishedTimer <= -FPS * 6) + { + postBattle(); - if (battle.unwinnable && battle.missionFinishedTimer <= -FPS * 6) - { - postBattle(); + destroyBattle(); - destroyBattle(); - - initGalacticMap(); + initGalacticMap(); + } } } @@ -235,6 +240,11 @@ static void draw(void) drawOptions(); break; } + + if (battle.status != MS_IN_PROGRESS && battle.status != MS_PAUSED && battle.missionFinishedTimer <= -FPS * 2) + { + drawTrophyAlert(); + } } static void drawMenu(void) diff --git a/src/battle/battle.h b/src/battle/battle.h index 96bfbb6..2c153a6 100644 --- a/src/battle/battle.h +++ b/src/battle/battle.h @@ -86,6 +86,8 @@ 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 App app; extern Battle battle;