diff --git a/src/battle.h b/src/battle.h index 85e65cf66..4e20d00d8 100644 --- a/src/battle.h +++ b/src/battle.h @@ -123,13 +123,8 @@ extern "C" { typedef struct weapon { int count, used; const struct weapon_type *type; -# ifdef LOMEM - int attackskill : 8; - int defenseskill : 8; -# else int attackskill; int defenseskill; -# endif } weapon; /*** fighter::person::flags ***/ diff --git a/src/economy.c b/src/economy.c index fa8d6aa22..03ab07bcd 100644 --- a/src/economy.c +++ b/src/economy.c @@ -879,13 +879,14 @@ enum { AFL_LOWSKILL = 1 << 1 }; -struct message * get_modifiers(unit *u, const resource_mod *mod, variant *savep, int *skillp) { +struct message * get_modifiers(unit *u, const resource_type *rtype, variant *savep, int *skillp) { struct building *b = inside_building(u); const struct building_type *btype = building_is_active(b) ? b->type : NULL; int save_n = 1, save_d = 1; int skill = 0; + resource_mod *mod; - for (; mod->flags != 0; ++mod) { + for (mod = rtype->modifiers; mod && mod->flags != 0; ++mod) { if (mod->btype == NULL || mod->btype == btype) { if (mod->race == NULL || mod->race == u_race(u)) { if (mod->flags & RMF_SAVEMATERIAL) { @@ -940,7 +941,7 @@ static void allocate_resource(unit * u, const resource_type * rtype, int want) } if (rtype->modifiers) { - message *msg = get_modifiers(u, rtype->modifiers, &save_mod, &skill_mod); + message *msg = get_modifiers(u, rtype, &save_mod, &skill_mod); if (msg) { ADDMSG(&u->faction->msgs, msg); return; diff --git a/src/kernel/faction.h b/src/kernel/faction.h index edd812bf0..e0cd893a1 100644 --- a/src/kernel/faction.h +++ b/src/kernel/faction.h @@ -42,8 +42,8 @@ extern "C" { #define FFL_QUIT (1<<3) #define FFL_CURSED (1<<4) /* you're going to have a bad time */ #define FFL_DEFENDER (1<<10) -#define FFL_SELECT (1<<18) /* ehemals f->dh, u->dh, r->dh, etc... */ #define FFL_NOAID (1<<21) /* Hilfsflag Kampf */ +#define FFL_SELECT (1<<22) /* ehemals f->dh, u->dh, r->dh, etc... */ #define FFL_MARK (1<<23) /* f�r markierende algorithmen, die das * hinterher auch wieder l�schen m�ssen! * (FFL_SELECT muss man vorher initialisieren, diff --git a/src/kernel/order.c b/src/kernel/order.c index 9e7a45991..6fbb53040 100644 --- a/src/kernel/order.c +++ b/src/kernel/order.c @@ -44,13 +44,8 @@ static struct locale_data *locale_array[MAXLOCALES]; typedef struct order_data { const char *_str; -# ifdef LOMEM - int _refcount:20; - int _lindex:4; -# else int _refcount; int _lindex; -# endif keyword_t _keyword; } order_data; diff --git a/src/kernel/resources.h b/src/kernel/resources.h index 67cd48d43..d94f043fc 100644 --- a/src/kernel/resources.h +++ b/src/kernel/resources.h @@ -25,29 +25,20 @@ extern "C" { typedef struct rawmaterial { const struct resource_type *rtype; -#ifdef LOMEM - int amount:16; - int level:8; - int flags:8; - int base:8; - int divisor:8; - int startlevel:8; -#else int amount; int level; int flags; int base; int divisor; int startlevel; -#endif struct rawmaterial *next; } rawmaterial; typedef struct resource_mod { + int flags; variant value; const struct building_type *btype; const struct race *race; - unsigned int flags; } resource_mod; typedef struct rawmaterial_type { diff --git a/src/kernel/skills.h b/src/kernel/skills.h index 2270d091c..d294485cb 100644 --- a/src/kernel/skills.h +++ b/src/kernel/skills.h @@ -30,17 +30,10 @@ extern "C" { #define SMF_PRODUCTION (1<<1) /* für Produktion - am gebäude, an der einheit */ typedef struct skill { -#ifdef LOMEM - int id:8; - unsigned int level:8; - unsigned int weeks:8; - unsigned int old:8; -#else int id; int level; int weeks; int old; -#endif } skill; typedef int(*skillmod_fun) (const struct unit *, const struct region *,