]> git.pond.sub.org Git - empserver/blob - src/lib/global/symbol.c
Update copyright notice
[empserver] / src / lib / global / symbol.c
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2012, Dave Pare, Jeff Bailey, Thomas Ruschak,
4  *                Ken Stevens, Steve McClure, Markus Armbruster
5  *
6  *  Empire is free software: you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation, either version 3 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  *
19  *  ---
20  *
21  *  See files README, COPYING and CREDITS in the root of the source
22  *  tree for related information and legal notices.  It is expected
23  *  that future projects/authors will amend these files as needed.
24  *
25  *  ---
26  *
27  *  symbol.c: Empire symbol tables
28  *
29  *  Known contributors to this file:
30  *     Markus Armbruster, 2006-2010
31  */
32
33 #include <config.h>
34
35 #include "land.h"
36 #include "misc.h"
37 #include "mission.h"
38 #include "nat.h"
39 #include "news.h"
40 #include "nsc.h"
41 #include "nuke.h"
42 #include "plague.h"
43 #include "plane.h"
44 #include "retreat.h"
45 #include "sect.h"
46 #include "ship.h"
47 #include "treaty.h"
48
49 struct symbol agreement_statuses[] = {
50     {AGREE_FREE, "free"},
51     {AGREE_PROPOSED, "proposed"},
52     {AGREE_SIGNED, "signed"},
53     {0, NULL}
54 };
55
56 struct symbol land_chr_flags[] = {
57     {L_ENGINEER, "engineer"},
58     {L_SUPPLY, "supply"},
59     {L_SECURITY, "security"},
60     {L_LIGHT, "light"},
61     {L_MARINE, "marine"},
62     {L_RECON, "recon"},
63     {L_RADAR, "radar"},
64     {L_ASSAULT, "assault"},
65     {L_FLAK, "flak"},
66     {L_SPY, "spy"},
67     {L_TRAIN, "train"},
68     {L_HEAVY, "heavy"},
69     {0, NULL}
70 };
71
72 struct symbol level[] = {
73     {-1, "none"},
74     {NAT_TLEV, "technology"},
75     {NAT_RLEV, "research"},
76     {NAT_ELEV, "education"},
77     {NAT_HLEV, "happiness"},
78     {0, NULL}
79 };
80
81 struct symbol meta_flags[] = {
82     {NSC_DEITY, "deity"},
83     {NSC_EXTRA, "extra"},
84     {NSC_CONST, "const"},
85     {NSC_BITS, "bits"},
86     {0, NULL}
87 };
88
89 struct symbol meta_type[] = {
90     {NSC_LONG, "d"},
91     {NSC_DOUBLE, "g"},
92     {NSC_STRING, "s"},
93     {NSC_CHAR, "d"},
94     {NSC_UCHAR, "d"},
95     {NSC_SHORT, "d"},
96     {NSC_USHORT, "d"},
97     {NSC_INT, "d"},
98     {NSC_XCOORD, "d"},
99     {NSC_YCOORD, "d"},
100     {NSC_HIDDEN, "d"},
101     {NSC_TIME, "d"},
102     {NSC_FLOAT, "g"},
103     {NSC_STRINGY, "c"},
104     {NSC_NOTYPE, NULL}
105 };
106
107 struct symbol missions[] = {
108     {MI_NONE, "none"},
109     {MI_INTERDICT, "interdiction"},
110     {MI_SUPPORT, "support"},
111     {MI_RESERVE, "reserve"},
112     {MI_ESCORT, "escort"},
113     {MI_AIR_DEFENSE, "air defense"},
114     {MI_DSUPPORT, "defensive support"},
115     {MI_OSUPPORT, "offensive support"},
116     {0, NULL}
117 };
118
119 struct symbol nation_flags[] = {
120     {NF_INFORM, "inform"},
121     {NF_FLASH, "flash"},
122     {NF_BEEP, "beep"},
123     {NF_COASTWATCH, "coastwatch"},
124     {NF_SONAR, "sonar"},
125     {NF_TECHLISTS, "techlists"},
126     {NF_SACKED, "sacked"},
127     {0, NULL}
128 };
129
130 struct symbol nation_rejects[] = {
131     {REJ_TELE, "telegrams"},
132     {REJ_TREA, "treaties"},
133     {REJ_ANNO, "announcements"},
134     {REJ_LOAN, "loans"},
135     {0, NULL}
136 };
137
138 struct symbol nation_relations[] = {
139     {-1, "unknown"},
140     {AT_WAR, "at-war"},
141     {HOSTILE, "hostile"},
142     {NEUTRAL, "neutral"},
143     {FRIENDLY, "friendly"},
144     {ALLIED, "allied"},
145     {0, NULL}
146 };
147
148 struct symbol nation_status[] = {
149     {STAT_UNUSED, "unused"},
150     {STAT_NEW, "new"},
151     {STAT_VIS, "visitor"},
152     {STAT_SANCT, "sanctuary"},
153     {STAT_ACTIVE, "active"},
154     {STAT_GOD, "deity"},
155     {0, NULL}
156 };
157
158 struct symbol nuke_chr_flags[] = {
159     {N_NEUT, "neutron"},
160     {0, NULL}
161 };
162
163 struct symbol packing[] = {
164     {IPKG, "inefficient"},
165     {NPKG, "normal"},
166     {WPKG, "warehouse"},
167     {UPKG, "urban"},
168     {BPKG, "bank"},
169     {0, NULL}
170 };
171
172 struct symbol page_headings[] = {
173     {N_NOTUSED, "Comics"},
174     {N_FOR, "Foreign Affairs"},
175     {N_FRONT, "The Front Line"},
176     {N_SEA, "The High Seas"},
177     {N_SKY, "Sky Watch"},
178     {N_MISS, "Guidance Systems"},
179     {N_ARTY, "Firestorms"},
180     {N_ECON, "Business & Economics"},
181     {N_COLONY, "The Frontier"},
182     {N_HOME, "The Home Front"},
183     {N_SPY, "Espionage"},
184     {N_TELE, "Telecommunications"},
185     {0, NULL}
186 };
187
188 struct symbol plague_stages[] = {
189     {PLG_HEALTHY, "healthy"},
190     {PLG_DYING, "dying"},
191     {PLG_INFECT, "infect"},
192     {PLG_INCUBATE, "incubate"},
193     {PLG_EXPOSED, "exposed"},
194     {0, NULL}
195 };
196
197 struct symbol plane_chr_flags[] = {
198     {P_T, "tactical"},
199     {P_B, "bomber"},
200     {P_F, "intercept"},
201     {P_C, "cargo"},
202     {P_V, "VTOL"},
203     {P_M, "missile"},
204     {P_L, "light"},
205     {P_S, "spy"},
206     {P_I, "image"},
207     {P_O, "satellite"},
208     {P_N, "SDI"},
209     {P_E, "x-light"},
210     {P_K, "helo"},
211     {P_A, "ASW"},
212     {P_P, "para"},
213     {P_ESC, "escort"},
214     {P_MINE, "mine"},
215     {P_SWEEP, "sweep"},
216     {P_MAR, "marine"},
217     {0, NULL}
218 };
219
220 struct symbol plane_flags[] = {
221     {PLN_LAUNCHED, "launched"},
222     {PLN_SYNCHRONOUS, "synchronous"},
223     {PLN_AIRBURST, "airburst"},
224     {0, NULL}
225 };
226
227 struct symbol resources[] = {
228     /* names should match resource selector names in sect_ca[] */
229     {0, "none"},
230     {offsetof(struct sctstr, sct_min), "min"},
231     {offsetof(struct sctstr, sct_gmin), "gold"},
232     {offsetof(struct sctstr, sct_fertil), "fert"},
233     {offsetof(struct sctstr, sct_oil), "ocontent"},
234     {offsetof(struct sctstr, sct_uran), "uran"},
235     {0, NULL}
236 };
237
238 struct symbol retreat_flags[] = {
239     {RET_GROUP, "group"},
240     {RET_INJURED, "injured"},
241     {RET_TORPED, "torped"},
242     {RET_SONARED, "sonared"},
243     {RET_HELPLESS, "helpless"},
244     {RET_BOMBED, "bombed"},
245     {RET_DCHRGED, "depth-charged"},
246     {RET_BOARDED, "boarded"},
247     {0, NULL}
248 };
249
250 struct symbol sector_navigation[] = {
251     {NAV_NONE, "land"},
252     {NAVOK, "sea"},
253     {NAV_02, "harbor"},
254     {NAV_CANAL, "canal"},
255     {NAV_60, "bridge"},
256     {0, NULL}
257 };
258
259 struct symbol ship_chr_flags[] = {
260     {M_FOOD, "fish"},
261     {M_TORP, "torp"},
262     {M_DCH, "dchrg"},
263     {M_FLY, "plane"},
264     {M_MSL, "miss"},
265     {M_OIL, "oil"},
266     {M_SONAR, "sonar"},
267     {M_MINE, "mine"},
268     {M_SWEEP, "sweep"},
269     {M_SUB, "sub"},
270     {M_LAND, "land"},
271     {M_SUBT, "sub-torp"},
272     {M_TRADE, "trade"},
273     {M_SEMILAND, "semi-land"},
274     {M_SUPPLY, "supply"},
275     {M_CANAL, "canal"},
276     {M_ANTIMISSILE, "anti-missile"},
277     {0, NULL}
278 };
279
280 struct symbol treaty_flags[] = {
281     {LNDATT, "no attacks on any land units"},
282     {SEAATT, "no attacks on any ships"},
283     {SEAFIR, "no shelling any ships"},
284     {SUBFIR, "no depth-charging any subs"},
285     {LANATT, "no sector attacks"},
286     {LANFIR, "no shelling any land"},
287     {NEWSHP, "no building ships"},
288     {NEWNUK, "no new nuclear weapons"},
289     {NEWPLN, "no building planes"},
290     {NEWLND, "no building land units"},
291     {TRTENL, "no enlistment"},
292     {0, NULL}
293 };