Always sparkle trophies.

This commit is contained in:
Steve 2016-06-02 12:34:35 +01:00
parent d4de29004e
commit 011851d906
2 changed files with 5 additions and 14 deletions

View File

@ -58,6 +58,8 @@ void initTrophies(void)
alertRect.h = 90;
alertRect.y = 10;
sparkleAngle = 0;
resetAlert();
}
@ -99,8 +101,6 @@ void initTrophiesDisplay(void)
next = getWidget("next", "trophies");
next->action = nextPage;
next->visible = 1;
sparkleAngle = 0;
}
static void nextPage(void)
@ -119,15 +119,6 @@ static void prevPage(void)
prev->visible = page > 0;
}
void doTrophies(void)
{
sparkleAngle += 0.25;
if (sparkleAngle >= 360)
{
sparkleAngle = 0;
}
}
void drawTrophies(void)
{
Trophy *t;
@ -255,10 +246,9 @@ void doTrophyAlerts(void)
alertTrophy->notify = 0;
resetAlert();
}
/* do the sparkle rotation */
doTrophies();
}
sparkleAngle = mod(sparkleAngle + 0.25, 360);
}
static void nextAlert(void)

View File

@ -41,6 +41,7 @@ extern void drawWidgets(char *groupName);
extern char *timeToDate(long millis);
extern void textSize(char *text, int size, int *w, int *h);
extern void awardPandoranCraftTrophy(void);
extern float mod(float n, float x);
extern App app;
extern Battle battle;