(nxtitemp, trade_getitem, trade_desc, trade_check_item_ok, nxtitem,

oprange, show_mission, nameofitem, build_mission_list_type,
unit_map, xdvisible, trdswitchown, ontradingblock, trad, check_trade,
unit_type_name, start_stop_unit, scut, scra, mission, multifire,
perform_mission, fuel, NSC_GENITEM): Replace struct genitem with
struct empobj.  Remove genitem.h and create a new file empobj.h.
Replace multiple instances of unions of ef_type structures with
one standard union empobj_storage which is a superset of the individual
instances.
This commit is contained in:
Ron Koenderink 2006-07-07 15:15:43 +00:00
parent 9e75e5e009
commit 79ee88f7c6
29 changed files with 191 additions and 270 deletions

View file

@ -37,12 +37,6 @@
#ifndef TRADE_H
#define TRADE_H
#include "genitem.h"
#include "nuke.h"
#include "plane.h"
#include "land.h"
#include "ship.h"
struct trdstr {
short ef_type;
natid trd_owner;
@ -56,19 +50,11 @@ struct trdstr {
coord trd_y;
};
union trdgenstr {
struct genitem gen;
struct nukstr nuk;
struct plnstr pln;
struct lndstr lnd;
struct shpstr shp;
};
extern int trade_check_ok(struct trdstr *, union trdgenstr *);
extern int trade_check_item_ok(union trdgenstr *);
extern char *trade_nameof(struct trdstr *, union trdgenstr *);
extern int trade_desc(struct trdstr *, union trdgenstr *);
extern int trade_getitem(struct trdstr *, union trdgenstr *);
extern int trade_check_ok(struct trdstr *, union empobj_storage *);
extern int trade_check_item_ok(union empobj_storage *);
extern char *trade_nameof(struct trdstr *, union empobj_storage *);
extern int trade_desc(struct trdstr *, union empobj_storage *);
extern int trade_getitem(struct trdstr *, union empobj_storage *);
#define gettrade(n, p) ef_read(EF_TRADE, (n), (p))
#define puttrade(n, p) ef_write(EF_TRADE, (n), (p))