Show the most recent 9 missions at most (really only applies to Alba).
This commit is contained in:
parent
c741216f01
commit
345a45f9c4
|
@ -531,7 +531,7 @@ static void selectStarSystem(void)
|
|||
|
||||
static void drawStarSystemDetail(void)
|
||||
{
|
||||
int y;
|
||||
int y, start, i;
|
||||
Mission *mission;
|
||||
SDL_Rect r;
|
||||
|
||||
|
@ -559,7 +559,17 @@ static void drawStarSystemDetail(void)
|
|||
|
||||
y += 80;
|
||||
|
||||
/*
|
||||
* this only really counts for Alba, as it has 10 missions and there's only space for 9 to display.
|
||||
* We need to subtract 1 from the completed missions to get the correct number (mission at the bottom will be the one to select).
|
||||
*/
|
||||
start = MIN(selectedStarSystem->completedMissions - 1 - MAX_LISTED_MISSIONS, 0);
|
||||
|
||||
i = 0;
|
||||
|
||||
for (mission = selectedStarSystem->missionHead.next ; mission != NULL ; mission = mission->next)
|
||||
{
|
||||
if (i >= start)
|
||||
{
|
||||
mission->rect.x = 200;
|
||||
mission->rect.y = y - 2;
|
||||
|
@ -582,6 +592,7 @@ static void drawStarSystemDetail(void)
|
|||
|
||||
y += 50;
|
||||
}
|
||||
}
|
||||
|
||||
if (game.currentMission->available)
|
||||
{
|
||||
|
|
|
@ -27,6 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define SHOW_STATS 4
|
||||
#define SHOW_TROPHIES 5
|
||||
|
||||
#define MAX_LISTED_MISSIONS 9
|
||||
|
||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
||||
extern void initBattle(void);
|
||||
extern void loadMission(char *filename);
|
||||
|
|
Loading…
Reference in New Issue