(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

@ -36,13 +36,7 @@
#include "misc.h"
#include "player.h"
#include "xy.h"
#include "treaty.h"
#include "nat.h"
#include "ship.h"
#include "land.h"
#include "sect.h"
#include "retreat.h"
#include "news.h"
#include "nsc.h"
#include "file.h"
#include "queue.h"
@ -50,6 +44,7 @@
#include "optlist.h"
#include "damage.h"
#include "commands.h"
#include "empobj.h"
enum targ_type {
targ_land, targ_ship, targ_sub, targ_unit, targ_bogus
@ -64,12 +59,6 @@ struct flist {
int victim; /* who I was shooting at */
};
union item_u {
struct shpstr ship;
struct sctstr sect;
struct lndstr land;
};
static void add_to_fired_queue(struct emp_qelem *, struct emp_qelem *);
static int defend(struct emp_qelem *al,
struct emp_qelem *dl,
@ -120,7 +109,7 @@ multifire(void)
char *p;
int nfiring = 0;
int ndefending = 0;
union item_u item;
union empobj_storage item;
struct emp_qelem fired, defended;
double odds;
char buf[1024];