From 1b4aa3687471896446e59d9aeb11a066ed6a2c88 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 25 Oct 2005 08:28:00 +0000 Subject: [PATCH] removed old get_/set_change_herb functions, no longer in use --- src/common/gamecode/report.c | 29 ----------------------------- src/common/kernel/item.c | 35 ----------------------------------- src/common/kernel/item.h | 4 ---- 3 files changed, 68 deletions(-) diff --git a/src/common/gamecode/report.c b/src/common/gamecode/report.c index ef5f84cdb..cb01cfbb9 100644 --- a/src/common/gamecode/report.c +++ b/src/common/gamecode/report.c @@ -3231,35 +3231,6 @@ writemonument(void) 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 (countnumber; } -/*** 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 ***/ int diff --git a/src/common/kernel/item.h b/src/common/kernel/item.h index e9fce53f9..5ca7e7f74 100644 --- a/src/common/kernel/item.h +++ b/src/common/kernel/item.h @@ -457,10 +457,6 @@ int get_item(const struct unit *, item_t); int set_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_money(const struct unit *);