static void drawMissionSummary(SDL_Texture *header) { SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_BLEND); SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 128); SDL_RenderFillRect(app.renderer, NULL); SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE); blit(header, SCREEN_WIDTH / 2, 150, 1); if (!game.currentMission->challengeData.isChallenge) { drawObjectives(); } else { drawChallenges(); } }
static void draw(void) { drawBackground(background); blit(planetTexture, planet.x, planet.y, 1); drawStars(); drawText(SCREEN_WIDTH / 2, 40, 28, TA_CENTER, colors.white, CHALLENGES_TEXT); drawText(SCREEN_WIDTH / 2, 83, 16, TA_CENTER, colors.lightGrey, COMPLETED_TEXT, game.completedChallenges, game.totalChallenges); drawText(SCREEN_WIDTH / 2, 110, 16, TA_CENTER, colors.lightGrey, PAGE_TEXT, page + 1, (int)maxPages); drawChallenges(); switch (show) { case SHOW_CHALLENGES: drawWidgets("challenges"); break; case SHOW_MENU: drawMenu(); break; case SHOW_STATS: drawStats(); break; case SHOW_TROPHIES: drawTrophies(); break; case SHOW_OPTIONS: drawOptions(); break; case SHOW_FIGHTER_DB: drawFighterDatabase(); break; } }