the LOMEM define has never been used, kill it.

This commit is contained in:
Enno Rehling 2017-04-01 20:08:04 +02:00
parent 329ab2be2a
commit 4aa26343f6
6 changed files with 6 additions and 31 deletions

View File

@ -123,13 +123,8 @@ extern "C" {
typedef struct weapon { typedef struct weapon {
int count, used; int count, used;
const struct weapon_type *type; const struct weapon_type *type;
# ifdef LOMEM
int attackskill : 8;
int defenseskill : 8;
# else
int attackskill; int attackskill;
int defenseskill; int defenseskill;
# endif
} weapon; } weapon;
/*** fighter::person::flags ***/ /*** fighter::person::flags ***/

View File

@ -879,13 +879,14 @@ enum {
AFL_LOWSKILL = 1 << 1 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); struct building *b = inside_building(u);
const struct building_type *btype = building_is_active(b) ? b->type : NULL; const struct building_type *btype = building_is_active(b) ? b->type : NULL;
int save_n = 1, save_d = 1; int save_n = 1, save_d = 1;
int skill = 0; 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->btype == NULL || mod->btype == btype) {
if (mod->race == NULL || mod->race == u_race(u)) { if (mod->race == NULL || mod->race == u_race(u)) {
if (mod->flags & RMF_SAVEMATERIAL) { if (mod->flags & RMF_SAVEMATERIAL) {
@ -940,7 +941,7 @@ static void allocate_resource(unit * u, const resource_type * rtype, int want)
} }
if (rtype->modifiers) { 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) { if (msg) {
ADDMSG(&u->faction->msgs, msg); ADDMSG(&u->faction->msgs, msg);
return; return;

View File

@ -42,8 +42,8 @@ extern "C" {
#define FFL_QUIT (1<<3) #define FFL_QUIT (1<<3)
#define FFL_CURSED (1<<4) /* you're going to have a bad time */ #define FFL_CURSED (1<<4) /* you're going to have a bad time */
#define FFL_DEFENDER (1<<10) #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_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 #define FFL_MARK (1<<23) /* f<>r markierende algorithmen, die das
* hinterher auch wieder l<EFBFBD>schen m<EFBFBD>ssen! * hinterher auch wieder l<EFBFBD>schen m<EFBFBD>ssen!
* (FFL_SELECT muss man vorher initialisieren, * (FFL_SELECT muss man vorher initialisieren,

View File

@ -44,13 +44,8 @@ static struct locale_data *locale_array[MAXLOCALES];
typedef struct order_data { typedef struct order_data {
const char *_str; const char *_str;
# ifdef LOMEM
int _refcount:20;
int _lindex:4;
# else
int _refcount; int _refcount;
int _lindex; int _lindex;
# endif
keyword_t _keyword; keyword_t _keyword;
} order_data; } order_data;

View File

@ -25,29 +25,20 @@ extern "C" {
typedef struct rawmaterial { typedef struct rawmaterial {
const struct resource_type *rtype; 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 amount;
int level; int level;
int flags; int flags;
int base; int base;
int divisor; int divisor;
int startlevel; int startlevel;
#endif
struct rawmaterial *next; struct rawmaterial *next;
} rawmaterial; } rawmaterial;
typedef struct resource_mod { typedef struct resource_mod {
int flags;
variant value; variant value;
const struct building_type *btype; const struct building_type *btype;
const struct race *race; const struct race *race;
unsigned int flags;
} resource_mod; } resource_mod;
typedef struct rawmaterial_type { typedef struct rawmaterial_type {

View File

@ -30,17 +30,10 @@ extern "C" {
#define SMF_PRODUCTION (1<<1) /* für Produktion - am gebäude, an der einheit */ #define SMF_PRODUCTION (1<<1) /* für Produktion - am gebäude, an der einheit */
typedef struct skill { typedef struct skill {
#ifdef LOMEM
int id:8;
unsigned int level:8;
unsigned int weeks:8;
unsigned int old:8;
#else
int id; int id;
int level; int level;
int weeks; int weeks;
int old; int old;
#endif
} skill; } skill;
typedef int(*skillmod_fun) (const struct unit *, const struct region *, typedef int(*skillmod_fun) (const struct unit *, const struct region *,