Misc. code clean up.

This commit is contained in:
Steve 2016-05-06 12:44:36 +01:00
parent 0f8b02285e
commit e27c60156e
1 changed files with 3 additions and 2 deletions

View File

@ -132,7 +132,7 @@ void drawTrophies(void)
{
Trophy *t;
SDL_Rect r;
int start, i, x, y;
int start, end, i, x, y;
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_BLEND);
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 128);
@ -159,11 +159,12 @@ void drawTrophies(void)
x = r.x + 15;
y = 180;
start = page * TROPHIES_PER_PAGE;
end = start + TROPHIES_PER_PAGE;
i = 0;
for (t = game.trophyHead.next ; t != NULL ; t = t->next)
{
if (i >= start && i < start + TROPHIES_PER_PAGE)
if (i >= start && i < end)
{
if (t->awarded)
{