From 97e221baae8a6a9001f9e0d1861f058d3e9b0e59 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 28 Feb 2004 09:45:10 +0000 Subject: [PATCH] Remove some unused stuff, mostly Empire 3 leftovers. --- include/item.h | 2 -- include/map.h | 7 ------- include/mission.h | 10 ---------- include/nat.h | 30 +++--------------------------- include/news.h | 1 - include/nsc.h | 1 - include/treaty.h | 2 -- src/lib/global/item.c | 2 -- src/lib/global/news.c | 2 -- src/lib/global/nsc.c | 7 ------- src/lib/global/treaty.c | 2 -- 11 files changed, 3 insertions(+), 63 deletions(-) diff --git a/include/item.h b/include/item.h index 5013171c4..953d6cb62 100644 --- a/include/item.h +++ b/include/item.h @@ -55,6 +55,4 @@ extern int maxitem; extern struct ichrstr *whatitem(s_char *ptr, s_char *prompt); -extern int itm_maxno; - #endif /* _ITEM_H_ */ diff --git a/include/map.h b/include/map.h index 6c45786a1..aa42317f5 100644 --- a/include/map.h +++ b/include/map.h @@ -55,11 +55,4 @@ extern void border(struct range *, s_char *, s_char *); #define MAP_HIGH bit(3) #define MAP_ALL MAP_SHIP | MAP_LAND | MAP_PLANE -struct mapstr { - short ef_type; - coord map_x; - coord map_y; - s_char map_des; -}; - #endif /* _MAP_H_ */ diff --git a/include/mission.h b/include/mission.h index 52adb3c03..3ffe289fa 100644 --- a/include/mission.h +++ b/include/mission.h @@ -45,16 +45,6 @@ #define MI_DSUPPORT 7 #define MI_OSUPPORT 8 -/* The following "missions" do not need to be set--they are automatic */ -#define MI_FINTERDICT 9 /* forts interdicting ships */ -#define MI_MINTERDICT 10 /* missiles interdicting ships or land units */ -#define MI_MINTERCEPT 11 /* missile interception */ -#define MI_SINTERCEPT 12 /* sattelite interception */ -#define MI_PINTERCEPT 13 /* intercept planes */ -#define MI_SAM 14 /* SAM interception */ -#define MI_LREACT 15 /* land units react */ -#define MI_MAX 15 - struct genlist { struct emp_qelem queue; /* list of units */ int type; /* type of unit */ diff --git a/include/nat.h b/include/nat.h index 41fbfeaf6..8cf7006fc 100644 --- a/include/nat.h +++ b/include/nat.h @@ -36,7 +36,6 @@ #ifndef _NAT_H_ #define _NAT_H_ -#include "mission.h" #include "sect.h" #define MAXNOR 50 /* max # realms */ @@ -75,11 +74,11 @@ struct natstr { float nat_level[4]; /* technology, etc */ struct boundstr nat_b[MAXNOR]; /* realm bounds */ short nat_relate[MAXNOC]; - short nat_contact[MAXNOC]; /* short for everyone */ + short nat_contact[MAXNOC]; short nat_rejects[(MAXNOC + 3) / 4]; /* four bits for each country */ s_char nat_priorities[SCT_MAXDEF + 8]; /* priority for each SCT_MAXDEF+8 */ long nat_flags; /* nation flags */ - s_char nat_mission_trigger[MI_MAX]; /* not used -- relation to trig */ + char nat_spare[15]; }; /* Priorities */ @@ -129,36 +128,12 @@ struct natstr { #define NAT_ELEV 2 #define NAT_HLEV 3 -#define NF_CHAR 1 -#define NF_UCHAR 2 -#define NF_SHORT 3 -#define NF_LONG 4 -#define NF_STRING 5 -#define NF_FLOAT 6 -#define NF_DOUBLE 7 -#define NF_BOUND 8 - -#define NF_NOTIFY 1 -#define NF_PRIVATE 2 - -#define NF_NATID NF_UCHAR -#define NF_COORD NF_SHORT - #define FOUND_FLY 3 /* Number of updates contact lasts */ #define FOUND_LOOK 5 /* These are only useful with the */ #define FOUND_SPY 6 /* LOSE_CONTACT option (and HIDDEN) */ -#define FOUND_MAP 6 #define FOUND_TELE 3 #define FOUND_COAST 3 -struct fixnat { - s_char *name; - int type; - int index; - int notify; - int offset; -}; - extern s_char *relates[]; /* procedures relating to nation stuff */ @@ -194,6 +169,7 @@ extern void putreject(struct natstr *np, natid them, int how, int what); extern void putcontact(struct natstr *np, natid them, int contact); extern void agecontact(struct natstr *np); +/* nation flags */ #define NF_INFORM bit(0) /* Inform me of telegrams right away */ #define NF_FLASH bit(1) /* Allow other players to flash me (sicko :) */ #define NF_BEEP bit(2) /* Make beeping sounds when appropriate */ diff --git a/include/news.h b/include/news.h index 85193de19..0fabd0683 100644 --- a/include/news.h +++ b/include/news.h @@ -168,6 +168,5 @@ struct rptstr { extern struct rptstr rpt[]; extern s_char *page_headings[]; -extern int nws_maxno; #endif /* _NEWS_H_ */ diff --git a/include/nsc.h b/include/nsc.h index 44af2b29b..92c8584eb 100644 --- a/include/nsc.h +++ b/include/nsc.h @@ -154,7 +154,6 @@ extern struct castr treaty_ca[]; extern struct castr trade_ca[]; extern struct castr loan_ca[]; extern struct castr genitem_ca[]; -extern struct castr map_ca[]; extern struct castr lost_ca[]; extern struct castr commodity_ca[]; diff --git a/include/treaty.h b/include/treaty.h index c9a6caf03..35a968e62 100644 --- a/include/treaty.h +++ b/include/treaty.h @@ -79,6 +79,4 @@ struct tchrstr { extern struct tchrstr tchr[]; -extern int trt_maxno; - #endif /* _TREATY_H_ */ diff --git a/src/lib/global/item.c b/src/lib/global/item.c index 60924b606..264630d0c 100644 --- a/src/lib/global/item.c +++ b/src/lib/global/item.c @@ -59,5 +59,3 @@ struct ichrstr ichr[I_MAX + 2] = { {'r', V_RAD, 150, 1, 8, {1, 10, 1, 1}, "radioactive materials"}, {0, 0, 0, 0, 0, {0, 0, 0, 0}, 0} }; - -int itm_maxno = (sizeof(ichr) / sizeof(struct ichrstr)) - 1; diff --git a/src/lib/global/news.c b/src/lib/global/news.c index 45f8721c0..69c761ac4 100644 --- a/src/lib/global/news.c +++ b/src/lib/global/news.c @@ -241,5 +241,3 @@ struct rptstr rpt[N_MAX_VERB + 1] = { {-2, N_FRONT, {"mercenaries board one of %s's land units", /* 82*/ "elite forces board %s land unit"}} }; - -int nws_maxno = (sizeof(rpt) / sizeof(struct rptstr)) - 1; diff --git a/src/lib/global/nsc.c b/src/lib/global/nsc.c index c230e367c..e0dbf2dd6 100644 --- a/src/lib/global/nsc.c +++ b/src/lib/global/nsc.c @@ -340,10 +340,3 @@ struct castr nat_ca[] = { /* {NSC_LONG | NSC_OFF | fldoff(natstr, nat_flags),"flags",0}, */ {0, 0, 0} }; - -struct castr map_ca[] = { - {NSC_XCOORD | NSC_OFF | fldoff(mapstr, map_x), "x", 0}, - {NSC_YCOORD | NSC_OFF | fldoff(mapstr, map_y), "y", 0}, - {NSC_CHAR | NSC_OFF | fldoff(mapstr, map_des), "des", 0}, - {0, 0, 0} -}; diff --git a/src/lib/global/treaty.c b/src/lib/global/treaty.c index b4569a58a..c8a96ce93 100644 --- a/src/lib/global/treaty.c +++ b/src/lib/global/treaty.c @@ -49,5 +49,3 @@ struct tchrstr tchr[] = { {TRTENL, "no enlistment"}, {0, 0} }; - -int trt_maxno = (sizeof(tchr) / sizeof(struct tchrstr)) - 1; -- 2.43.0