removed old get_/set_change_herb functions, no longer in use

This commit is contained in:
Enno Rehling 2005-10-25 08:28:00 +00:00
parent dabbeb39a6
commit 1b4aa36874
3 changed files with 0 additions and 68 deletions

View File

@ -3231,35 +3231,6 @@ writemonument(void)
fclose(F); fclose(F);
#ifdef OLD_ITEMS
{
char zText[MAX_PATH];
sprintf(zText, "%s/news-silly", basepath());
F = cfopen(zText, "w");
if (!F) return;
}
for (f=factions;f;f=f->next) {
unit * u;
int k;
int count = 0;
for (u=f->units;u;u=u->nextF) {
count += get_herb(u, h);
}
for (i=0;i!=3;++i) if (count<fjord[i].size) break;
if (i) {
for (k=0;k<i-1;++k) fjord[k] = fjord[k+1];
fjord[i-1].size=count;
fjord[i-1].f=f;
}
}
fprintf(F, "\n\nBesitzer der größten %shaufen:\n", herbdata[0][h]);
for (i=0;i!=3;++i) {
fprintf(F, " %s (%d Stück)\n", factionname(fjord[2-i].f), fjord[2-i].size);
}
fclose(F);
#else
printf("!! news-silly not implemented\n");
#endif
} }
static void static void

View File

@ -663,41 +663,6 @@ change_item(unit * u, item_t it, int value)
return i->number; return i->number;
} }
/*** alte herbs ***/
int
get_herb(const unit * u, herb_t h)
{
const item_type * type = oldherbtype[h]->itype;
item * it = *i_find((item**)&u->items, type);
return it?it->number:0;
}
int
set_herb(unit * u, herb_t h, int value)
{
const item_type * type = oldherbtype[h]->itype;
item * i = *i_find((item**)&u->items, type);
if (!i) i = i_add(&u->items, i_new(type, value));
else i->number = value;
return value;
}
int
change_herb(unit * u, herb_t h, int value)
{
const item_type * type = oldherbtype[h]->itype;
item * i = *i_find(&u->items, type);
if (!i) {
if (!value) return 0;
assert(value>0);
i = i_add(&u->items, i_new(type, value));
} else {
i->number += value;
}
return i->number;
}
/*** alte potions ***/ /*** alte potions ***/
int int

View File

@ -457,10 +457,6 @@ int get_item(const struct unit *, item_t);
int set_item(struct unit *, item_t, int); int set_item(struct unit *, item_t, int);
int change_item(struct unit *, item_t, int); int change_item(struct unit *, item_t, int);
int get_herb(const struct unit *, herb_t);
int set_herb(struct unit *, herb_t, int);
int change_herb(struct unit *, herb_t, int);
int get_potion(const struct unit *, potion_t); int get_potion(const struct unit *, potion_t);
int get_money(const struct unit *); int get_money(const struct unit *);