Heroes nur, wenn HEROES == 1

This commit is contained in:
Christian Schlittchen 2004-12-20 10:09:59 +00:00
parent 35ae4b0a60
commit a5239bb241
4 changed files with 8 additions and 0 deletions

View File

@ -1145,10 +1145,12 @@ report_computer(FILE * F, faction * f, const faction_list * addresses,
fprintf(F, "%d;Max. Immigranten\n", count_maxmigrants(f));
}
#if HEROES == 1
i = countheroes(f);
if (i>0) fprintf(F, "%d;heroes\n", i);
i = maxheroes(f);
if (i>0) fprintf(F, "%d;max_heroes\n", i);
#endif
if (f->age > 1 && f->lastorders != turn) {
fprintf(F, "%d;nmr\n", turn-f->lastorders);

View File

@ -2054,6 +2054,7 @@ report(FILE *F, faction * f, const faction_list * addresses,
count_migrants(f), maxmig);
centre(F, buf, true);
}
#if HEROES == 1
{
int maxh = maxheroes(f);
if (maxh) {
@ -2062,6 +2063,7 @@ report(FILE *F, faction * f, const faction_list * addresses,
centre(F, buf, true);
}
}
#endif
if (f->age > 1 && f->lastorders != turn) {
rnl(F);

View File

@ -1128,6 +1128,7 @@ unitlist_insert(struct unit_list **ul, struct unit *u)
*ul = rl2;
}
#if HEROES == 1
int
maxheroes(const struct faction * f)
{
@ -1146,3 +1147,4 @@ countheroes(const struct faction * f)
}
return n;
}
#endif

View File

@ -60,8 +60,10 @@ struct skill;
# define UFL_SAVEMASK (UFL_NOAID | UFL_OWNER | UFL_PARTEITARNUNG | UFL_LOCKED | UFL_HUNGER | FFL_NOIDLEOUT | UFL_TAKEALL | UFL_HERO)
#endif
#if HEROES == 1
extern int maxheroes(const struct faction * f);
extern int countheroes(const struct faction * f);
#endif
typedef struct unit {
struct unit *next; /* needs to be first entry, for region's unitlist */